lact_lib.qsrc 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437
  1. # lact_lib
  2. if $ARGS[0] = '$calc_lactatemm':
  3. !! func('lact_lib', 'calc_lactatemm')
  4. !! No arguments at the moment. Information is taken from the global variables 'nbsize', 'lactate','lactateinduced','kid'.
  5. !! lactatemm should be calculated every day, so if the breasts size is changed naturally the lactatemm will get higher. No change when silicone tits happen. Only natural breast tissue should make milk.
  6. !! Usage: lactatemm = func('lact_lib','$calc_lactatemm')
  7. !! RESULT = lactatemm in ml*10
  8. if lactate = 0:
  9. RESULT = 0
  10. elseif lactate >0:
  11. temp_breastsize = 0
  12. temp_breastsize += nbsize
  13. temp_var = 0
  14. if lactateinduced > 0 and kid <= 0:
  15. temp_var = ((8*temp_breastsize*temp_breastsize)+(37*temp_breastsize))/4
  16. RESULT = temp_var
  17. else
  18. RESULT = ((8*temp_breastsize*temp_breastsize)+(37*temp_breastsize))
  19. end
  20. else
  21. cls & '<b><font color="red">BAD ARGUMENT CHECK IN <i>$calc_lactatemm</i>!</font></b>'
  22. end
  23. end
  24. if $ARGS[0] = '$get_breastmilk':
  25. !! func('lact_lib','$get_breastmilk', sucktion_type, sucktion_time)
  26. !! ARGS[1] = sucktion_type: the type of sucktion. adult_mouth [0], child_mouth [1], baby_mouth [2], manual_breastpump [3] , electric_breastpump [4], hand_expressing [5], cow milker [6]
  27. !! ARGS[2] = sucktion_time: how many minutes the sucking/pumping takes place
  28. !! Usage: breastmilkvolume = func('lact_lib','$get_breastmilk', 4, 20)
  29. !! RESULT = Milk in ml*10
  30. !! what type of sucktion is happening? different sucktion can cause a different demand of breastmilk. Base rate of sucktion is 10ml/minute.
  31. soreness_mod = 10
  32. breastpumped = 1
  33. !! 'suck_flow_rate initialized'
  34. if ARGS[1] = 0:
  35. !! 'adult sucking'
  36. suck_flow_rate = 12 + rand(0,4)
  37. temp_var = pcs_mood +(ARGS[2]/8)
  38. if temp_var > 100:
  39. pcs_mood = 100
  40. else
  41. pcs_mood += ARGS[2]/8
  42. end
  43. elseif ARGS[1] = 1:
  44. !! 'child sucking'
  45. suck_flow_rate = 8 + rand(0,2)
  46. temp_var = pcs_mood + (ARGS[2]/2)
  47. if temp_var > 100:
  48. pcs_mood = 100
  49. else
  50. pcs_mood += ARGS[2]/2
  51. end
  52. elseif ARGS[1] = 2:
  53. !! 'baby sucking'
  54. suck_flow_rate = 6 + (rand(0,2))
  55. temp_var = pcs_mood + ARGS[2]
  56. if temp_var > 100:
  57. pcs_mood = 100
  58. else
  59. pcs_mood += ARGS[2]
  60. end
  61. elseif ARGS[1] = 3:
  62. !! 'manual_breastpump sucking'
  63. suck_flow_rate = 9
  64. elseif ARGS[1] = 4:
  65. !! 'electric_breastpump sucking'
  66. suck_flow_rate = 10
  67. elseif ARGS[1] = 5:
  68. !! 'hand expression'
  69. suck_flow_rate = 3 + rand(1,2)
  70. elseif ARGS[1] = 6:
  71. !! 'cow milker sucking'
  72. suck_flow_rate = 100
  73. else
  74. !! 'suck flow else branch'
  75. suck_flow_rate = 10
  76. end
  77. !! If you pump and work your breast more, soreness will decrease after pumping. This can also decline if your breasts arent worked for a longer time.
  78. if breastcounter > 0:
  79. temp_var = breastcounter/10
  80. soreness_mod += temp_var
  81. if soreness_mod > 20: soreness_mod = 20
  82. if nipple_cream = 1:
  83. soreness_mod += 10
  84. nipple_cream = 0
  85. end
  86. end
  87. !! No lactation, no milk, but stimulus is applied, so some things are going to happen here.
  88. if lactate = 0:
  89. if milkoverdemand <= 0: milkoverdemand = 0
  90. pump_stop_brake = 0
  91. !! This is how much milk demand is applied to the breasts. In this function it is needed to calculate the nipple pain and breast pain.
  92. max_sucktion_demand = 10*suck_flow_rate*ARGS[2]
  93. if pain['nipples'] <= 60:
  94. suck_until_pain = ((60 - pain['nipples'])*10*(soreness_mod/10))/suck_flow_rate
  95. end
  96. temp_var = pain['nipples'] + (max_sucktion_demand/100)/(soreness_mod/10)
  97. if temp_var > 60:
  98. pain['nipples'] = 65
  99. pump_stop_brake = 1
  100. pumptime = suck_until_pain
  101. max_sucktion_demand = 10*suck_flow_rate*pumptime
  102. else
  103. pain['nipples'] += (max_sucktion_demand/100)/(soreness_mod/10)
  104. end
  105. temp_var = pain['breasts'] + max_sucktion_demand/1000
  106. if temp_var > 20:
  107. pain['breasts'] = 25
  108. else
  109. pain['breasts'] += max_sucktion_demand/1000
  110. end
  111. !! Pumping breasts is exhausting even if no milk comes. so this is handled here.
  112. temp_var = pcs_energy - max_sucktion_demand/1500
  113. if temp_var < 0:
  114. pcs_energy = 0
  115. !! energy usage flag on.
  116. energytomilkpump = 1
  117. else
  118. pcs_energy -= max_sucktion_demand/1500
  119. !! energy usage flag on.
  120. energytomilkpump = 1
  121. end
  122. if pumptime < 10:
  123. breastcounter += 1
  124. else
  125. breastcounter += pumptime/10
  126. end
  127. milkoverdemand += max_sucktion_demand
  128. RESULT = 0
  129. !! If there is lactation, do the magic
  130. elseif lactate >0:
  131. !! How much milk can go through the nipple. Base rate is 10ml/minute when sucktion is applied to the nipple. If the demand is higher than the nipple can push through, nipple soreness will happen more quickly.
  132. if pcs_nips > 0:
  133. max_nip_flow_rate = 6
  134. elseif pcs_nips > 20:
  135. max_nip_flow_rate = 8
  136. elseif pcs_nips > 40:
  137. max_nip_flow_rate = 10
  138. elseif pcs_nips > 60:
  139. max_nip_flow_rate = 12
  140. elseif pcs_nips > 80:
  141. max_nip_flow_rate = 14
  142. elseif pcs_nips > 100:
  143. max_nip_flow_rate = 16
  144. else
  145. max_nip_flow_rate = 10
  146. end
  147. !! If you pump and work your breast more, soreness will decrease after pumping. This can also decline if your breasts arent worked for a longer time.
  148. if breastcounter > 0:
  149. temp_var = breastcounter/10
  150. soreness_mod += temp_var
  151. if soreness_mod > 20: soreness_mod = 20
  152. if nipple_cream = 1:
  153. soreness_mod += 10
  154. nipple_cream = 0
  155. end
  156. end
  157. !! If you pump more, more milk will come, disregarding nipplesize. Things will get used to milking and be more loose.
  158. nip_flow_mod = 1
  159. temp_var = breastcounter/10
  160. nip_flow_mod += temp_var
  161. if nip_flow > 30: nip_flow_mod = 30
  162. max_nip_flow_rate += nip_flow_mod
  163. !! How much milk demand is applied to the breasts. We want to know if we can just suck out what is already stored or if additional milk production is needed to go through the whole pumping/sucking.
  164. !! If we only need 20ml from a 100ml storage, we would only substract 20ml, leaving 80ml inside the breasts.
  165. max_sucktion_demand = 10*suck_flow_rate*ARGS[2]
  166. !! Is enough milk already in the breasts?
  167. if lactatemv > max_sucktion_demand:
  168. !! can the nipples handle the flow?
  169. if max_nip_flow_rate >= suck_flow_rate:
  170. milkedvolume = max_sucktion_demand
  171. lactatemv -= max_sucktion_demand
  172. elseif max_nip_flow_rate < suck_flow_rate:
  173. milkedvolume = max_nip_flow_rate*10*ARGS[2]
  174. lactatemv -= milkedvolume
  175. !! time for sore nipples. We apply more sucking than the nipples can handle. So it hurts more. if nipple pain over 60, then it goes to 65. else it just adds soreness.
  176. max_sucktion_demand -= milkedvolume
  177. temp_var = pain['nipples'] + (max_sucktion_demand/100)/(soreness_mod/10)
  178. if temp_var > 60:
  179. pain['nipples'] = 65
  180. else
  181. pain['nipples'] += (max_sucktion_demand/100)/(soreness_mod/10)
  182. end
  183. else
  184. cls & '<b><font color="red">BAD ARGUMENT CHECK IN <i>$get_breastmilk</i>!</font></b><b>Error in Lactatemv bigger than max_sucktion_demand fork.</b>'
  185. end
  186. elseif lactatemv < max_sucktion_demand:
  187. !! Magic!
  188. temp_var = (lactatemv/(max_nip_flow_rate*10))
  189. if temp_var <= 0 and lactatemv > 0: temp_var = 1
  190. pumptime_left = ARGS[2] - temp_var
  191. if pumptime_left <= 0 and lactatemv > 0: pumptime_left = 1
  192. temp_var = lactaterate/60
  193. if temp_var <= 0 and lactaterate > 0: temp_var = 1
  194. if temp_var >= max_nip_flow_rate:
  195. if ARGS[1] = 2: breastcounter += 50
  196. milkedvolume = (max_nip_flow_rate * 10 * pumptime_left) + (max_nip_flow_rate * 10 * (ARGS[2] - pumptime_left))
  197. lactatemv -= (max_nip_flow_rate * 10 * (ARGS[2] - pumptime_left))
  198. elseif temp_var < max_nip_flow_rate:
  199. !!with a baby sucking, more milk should be made due to nature ...
  200. if ARGS[1] = 2: milkoverdemand += 100000
  201. milkedvolume = (temp_var * pumptime_left) + (max_nip_flow_rate * 10 * (ARGS[2] - pumptime_left))
  202. lactatemv -= (max_nip_flow_rate * 10 * (ARGS[2] - pumptime_left))
  203. else
  204. cls & '<b><font color="red">BAD ARGUMENT CHECK IN <i>$get_breastmilk</i>!</font></b><b>Error in Lactatemv smaller than max_sucktion_demand fork.</b>'
  205. end
  206. if lactatemv <= 0: lactatemv = 0
  207. !! the breasts had to produce milk, so energy is used.
  208. temp_var = pcs_energy - milkedvolume/1000
  209. if temp_var < 0:
  210. pcs_energy = 0
  211. if rand(0,100) > 90: fat -= 1
  212. !! this is checking if pcs_energy was impacted during milking.
  213. energytomilkpump = 1
  214. else
  215. pcs_energy -= milkedvolume/1000
  216. !! this is checking if pcs_energy was impacted during milking.
  217. energytomilkpump = 1
  218. end
  219. !! the breasts had to produce milk, so hydration is used.
  220. temp_var = pcs_hydra - milkedvolume/500
  221. if temp_var < 0:
  222. pcs_hydra = 0
  223. energytomilkpump = 1
  224. else
  225. pcs_hydra -= milkedvolume/500
  226. energytomilkpump = 1
  227. end
  228. !! if more is pumped than produced the breasts will hurt too.
  229. if milkedvolume < max_sucktion_demand:
  230. !! milkoverdemand: This is used for the daily milk growth. If there is overdemand, the lactaterate will change the next day. Will be set to 0 every day.
  231. milkoverdemand += max_sucktion_demand - milkedvolume
  232. temp_var = pain['breasts'] + (max_sucktion_demand - milkedvolume)/1000
  233. if temp_var > 20:
  234. pain['breasts'] = 20
  235. else
  236. pain['breasts'] += (max_sucktion_demand - milkedvolume)/1000
  237. end
  238. end
  239. if max_nip_flow_rate < suck_flow_rate:
  240. !! sore nipples again. "used to breastpumping" variable needs to come in here too!
  241. temp_var = pain['nipples'] + ((((max_nip_flow_rate*100)/60) * pumptime_left)/100) + (max_sucktion_demand/100)/(soreness_mod/10)
  242. if temp_var > 60:
  243. pain['nipples'] = 65
  244. else
  245. pain['nipples'] += ((((max_nip_flow_rate*100)/60) * pumptime_left)/100) + (max_sucktion_demand/100)/(soreness_mod/10)
  246. end
  247. end
  248. end
  249. !! The standard nipple pain applied due to pumping. Adding to the pain that is calculated above
  250. temp_var = pain['nipples'] + (max_sucktion_demand/100)/(soreness_mod/10)
  251. if temp_var > 60:
  252. pain['nipples'] = 65
  253. else
  254. pain['nipples'] += (max_sucktion_demand/100)/(soreness_mod/10)
  255. end
  256. if pumptime < 10:
  257. breastcounter += 1
  258. else
  259. breastcounter += pumptime/10
  260. end
  261. RESULT = milkedvolume
  262. else
  263. cls & '<b><font color="red">BAD ARGUMENT CHECK IN <i>$get_breastmilk</i>!</font></b>'
  264. end
  265. end
  266. !! lact_lib
  267. !! bp_milking - breast pump milking
  268. !! use href="exec:gt ''lact_lib'',''bp_milking''"
  269. if $ARGS[0] = 'bp_milking':
  270. pumptime = 0
  271. pumptype = 0
  272. if $location_type ! 'bathroom' and exhibitionist_lvl < 1:
  273. 'You can''t use it here.'
  274. else
  275. *clr
  276. cla
  277. pumptime = input ("How long do you plan to pump your breasts? (Not more than 60 minutes)")
  278. if pumptime <= 0 or pumptime > 60:
  279. minut += 2
  280. act 'Don''t pump':gt $loc, $metka
  281. elseif pumptime > 0 and pumptime <= 60:
  282. gt 'lact_lib', 'milking'
  283. end
  284. end
  285. end
  286. !! man_milking - manual (with hands) milking
  287. !! use href="exec:gt ''lact_lib'',''man_milking''"
  288. if $ARGS[0] = 'man_milking':
  289. pumptime = 0
  290. pumptype = 1
  291. if $location_type ! 'bathroom' and exhibitionist_lvl < 1:
  292. 'You can''t do this here.'
  293. else
  294. *clr
  295. cla
  296. pumptime = input ("How long would you like to milk your breasts? (Not more than 60 minutes)")
  297. if pumptime <= 0 or pumptime > 60:
  298. minut += 2
  299. act 'Don''t milk':gt $loc, $metka
  300. elseif pumptime > 0 and pumptime <= 60:
  301. gt 'lact_lib', 'milking'
  302. end
  303. end
  304. end
  305. !! milking
  306. !! never use directly. Always use bp_milking, man_milking or sex_milking
  307. if $ARGS[0] = 'milking':
  308. if pumptime <= 0 or pumptime > 60:
  309. act 'Finish':gt $loc, $metka
  310. end
  311. if pumptype = 1:
  312. pumptime = (pumptime*6)/10
  313. end
  314. if lactate > 0 and pain['nipples'] < 60:
  315. milkedvolume = func('lact_lib','$get_breastmilk', 3, pumptime)
  316. '<center><img <<$set_imgh>> src="images/pc/body/tits/pump_lactating.jpg"></center>'
  317. 'You attach the pump to your breast and start rythmically squeezing the bulb until your breasts feel empty.<br>You give it a few more pumps and detach the pump.<br>You filled the bottle with <<milkedvolume/10>>ml of your milk.'
  318. breastcounter += 1
  319. if energytomilkpump > 0 and pcs_energy = 0:
  320. '<br>During pumping you feel really hungry, producing breast milk seems to be more exhausing then thought.'
  321. energytomilkpump = 0
  322. elseif energytomilkpump > 0:
  323. '<br>You feel a bit thirsty after pumping.'
  324. energytomilkpump = 0
  325. end
  326. if bcream_used = 1:
  327. pcs_nips += rand(0,2)
  328. bcream_used = 0
  329. end
  330. minut += pumptime
  331. elseif lactate = 0 and pain['nipples'] < 60:
  332. if rand(1,50) + prolactinlvl >= rand(200,250):
  333. '<center><img <<$set_imgh>> src="images/pc/body/tits/lactate_start.jpg"></center>'
  334. 'As usual, you attach the pump but after a few pumps white liquid suddenly starts flowing from your nipples.<br>You started lactating!'
  335. lactateinduced = 1
  336. lactate = 1
  337. if func('lact_lib','$calc_lactatemm') > 0: lactatemm = func('lact_lib','$calc_lactatemm')
  338. if prolactinlvl < 200: prolactinlvl = 200
  339. lactaterate = 10*(prolactinlvl/200)
  340. pcs_nips += 2
  341. pumpinggrowth = 0
  342. else
  343. milkedvolume = func('lact_lib','$get_breastmilk', 3, pumptime)
  344. '<center><img <<$set_imgh>> src="images/pc/body/tits/t<<tits>>.jpg"></center>'
  345. 'You attach the pump to your nipples and start squeezing the bulb. The vacuum feels good on your nipples.'
  346. if prolactinlvl > 70: 'A few droplets of liquid come out of your nipples but it is not milk.'
  347. breastcounter += 1
  348. if pump_stop_brake = 1:
  349. 'During pumping your nipples start to hurt extremely. You have to stop after <<pumptime>> minutes, because you couldn''t go on.'
  350. end
  351. if prolactinlvl > 75:
  352. if rand(0,10) > 9:
  353. pumpinggrowth += 1
  354. end
  355. 'After finishing, your breasts feel weirdly engorged.'
  356. end
  357. if bcream_used = 1:
  358. pcs_nips += rand(0,2)
  359. bcream_used = 0
  360. end
  361. end
  362. minut += pumptime
  363. else
  364. 'Your nipples feel too sore to use the pump right now.'
  365. end
  366. if milkedvolume > 0:
  367. lact_engorgement = 0
  368. lactatemess = 0
  369. act 'Pour it into the sink':
  370. *clr
  371. cla
  372. '<center><img <<$set_imgh>> src="images/pc/body/tits/milk_sink.jpg"></center>'
  373. '<center>You pour <<milkedvolume/10>>ml of your breast milk into the sink and clean up your breastpump.</center>'
  374. minute += 5
  375. act 'Finish':
  376. milkedvolume = 0
  377. gt $loc, $metka
  378. end
  379. end
  380. if pcs_hydra < 100:
  381. act 'Drink it':
  382. *clr
  383. cla
  384. '<center><img <<$set_imgh>> src="images/pc/body/tits/milk_drink.jpg"></center>'
  385. '<center>You drink your own breast milk and clean up your breastpump.</center>'
  386. '<center>The milk is still warm from your breasts.</center>'
  387. if pcs_hydra < 90:
  388. pcs_hydra += 10
  389. else
  390. pcs_hydra = 100
  391. end
  392. minute += 7
  393. act 'Finish':
  394. milkedvolume = 0
  395. gt $loc, $metka
  396. end
  397. end
  398. end
  399. else
  400. act 'Finish':gt $loc, $metka
  401. end
  402. end
  403. !! engorged_morning
  404. !! use href="exec:gt ''lact_lib'',''engorged_morning''"
  405. if $ARGS[0] = 'engorged_morning':
  406. minut += 5
  407. '<center><img <<$set_imgh>> src="images/pc/body/tits/lactate_start.jpg"></center>'
  408. 'You wake up and your breasts hurt. As you look down, you can see that you have a heavy letdown. You should pump your breasts as soon as possible.'
  409. act 'Finish':gt $loc, $metka
  410. end
  411. --- lac_lib ---------------------------------