Browse Source

Merge branch 'master' of https://git.catrenelle.com/sandra_schulz/glife

# Conflicts:
#	locations/stat_display.qsrc
KevinSmarts 6 years ago
parent
commit
75bb080049
3 changed files with 1438 additions and 1002 deletions
  1. 946 957
      locations/femcyc.qsrc
  2. 435 0
      locations/lact_lib.qsrc
  3. 57 45
      locations/stat_display.qsrc

+ 946 - 957
locations/femcyc.qsrc

@@ -1,957 +1,946 @@
-# femcyc
-
-!! I have to initialize the variables somewhere, maybe in preCUST?
-if Luth_Max = 0: LutH_Max = rand(312,360) & !! 13-15 days including ovulation
-if Foch_Max = 0: FocH_Max = rand(312,360) & !! 13-15 days including menstruation
-		
-if $ARGS[0] = '':
-	!{Hourly reduction in semen potency}
-	!{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.}
-	!{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.}
-	!{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.}
-	!{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.}
-
-	if rcntorgzm = 1:
-		if rcntorgzmtmp = 1: rcntorgzm = 0 & rcntorgzmtmp = 0
-		if rcntorgzmtmp = 0: rcntorgzmtmp = 1
-
-	end
-
-	cumarr_idx = 0
-
-	:cumarrloop
-	if cumarr_idx < arrsize('$cumarrnam'):
-		if cumarrcpt[cumarr_idx] > 0 and cumarrage[cumarr_idx] < 144:
-			if rcntorgzm = 1 and cumarrcpt[cumarr_idx] < cumarrppt[cumarr_idx] and cumarrage[cumarr_idx] < 1: cumarrcpt[cumarr_idx] += cumarrppt[cumarr_idx] / 12
-			cumpdrop = cumarrcpt[cumarr_idx] / (144 - cumarrage[cumarr_idx])
-			if cycle ! 2: cumpdrop += cumpdrop * rand(0, 2)
-			cumarrcpt[cumarr_idx] -= cumpdrop
-			if cumarrcpt[cumarr_idx] <= 0:
-				gs 'cum_cleanup', 'cleanwomb', cumarr_idx
-			else
-				cumarrage[cumarr_idx] += 1
-				cumarr_idx += 1
-			end
-		else
-			gs 'cum_cleanup', 'cleanwomb', cumarr_idx
-		end
-
-		jump 'cumarrloop'
-
-	end
-
-	!!Succubus absorption of sperm in womb
-	if succubusflag = 1:
-		if arrsize('cumarrppt') > 0:
-			succycletmp = 0
-			:sucvagabs
-			if cumarrdel[succycletmp] = 0:
-				if cumarrcpt[succycletmp] > 10000:
-					sexnutrition += 30 * succublvl
-					succubxp += 3
-				elseif cumarrcpt[succycletmp] < 3000 and cumarrcpt[succycletmp] > 1000:
-					sexnutrition += 5 * succublvl
-					succubxp += 2
-				elseif cumarrcpt[succycletmp] =< 1000:
-					 sexnutrition += succublvl
-				else
-					sexnutrition += 25 * succublvl
-					succubxp += 3
-				end
-				gs 'cum_cleanup', 'cleanwomb', succycletmp
-				sucabscum = 1
-			else
-				succycletmp += 1
-			end
-			if succycletmp < arrsize('cumarrppt'): jump 'sucvagabs'
-		end
-		killvar 'succycletmp'
-	end
-
-	cumarrtemp = 0
-	cumcondslip = 0
-	cumcondslip_aware = 0
-	if arrsize('sparrvol') > 0:
-		:cumspaloop
-		!!Succubus absorption for internal locations other than womb
-		if succubusflag = 1:
-			if sparrloc[cumarrtemp] = 3 or sparrloc[cumarrtemp] = 12:
-				sexnutrition += 25*succublvl
-				succubxp += 3
-				sucabscum = 1
-				if sparrvol[cumarrtemp] > 0: sparrvol[cumarrtemp] = 0
-			end
-		end
-		!!{if sparrloc[cumarrtemp] = 0 or sparrloc[cumarrtemp] = 3 or sparrloc[cumarrtemp] = 12:
-			sexnutrition += 30*succublvl
-			sparrvol[cumarrtemp] -= 30*succublvl
-			if sparrvol[cumarrtemp] < 0: sexnutrition += sparrvol[cumarrtemp] & sparrvol[cumarrtemp] = 0
-		end}
-		!!{ Process spatter until it has volume or is too old in vagina. }
-		if sparrvol[cumarrtemp] > 0 or (sparrloc[cumarrtemp] = 0 and sparrage[cumarrtemp] < 10):
-			sparrtmpv = arrsize('$cumarrnam')
-			if sparrloc[cumarrtemp] = 17:
-				sparrtmpv = arrpos('cumarrcnt',sparrcnt[cumarrtemp])
-				if sparrtmpv >= 0:
-					!!'Found guy id <<sparrtmpv>>'
-					if sparrage[cumarrtemp] < 4:
-						cumarrcpt[sparrtmpv] += sparrppt[cumarrtemp]/5
-					elseif sparrage[cumarrtemp] < 10:
-						cumarrcpt[sparrtmpv] += sparrppt[cumarrtemp]/30
-					end
-				end
-			elseif sparrloc[cumarrtemp] = 0:
-				sparrtmpv = arrpos('cumarrcnt',sparrcnt[cumarrtemp])
-				if sparrtmpv >= 0:
-					!!'Found guy id' & sparrtmpv
-					if sparrage[cumarrtemp] < 4:
-						cumarrcpt[sparrtmpv] += sparrppt[cumarrtemp]/40
-					elseif sparrage[cumarrtemp] < 10:
-						cumarrcpt[sparrtmpv] += sparrppt[cumarrtemp]/60
-					end
-				end
-			elseif sparrslc[cumarrtemp] = 1 and sparrage < 5:
-				if sparrloc[cumarrtemp] = 1:
-					cumarrcpt[sparrtmpv] = sparrppt[cumarrtemp]*sparrvol[cumarrtemp]/sparrage[cumarrtemp]/1000
-					cumarrppt[sparrtmpv] = sparrppt[cumarrtemp]
-					$cumarrnam[sparrtmpv] = $sparrnam[cumarrtemp]
-					cumarrage[sparrtmpv] = sparrage[cumarrtemp]
-					cumarrdel[sparrtmpv] = 1
-					cumarrkno[sparrtmpv] = -1
-					cumarrcon[sparrtmpv] = 0
-					cumarrcnt[sparrtmpv] = sparrcnt[cumarrtemp]
-				end
-			elseif sparrslc[cumarrtemp] = 3 and sparrage < 5:
-				if sparrloc[cumarrtemp] = 2:
-					cumarrcpt[sparrtmpv] = sparrppt[cumarrtemp]*sparrvol[cumarrtemp]/sparrage[cumarrtemp]/1000
-					cumarrppt[sparrtmpv] = sparrppt[cumarrtemp]
-					$cumarrnam[sparrtmpv] = $sparrnam[cumarrtemp]
-					cumarrage[sparrtmpv] = sparrage[cumarrtemp]
-					cumarrdel[sparrtmpv] = 3
-					cumarrkno[sparrtmpv] = -1
-					cumarrcon[sparrtmpv] = 0
-					cumarrcnt[sparrtmpv] = sparrcnt[cumarrtemp]
-				elseif sparrloc[cumarrtemp] = 4:
-					cumarrcpt[sparrtmpv] = sparrppt[cumarrtemp]*sparrvol[cumarrtemp]/sparrage[cumarrtemp]/1000
-					cumarrppt[sparrtmpv] = sparrppt[cumarrtemp]
-					$cumarrnam[sparrtmpv] = $sparrnam[cumarrtemp]
-					cumarrage[sparrtmpv] = sparrage[cumarrtemp]
-					cumarrdel[sparrtmpv] = 2
-					cumarrkno[sparrtmpv] = -1
-					cumarrcon[sparrtmpv] = 0
-					cumarrcnt[sparrtmpv] = sparrcnt[cumarrtemp]
-				end
-			elseif sparrslc[cumarrtemp] = 5 and sparrage < 5:
-				if sparrloc[cumarrtemp] = 3:
-					cumarrcpt[sparrtmpv] = sparrppt[cumarrtemp]*sparrvol[cumarrtemp]/sparrage[cumarrtemp]/1000
-					cumarrppt[sparrtmpv] = sparrppt[cumarrtemp]
-					$cumarrnam[sparrtmpv] = $sparrnam[cumarrtemp]
-					cumarrage[sparrtmpv] = sparrage[cumarrtemp]
-					cumarrdel[sparrtmpv] = 2
-					cumarrkno[sparrtmpv] = -1
-					cumarrcon[sparrtmpv] = 0
-					cumarrcnt[sparrtmpv] = sparrcnt[cumarrtemp]
-				elseif sparrloc[cumarrtemp] = 5:
-					cumarrcpt[sparrtmpv] = sparrppt[cumarrtemp]*sparrvol[cumarrtemp]/sparrage[cumarrtemp]/1000
-					cumarrppt[sparrtmpv] = sparrppt[cumarrtemp]
-					$cumarrnam[sparrtmpv] = $sparrnam[cumarrtemp]
-					cumarrage[sparrtmpv] = sparrage[cumarrtemp]
-					cumarrdel[sparrtmpv] = 3
-					cumarrkno[sparrtmpv] = -1
-					cumarrcon[sparrtmpv] = 0
-					cumarrcnt[sparrtmpv] = sparrcnt[cumarrtemp]
-				elseif sparrloc[cumarrtemp] = 6:
-					cumarrcpt[sparrtmpv] = sparrppt[cumarrtemp]*sparrvol[cumarrtemp]/sparrage[cumarrtemp]/1000
-					cumarrppt[sparrtmpv] = sparrppt[cumarrtemp]
-					$cumarrnam[sparrtmpv] = $sparrnam[cumarrtemp]
-					cumarrage[sparrtmpv] = sparrage[cumarrtemp]
-					cumarrdel[sparrtmpv] = 3
-					cumarrkno[sparrtmpv] = -1
-					cumarrcon[sparrtmpv] = 0
-					cumarrcnt[sparrtmpv] = sparrcnt[cumarrtemp]
-				end
-			end
-
-			if sparrloc[cumarrtemp] = 0 or sparrloc[cumarrtemp] = 3 or sparrloc[cumarrtemp] = 12:
-				sparrvol[cumarrtemp] -= sparrage[cumarrtemp]/2
-				if sparrvol[cumarrtemp] < 0:sparrvol[cumarrtemp] = 0
-			end
-			if sparrloc[cumarrtemp] = 0 and cumsumvag > 60: sparrslc[cumarrtemp] = 1
-			if sparrloc[cumarrtemp] = 3 and cumsumass > 60: sparrslc[cumarrtemp] = 1
-			if sparrloc[cumarrtemp] = 17:
-				cumcondslip += 1
-				if sparridt[cumarrtemp] >= 0:
-					cumcondslip_aware = 1
-				end
-				if sparrage[cumarrtemp] > 48:
-					cumcondslip_aware = 1
-					pcs_health -= rand(3,sparrage[cumarrtemp] - 45)
-					'<br><b><font color="red">You feel nauseous.</font></b>'
-				end
-			end
-			if sparrloc[cumarrtemp] ! 0 and sparrloc[cumarrtemp] ! 3 and sparrloc[cumarrtemp] ! 12 and isprok = 0 and sparrage < 5: sparrslc[cumarrtemp] += 1
-			sparrage[cumarrtemp] += 1
-			cumarrtemp += 1
-			ctemp[0] += sparrvol[cumarrtemp]
-			if sparrloc[cumarrtemp] = 0: ctemp[1] += sparrvol[cumarrtemp]
-			if sparrloc[cumarrtemp] = 3: ctemp[2] += sparrvol[cumarrtemp]
-		else
-			gs 'cum_cleanup', 'cleandeposit', cumarrtemp
-		end
-		if cumarrtemp < arrsize('sparrvol'): jump 'cumspaloop'
-		cumsumbod = ctemp[0]
-		cumsumvag = ctemp[1]
-		cumsumass = ctemp[2]
-		KILLVAR 'ctemp'
-	end
-	
-	
-	!! new milkgrowday function.
-	!! Not lactating yet, but there was milkdemand, meaning someone worked your nipples and breasts.
-	if lactate = 0 and milkoverdemand >= 0 and prolactinlvl >= 0:
-		if milkgrowday < daystart:
-			prolactinlvl += milkoverdemand/200
-			!! 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.
-			if milkoverdemand = 0 and pregchem = 0 and tits < 11:
-				temp_var = prolactinlvl - 10
-				if temp_var < 0:
-					prolactinlvl = 0
-				end
-				!! 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.
-				if prolactinlvl < 75 and total_milkinduce_growth > 0:
-					nbsize -= total_milkinduce_growth
-					prolactinlvl -= 10
-					total_milkinduce_growth = 0				
-				else
-					prolactinlvl -= 10
-				end
-				milkoverdemand = 0
-				milkgrowday = daystart				
-			elseif milkoverdemand > 0 and pregchem = 0 and tits < 11:
-				!! inducing without ever being pregnant
-				if prolactinlvl > 75 and kid <= 0:
-					if total_milkinduce_growth < 8:
-						total_milkinduce_growth += 1 + pumpinggrowth
-						nbsize += 1 + pumpinggrowth
-						pumpinggrowth = 0
-					else
-						pumpinggrowth = 0
-					end
-				!! inducing after being pregnant
-				elseif prolactinlvl > 75 and kid > 0:
-					if total_milkinduce_growth < (total_preg_growth/2):
-						total_milkinduce_growth += 1 + pumpinggrowth
-						nbsize += 1 + pumpinggrowth
-						pumpinggrowth = 0
-					end	
-				end
-				milkoverdemand = 0
-			elseif milkoverdemand >= 0 and pregchem > 0 and tits < 11:
-				if prolactinlvl > 75 and pregchem < 3000 and kid <= 0:
-					if total_milkinduce_growth < 8:
-						total_milkinduce_growth += 1 + pumpinggrowth
-						nbsize += 1 + pumpinggrowth
-						pumpinggrowth = 0
-					else
-						pumpinggrowth = 0
-					end
-				!! first breast growth with first pregnancy
-				elseif prolactinlvl >= 75 and pregchem >= 2000 and pregchem < 3000 and kid <= 0:
-					if rand(0,100) > 60:
-						first_preg_growth += 1
-						total_preg_growth += 1
-						if total_preg_growth > total_milkinduce_growth: nbsize += 1
-					end
-				!! there is little chance your breast grow additional sizes if you have more kids.
-				elseif prolactinlvl >= 75 and pregchem >= 2000 and pregchem < 3000 and kid > 0:
-					if first_preg_growth > total_preg_growth:
-						total_preg_growth += 1
-						if total_preg_growth > total_milkinduce_growth: nbsize += 1
-					else
-						if rand(0,100) > 95:
-							total_preg_growth += 1
-							if total_preg_growth > total_milkinduce_growth: nbsize += 1
-						end
-					end
-				!! inducing after being pregnant
-				elseif prolactinlvl > 75 and pregchem =< 3000 and kid > 0:
-					if total_milkinduce_growth < (total_preg_growth/2):
-						total_milkinduce_growth += 1 + pumpinggrowth
-						nbsize += 1 + pumpinggrowth
-						pumpinggrowth = 0
-					end	
-				end
-				milkoverdemand = 0
-				milkgrowday = daystart
-			end
-			milkgrowday = daystart
-		else
-			milkgrowday = daystart
-		end
-	elseif lactate > 0 and milkoverdemand => 0 and prolactinlvl >= 0:
-		lactatemm = func('$calc_lactatemm')
-		!! checking if induced or not and if girl went through pregnancy already.
-		if lactateinduced > 0 and kid <= 0:
-			if milkgrowday < daystart:
-				!! first breast growth with first pregnancy
-				if prolactinlvl >= 75 and pregchem >= 2000 and pregchem < 3000 and kid <= 0:
-					if rand(0,100) > 60:
-						first_preg_growth += 1
-						total_preg_growth += 1
-						if total_preg_growth > total_milkinduce_growth: nbsize += 1
-					end
-				end
-				if lactatemm > lactatemv:
-					lactatemv += lactaterate
-					temp_var = lactaterate/100
-					if temp_var <= 0: temp_var = 1
-					pcs_energy -= temp_var
-					if lactatemv > lactatemm: lactatemv = lactatemm
-				end
-				if milkoverdemand > 0 and breastpumped > 0:
-					!! lactationrate growing, so you make more milk the more demand there was in the day before.
-					temp_var = prolactinlvl + milkoverdemand/20
-					if  temp_var > 120:
-						prolactinlvl += milkoverdemand/20
-						!! uppon reaching a specific limit, the lactationrate will grow slower. Human body limits etc... you know
-						if lactaterate > 3500:
-							lactaterate += 5*(prolactinlvl/200)
-						elseif lactaterate > 6000:							
-							lactaterate += prolactinlvl/200
-						else
-							lactaterate += 10*(prolactinlvl/200)
-						end
-						prolactinlvl = 100
-					else
-						prolactinlvl = 100
-					end
-					'Your breasts tingle a bit more from milkproduction.'
-				elseif milkoverdemand = 0 and breastpumped > 0:
-					prolactinlvl = 100
-				elseif milkoverdemand = 0 and breastpumped = 0:
-					if lactaterate > 0:
-						temp_var = lactaterate/4
-						if temp_var < 1:temp_var = 0
-						lactaterate = temp_var
-						'Your breasts tingle a little less from milkproduction.'
-					elseif lactaterate = 0:
-						if pregchem < 1000:
-							lactate = 0
-							lactateinduced = 0
-							nbsize -= total_milkinduce_growth
-							'You notice that you stopped lactating.'
-						else
-							lactaterate = 1
-						end
-					else
-						lactaterate = 0
-					end
-				end			
-				milkgrowday = daystart
-				milkoverdemand = 0
-				breastpumped = 0
-			else
-				milkgrowday = daystart
-				if lactatemm >= lactatemv:
-					lactatemv += lactaterate
-					if lactatemv > lactatemm:
-						lactatemv = lactatemm
-						lact_engorgement += 1
-						if lact_engorgement > 2: lactatemess += 1
-					end
-				end
-			end
-			milkgrowday = daystart
-		else
-			if milkgrowday < daystart:
-				!! there is little chance your breast grow additional sizes if you have more kids.
-				if prolactinlvl >= 75 and pregchem >= 2000 and pregchem < 3000 and kid > 0:
-					if first_preg_growth > total_preg_growth:
-						total_preg_growth += 1
-						if total_preg_growth > total_milkinduce_growth: nbsize += 1
-					else
-						if rand(0,100) > 95:
-							total_preg_growth += 1
-							if total_preg_growth > total_milkinduce_growth: nbsize += 1
-						end
-					end
-				end				
-				if lactatemm > lactatemv:
-					lactatemv += lactaterate
-					temp_var = lactaterate/100
-					if temp_var <= 0: temp_var = 1
-					pcs_energy -= temp_var
-					if lactatemv > lactatemm: lactatemv = lactatemm
-				end
-				if milkoverdemand > 0 and breastpumped > 0:
-					!! lactationrate growing, so you make more milk the more demand there was in the day before.
-					temp_var = prolactinlvl + milkoverdemand/10
-					if  temp_var > rand(150,200):
-						prolactinlvl += milkoverdemand/20
-						!! uppon reaching a specific limit, the lactationrate will grow slower. Human body limits etc... you know :D
-						if lactaterate > 3500:
-							lactaterate += 5*(prolactinlvl/200)
-						elseif lactaterate > 6000:							
-							lactaterate += prolactinlvl/200
-						else
-							lactaterate += 10*(prolactinlvl/200)
-						end
-						prolactinlvl = 100
-					else
-						prolactinlvl = 100
-					end
-					'Your breasts tingle a bit more from milkproduction.'
-				elseif milkoverdemand = 0 and breastpumped > 0:
-					prolactinlvl = 100
-				else
-					if lactaterate > 0:
-						temp_var = lactaterate/8
-						if temp_var < 1:temp_var = 0
-						lactaterate = temp_var
-						milkoverdemand = 0
-						'Your breasts tingle a little less from milkproduction.'
-					elseif lactaterate = 0:
-						lactate = 0
-						lactateinduced = 0
-						if total_milkinduce_growth > 0: nbsize -= total_milkinduce_growth
-						if total_preg_growth > 0:
-							nbsize -= total_preg_growth
-							nbsize += first_preg_growth/2
-						end
-						milkoverdemand = 0
-						'You stopped lactating.'
-					else
-						lactaterate = 0
-					end
-				end				
-				milkgrowday = daystart
-				milkoverdemand = 0
-				breastpumped = 0
-			else
-				milkgrowday = daystart
-				if lactatemm >= lactatemv:
-					lactatemv += lactaterate
-					if lactatemv > lactatemm:
-						lactatemv = lactatemm
-						lact_engorgement += 1
-						if lact_engorgement > 2: lactatemess += 1
-					end
-				end
-			end
-			milkgrowday = daystart
-		end
-		milkgrowday = daystart
-	end
-
-	if cycle <= 0:
-		gs 'femcyc', 'cyc0'
-	elseif cycle = 1:
-		gs 'femcyc', 'cyc1'
-	elseif cycle = 2:
-		gs 'femcyc', 'cyc2'
-	elseif cycle = 3:
-		gs 'femcyc', 'cyc3'
-	elseif cycle = 4:
-		gs 'femcyc', 'cyc4'
-	elseif cycle = 5:
-		gs 'femcyc', 'preg'
-	end
-
-	dynamic $d_cycreport_update
-end
-
-
-!{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.}
-
-if $ARGS[0] = 'cyc0':
-	if mesec <= 0:
-		lastmens = daystart
-		cycle = 1
-		mesec = 0
-		if rand(0,1000) = 1000:
-			EggRH = rand(20,80)
-		else
-			EggRH = 0
-		end
-		FocH += EggRH
-	else
-		mesec -= 1
-		FocH += 1
-	end
-end
-
-
-!{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.}
-
-if $ARGS[0] = 'cyc1':
-	FertEgg = 0
-	if FocH <= FocH_Max:
-		if pillcon <= 7000: EggRH += 1
-		if rand(0,9) = 0: EggRH += 1
-		FocH += 1
-		temprand = rand(0,9) - sterileov + tempovbonus
-		if temprand < 0: 
-			EggRH -= 1
-		elseif temprand > 9: 
-			EggRH += 1
-		end
-	else
-		!! the setting of the max_time can be here although it can be changed in the future
-		LutH_Max = rand(312,360) & !! 13-15 days including ovulation
-		!{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.}
-		Temprand = rand(0,20)
-		Temprand += age/15
-		Temprand -= pillcon/1000
-		if temprand > 20:
-			EggRH += 205
-			Temprand = rand(0,20)
-			Temprand += age/15
-			if temprand > 20: EggRH += 410
-		end
-		FocH = 0
-		Ovulate = 24 + rand(0,20)
-		cycle = 2
-		ferteggage = 0
-	end
-end
-
-
-!!{Fertilization.}
-
-if $ARGS[0] = 'cyc2':
-	can_sz = arrsize('$cumarrnam')
-	if Ovulate > 0 and can_sz > 0 and UnfertEgg > 0:
-		KILLVAR 'cumtime'
-		KILLVAR 'cumfthname'
-		KILLVAR '$wombpotfath'
-		$cumfthname[0] = 'unknown'
-		cumtime[0] = 0
-		can_idx = 0
-		cum_total = 0
-!!{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.}
-		:FatherCumAnalyze
-			!! 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. 
-			!! If exists, just increase the amount of cum in the womb.
-			
-			!! $wombDNA: sperm in womb potent enough to cause pregnancy
-			!! wombAmount: how potent is the sperm of a guy
-			!! $wombName: the name of the NPC
-			y = arrsize('$wombDNA')
-			if arrpos('$wombDNA',$npc_dna[$cumarrnam[can_idx]]) = -1:
-				!! New guy, create place for him at the end of the array, storing his DNA, sperm amount and name
-				$wombDNA[y] = $npc_dna[$cumarrnam[can_idx]]
-				wombAmount[y] = cumarrcpt[can_idx]
-				$wombName[y] = $cumarrnam[can_idx]
-				
-			else
-				!! This DNA is in the womb, but does it belong to the same guy?
-				x = 0
-				z = 0
-				:LocalizeLoop
-					if $wombDNA[x] = $npc_dna[$cumarrnam[can_idx]] and $wombName[x] = $cumarrnam[can_idx]: wombAmount[x] += cumarrcpt[can_idx] & z = 1
-				if z = 0 and x < (y - 1):x += 1 & jump 'LocalizeLoop'
-				killvar 'x'
-				if z = 0:
-					!! 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
-					$wombDNA[y] = $npc_dna[$cumarrnam[can_idx]]
-					$wombName[y] = $cumarrnam[can_idx]
-					wombAmount[y] = cumarrcpt[can_idx]
-				end
-				killvar 'z'
-			end
-			killvar 'y'
-			
-			if cumarrkno[can_idx] = 1 and arrpos('$wombpotfath', $cumarrnam[can_idx]) < 0:$wombpotfath[arrsize('$wombpotfath')] = $cumarrnam[can_idx]
-			
-			!! 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.
-			if instr('14570',str(cumarrcon[can_idx])) > 0 and cumarrdel[can_idx] = 0 and cumarrkno[can_idx] >= 0:
-				!! If guy is recorded already, increase his cumtime, else record him for the first time.
-				if arrpos('$cumfthname', $cumarrnam[can_idx]) = -1:
-					$cumfthname[arrsize('$cumfthname')] = $cumarrnam[can_idx]
-					cumtime[arrsize('$cumfthname')] = 1
-				else
-					cumtime[arrpos('$cumfthname', $cumarrnam[can_idx])] += 1
-				end
-			end
-			
-			cum_total += cumarrcpt[can_idx]
-			
-		if can_idx < can_sz:can_idx += 1 & jump 'FatherCumAnalyze'
-
-		!! setting the default believed father if there is no difficult choice or there is no choice
-		if arrsize('$cumfthname') = 2 and cumtime[0] = 0:
-			$wombpotfath[0] = $cumfthname[1]
-		elseif arrsize('$cumfthname') = 1:
-			$wombpotfath[0] = $cumfthname[0]
-		end
-
-!!{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.}
-		KILLVAR '$cumfathlotto'
-		cfw_idx = 0
-		cfw_sz = arrsize('wombAmount')
-		:FathLottoLoop
-		if cfw_idx < cfw_sz:
-			cfl_ct = (wombAmount[cfw_idx] * 100) / cum_total
-			if cfl_ct < 1: cfl_ct = 1
-			cfl_idx = arrsize('$cumfathlotto')
-			:FathLottoAdd
-			if cfl_ct > 0:
-				$cumfathlotto[cfl_idx] = $wombName[cfw_idx]
-				$cumfatherDNA[cfl_idx] = $wombDNA[cfw_idx]
-				cfl_idx += 1
-				cfl_ct -= 1
-				jump 'FathLottoAdd'
-			end
-			cfw_idx += 1
-			jump 'FathLottoLoop'
-		end
-		killvar '$wombDNA'
-		killvar '$wombName'
-		killvar 'wombAmount'
-		cfl_sz = arrsize('$cumfathlotto')
-
-		egg_idx = 0
-		egg_sz = UnfertEgg
-		if cheat_NoPregnancy = 1:egg_idx = egg_sz
-		:FertLoop
-		if egg_idx < egg_sz:
-!!{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.}
-			fert_thresh = rand(1,250000)
-			if pillcon < 0: pillcon = 0
-			!!fert_thresh += pillcon
-			if steriletu = 1: fert_thresh += fert_thresh*30
-			if fert_thresh > 0 and broodcurse > 0: fert_thresh = fert_thresh / 2
-			if fert_thresh <= cum_total:
-				lotto_idx = rand(0, cfl_sz-1)
-				UnfertEgg -= 1
-				FertEgg += 1
-				nextbaby = arrsize('$ChildFath')
-				polkid[nextbaby] = rand(0, 1)
-				$kidname[nextbaby] = 'unborn'
-				kidage[nextbaby] = 0
-				daykid[nextbaby] = 0
-				monthkid[nextbaby] = 0
-				yearkid[nextbaby] = 0
-				Babyptype[nextbaby] = 0
-				$kid_dna[nextbaby] = func('DNA', 'generate', $pcs_dna, $npc_dna[$cumfathlotto[lotto_idx]])
-				$ChildFath[nextbaby] = $cumfathlotto[lotto_idx]
-				$ChildFathDNA[nextbaby] = $cumfatherDNA[lotto_idx]
-				if arrsize('$wombpotfath') = 1:
-					$ChildThFath[nextbaby] = $wombpotfath[0]
-				else
-					$ChildThFath[nextbaby] = 'unknown'
-				end
-				hairkid[nextbaby] = rand(0, 3)
-				eyeskid[nextbaby] = rand(0, 3)
-				ChildConType[nextbaby] = cumarrcon[nextbaby]
-				if fertegg > 1:
-					$childtype[nextbaby] = 'paternal twin'
-					$childtype[nextbaby-1] = 'paternal twin'
-				else
-					$childtype[nextbaby] = ''
-				end
-			end
-			egg_idx += 1
-			jump 'FertLoop'
-		end
-		killvar 'temp'
-		tempovbonus = 0
-	end
-
-!!{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.}
-	if pillcon > 26000 and rand(0,400) ! 0: EggRH = 0
-	:OviLoop
-	If EggRH > ((UnfertEgg + FertEgg) * 150):
-		UnfertEgg += 1
-		EggRH -= (200 * UnfertEgg)
-		jump 'OviLoop'
-	end
-	If ovulate <= 0:
-		cycle = 3
-		UnfertEgg = 0
-	end
-	if fertegg = 1 and ferteggage < 330:
-		if rand(0,(2000 - age*20)) = 0:
-			fertegg += 1
-			nextbaby = arrsize('$ChildFath')
-			polkid[nextbaby] = polkid[nextbaby-1]
-			$kidname[nextbaby] = 'unborn'
-			kidage[nextbaby] = 0
-			daykid[nextbaby] = 0
-			monthkid[nextbaby] = 0
-			yearkid[nextbaby] = 0
-			Babyptype[nextbaby] = Babyptype[nextbaby-1]
-			$ChildFath[nextbaby] = $ChildFath[nextbaby-1]
-			$ChildFathDNA[nextbaby] = $ChildFathDNA[nextbaby-1]
-			$kid_dna[nextbaby] = $kid_dna[nextbaby-1]
-			hairkid[nextbaby] = hairkid[nextbaby-1]
-			eyeskid[nextbaby] = eyeskid[nextbaby-1]
-			cumarrcon[nextbaby] = cumarrcon[nextbaby-1]
-			$childtype[nextbaby] = 'identical twin'
-			$childtype[nextbaby-1] = 'identical twin'
-		end
-	end
-	ferteggage += 1
-	Ovulate -= 1
-	LutH += 1
-end
-
-
-!{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.}
-!{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.}
-!{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.}
-
-if $ARGS[0] = 'cyc3':
-	if fertegg = 1 and ferteggage < 330:
-		if rand(0,(2000 - age*20)) = 0:
-			fertegg += 1
-			nextbaby = arrsize('$ChildFath')
-			polkid[nextbaby] = polkid[nextbaby-1]
-			$kidname[nextbaby] = 'unborn'
-			kidage[nextbaby] = 0
-			daykid[nextbaby] = 0
-			monthkid[nextbaby] = 0
-			yearkid[nextbaby] = 0
-			Babyptype[nextbaby] = Babyptype[nextbaby-1]
-			$ChildFath[nextbaby] = $ChildFath[nextbaby-1]
-			$ChildFathDNA[nextbaby] = $ChildFathDNA[nextbaby-1]
-			$kid_dna[nextbaby] = $kid_dna[nextbaby-1]
-			hairkid[nextbaby] = hairkid[nextbaby-1]
-			eyeskid[nextbaby] = eyeskid[nextbaby-1]
-			cumarrcon[nextbaby] = cumarrcon[nextbaby-1]
-			$childtype[nextbaby] = 'identical twin'
-			$childtype[nextbaby-1] = 'identical twin'
-		end
-	end
-	ferteggage += 1
-	implant_idx = 0
-	implant_sz = arrsize('Babyptype')
-
-	:implant_loop
-	if implant_idx < implant_sz:
-
-		if Babyptype[implant_idx] = 0:
-			imp_rand = rand(0,120000)
-
-			if ferteggage < 120 and broodcurse <= 0:
-				imp_rand += 170
-				imp_rand -= age * 10
-				if steriletu = 1: imp_rand -= 200
-
-				if imp_rand <= 0:
-					Babyptype[implant_idx] = 2
-					FertEgg -= 1
-					babyembryo += 1
-					PregChem = rand(10,30)
-					if preg = 0: preg = 1
-					implant_day = daystart
-					implant_hour = hour
-
-				end
-
-			else
-				imp_rand += sterilewb
-				imp_rand -= tempwbbonus
-				if broodcurse > 0 and ferteggage >= 120: imp_rand = 0
-
-				if imp_rand <= (1200 - (age * 7)):
-					Babyptype[implant_idx] = 1
-					FertEgg -= 1
-					babyembryo += 1
-					PregChem = rand(10,30)
-					if preg = 0: preg = 1
-					implant_day = daystart
-					implant_hour = hour
-
-				end
-				tempwbbonus = 0
-
-			end
-
-		end
-
-		implant_idx += 1
-		jump 'implant_loop'
-
-	end
-
-!!{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.}
-	if LutH > LutH_Max:
-		rej_idx = 0
-		rej_sz = arrsize('Babyptype')
-		:lutcycloop
-		if rej_idx < rej_sz:
-			if Babyptype[rej_idx] = 0:
-				KILLVAR 'polkid',tempbabyi
-				KILLVAR '$kidname',tempbabyi
-				KILLVAR 'kidage',tempbabyi
-				KILLVAR 'daykid',tempbabyi
-				KILLVAR 'monthkid',tempbabyi
-				KILLVAR 'yearkid',tempbabyi
-				KILLVAR 'Babyptype',tempbabyi
-				KILLVAR '$ChildFath',tempbabyi
-				KILLVAR '$ChildThFath',tempbabyi
-				KILLVAR 'hairkid',tempbabyi
-				KILLVAR 'eyeskid',tempbabyi
-				KILLVAR 'cumarrcon',tempbabyi
-				FertEgg -= 1
-			end
-			rej_idx += 1
-			jump 'lutcycloop'
-		end
-		LutH = 0
-		if preg = 1:
-			cycle = 5
-		elseif menoage <= age:
-			KILLVAR '$wombpotfath'
-			killvar '$cumfthname'
-			killvar '$cumfthusedname'
-			killvar 'cumtime'
-			cycle = 6
-		else
-			KILLVAR '$wombpotfath'
-			killvar '$cumfthname'
-			killvar '$cumfthusedname'
-			killvar 'cumtime'
-			!! the setting of the max_time can be here although it can be changed in the future
-			FocH_Max = rand(312,360) & !! 13-15 days including menstruation
-			temprand = rand(0,10)
-			if pillcon >= 38000 or rand(1,24) = 1:
-				EggRH = 0
-				cycle = 1
-				mesec = 0
-			else
-				cycle = 0
-				killvar 'abortionbirthdate'
-				if cyccustom = 1: daylastperiod = daystart
-				firstmens = daystart
-				temprand = rand(0,10)
-				if temprand = 0 and pillcon < 10000:
-					mesec = rand(104,136) & !! 120
-				elseif temprand < 9 and pillcon < 15000:
-					mesec = rand(76,104) & !!  96
-				elseif pillcon < 20000:
-					mesec = rand(52,76) & !! 72
-				else
-					mesec = rand(44,52) & !! 48
-				end
-			end
-		end
-	else
-		if preg = 1:PregChem += 1+pregspeedcheat
-		if rand(0,100) < 100: LutH += 1
-	end
-end
-
-!{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.}
-
-if $ARGS[0] = 'cyc4':
-	if RecovH <= 0:
-		cycle = 1
-		if cyccustom = 1:
-			knowpregloss = 0
-			knowpregrecover = 0
-		end
-		if rand(0,1000) = 1000:
-			EggRH = rand(20,80)
-		else
-			EggRH = 0
-		end
-		FocH = EggRH
-	else
-		RecovH -= 1
-		if rand(0,10) = 0: RecovH -= 1
-	end
-end
-
-
-!{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.}
-
-if $ARGS[0] = 'preg':
-	if fertegg = 1 and ferteggage < 330:
-		if rand(0,(2000 - age*20)) = 0:
-			babyembryo += 1
-			PregChem += rand(10,30)
-			nextbaby = arrsize('$ChildFath')
-			polkid[nextbaby] = polkid[nextbaby-1]
-			$kidname[nextbaby] = 'unborn'
-			kidage[nextbaby] = 0
-			daykid[nextbaby] = 0
-			monthkid[nextbaby] = 0
-			yearkid[nextbaby] = 0
-			Babyptype[nextbaby] = Babyptype[nextbaby-1]
-			$ChildFath[nextbaby] = $ChildFath[nextbaby-1]
-			hairkid[nextbaby] = hairkid[nextbaby-1]
-			eyeskid[nextbaby] = eyeskid[nextbaby-1]
-			cumarrcon[nextbaby] = cumarrcon[nextbaby-1]
-			$childtype[nextbaby] = 'identical twin'
-			$childtype[nextbaby-1] = 'identical twin'
-		end
-	end
-	PregChem += (1+pregspeedcheat)
-	temprand = rand(-400,800)
-	temprand -= (babyembryo-1)*588
-	if PregChem > 6573 + temprand and preg ! 2:
-		'A sharp pain pierces your abdomen, and you feel something flow down your legs. Your water has broken!'
-		$cycreport_txt = 'In labour'
-		arrmodtmp =arrsize('$ChildFath')
-		arrmodtmp -= (babyembryo+1)
-		:babyfinalpreploop
-		if arrmodtmp < arrsize('$ChildFath') and daykid[arrmodtmp] = 0:
-			daykid[arrmodtmp] = 42
-			$ChildThFath[arrmodtmp] = $wombthfath
-			arrmodtmp += 1
-			jump 'babyfinalpreploop'
-		end
-		KILLVAR '$wombpotfath'
-		KILLVAR '$wombthfath'
-		preg = 2
-		pregminut = totminut + 1440
-		if babyembryo > 1:
-			'Your babies are coming...'
-		else
-			'Your baby is coming...'
-		end
-		if PregChem < 3885:
-			'Way too early!'
-		elseif PregChem < 5229:
-			'Very early!'
-		elseif PregChem < 6069:
-			'Early.'
-		elseif PregChem > 6959:
-			'Late.'
-		elseif PregChem > 7245:
-			'Very Late!'
-		end
-		'You need to get to a clinic.'
-	end
-	if PregChem > 3887:
-		if lactate <= 0:
-			'You begin lactating'
-			lactate = 1
-			lactatemv = 0
-			lactatemm = func('$calc_lactatemm')
-			lacaterate = 10
-			prolactinlvl = 150
-		else
-			if lactate < 1: lactate = 1
-		end
-	end
-	if PregChem > 1000:
-		if prolactinlvl < 100 and lactate <= 0:
-			if rand(0,100) > 50:
-				prolactinlvl +=1
-			end
-		end
-	end
-	if PregChem > 2203:
-		if pregchem > 2853 or kid > 0:
-			if rand(0,7) = 0: dynamic $d_pregmovement
-		else
-			if rand(0,500) = 0: dynamic $d_pregmovement
-		end
-	end
-end
-
---- femcyc ---------------------------------
-
+# femcyc
+
+!! I have to initialize the variables somewhere, maybe in preCUST?
+if Luth_Max = 0: LutH_Max = rand(312,360) & !! 13-15 days including ovulation
+if Foch_Max = 0: FocH_Max = rand(312,360) & !! 13-15 days including menstruation
+		
+if $ARGS[0] = '':
+	!{Hourly reduction in semen potency}
+	!{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.}
+	!{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.}
+	!{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.}
+	!{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.}
+
+	if rcntorgzm = 1:
+		if rcntorgzmtmp = 1: rcntorgzm = 0 & rcntorgzmtmp = 0
+		if rcntorgzmtmp = 0: rcntorgzmtmp = 1
+
+	end
+
+	cumarr_idx = 0
+
+	:cumarrloop
+	if cumarr_idx < arrsize('$cumarrnam'):
+		if cumarrcpt[cumarr_idx] > 0 and cumarrage[cumarr_idx] < 144:
+			if rcntorgzm = 1 and cumarrcpt[cumarr_idx] < cumarrppt[cumarr_idx] and cumarrage[cumarr_idx] < 1: cumarrcpt[cumarr_idx] += cumarrppt[cumarr_idx] / 12
+			cumpdrop = cumarrcpt[cumarr_idx] / (144 - cumarrage[cumarr_idx])
+			if cycle ! 2: cumpdrop += cumpdrop * rand(0, 2)
+			cumarrcpt[cumarr_idx] -= cumpdrop
+			if cumarrcpt[cumarr_idx] <= 0:
+				gs 'cum_cleanup', 'cleanwomb', cumarr_idx
+			else
+				cumarrage[cumarr_idx] += 1
+				cumarr_idx += 1
+			end
+		else
+			gs 'cum_cleanup', 'cleanwomb', cumarr_idx
+		end
+
+		jump 'cumarrloop'
+
+	end
+
+	!!Succubus absorption of sperm in womb
+	if succubusflag = 1:
+		if arrsize('cumarrppt') > 0:
+			succycletmp = 0
+			:sucvagabs
+			if cumarrdel[succycletmp] = 0:
+				if cumarrcpt[succycletmp] > 10000:
+					sexnutrition += 30 * succublvl
+					succubxp += 3
+				elseif cumarrcpt[succycletmp] < 3000 and cumarrcpt[succycletmp] > 1000:
+					sexnutrition += 5 * succublvl
+					succubxp += 2
+				elseif cumarrcpt[succycletmp] =< 1000:
+					 sexnutrition += succublvl
+				else
+					sexnutrition += 25 * succublvl
+					succubxp += 3
+				end
+				gs 'cum_cleanup', 'cleanwomb', succycletmp
+				sucabscum = 1
+			else
+				succycletmp += 1
+			end
+			if succycletmp < arrsize('cumarrppt'): jump 'sucvagabs'
+		end
+		killvar 'succycletmp'
+	end
+
+	cumarrtemp = 0
+	cumcondslip = 0
+	cumcondslip_aware = 0
+	if arrsize('sparrvol') > 0:
+		:cumspaloop
+		!!Succubus absorption for internal locations other than womb
+		if succubusflag = 1:
+			if sparrloc[cumarrtemp] = 3 or sparrloc[cumarrtemp] = 12:
+				sexnutrition += 25*succublvl
+				succubxp += 3
+				sucabscum = 1
+				if sparrvol[cumarrtemp] > 0: sparrvol[cumarrtemp] = 0
+			end
+		end
+		!!{if sparrloc[cumarrtemp] = 0 or sparrloc[cumarrtemp] = 3 or sparrloc[cumarrtemp] = 12:
+			sexnutrition += 30*succublvl
+			sparrvol[cumarrtemp] -= 30*succublvl
+			if sparrvol[cumarrtemp] < 0: sexnutrition += sparrvol[cumarrtemp] & sparrvol[cumarrtemp] = 0
+		end}
+		!!{ Process spatter until it has volume or is too old in vagina. }
+		if sparrvol[cumarrtemp] > 0 or (sparrloc[cumarrtemp] = 0 and sparrage[cumarrtemp] < 10):
+			sparrtmpv = arrsize('$cumarrnam')
+			if sparrloc[cumarrtemp] = 17:
+				sparrtmpv = arrpos('cumarrcnt',sparrcnt[cumarrtemp])
+				if sparrtmpv >= 0:
+					!!'Found guy id <<sparrtmpv>>'
+					if sparrage[cumarrtemp] < 4:
+						cumarrcpt[sparrtmpv] += sparrppt[cumarrtemp]/5
+					elseif sparrage[cumarrtemp] < 10:
+						cumarrcpt[sparrtmpv] += sparrppt[cumarrtemp]/30
+					end
+				end
+			elseif sparrloc[cumarrtemp] = 0:
+				sparrtmpv = arrpos('cumarrcnt',sparrcnt[cumarrtemp])
+				if sparrtmpv >= 0:
+					!!'Found guy id' & sparrtmpv
+					if sparrage[cumarrtemp] < 4:
+						cumarrcpt[sparrtmpv] += sparrppt[cumarrtemp]/40
+					elseif sparrage[cumarrtemp] < 10:
+						cumarrcpt[sparrtmpv] += sparrppt[cumarrtemp]/60
+					end
+				end
+			elseif sparrslc[cumarrtemp] = 1 and sparrage < 5:
+				if sparrloc[cumarrtemp] = 1:
+					cumarrcpt[sparrtmpv] = sparrppt[cumarrtemp]*sparrvol[cumarrtemp]/sparrage[cumarrtemp]/1000
+					cumarrppt[sparrtmpv] = sparrppt[cumarrtemp]
+					$cumarrnam[sparrtmpv] = $sparrnam[cumarrtemp]
+					cumarrage[sparrtmpv] = sparrage[cumarrtemp]
+					cumarrdel[sparrtmpv] = 1
+					cumarrkno[sparrtmpv] = -1
+					cumarrcon[sparrtmpv] = 0
+					cumarrcnt[sparrtmpv] = sparrcnt[cumarrtemp]
+				end
+			elseif sparrslc[cumarrtemp] = 3 and sparrage < 5:
+				if sparrloc[cumarrtemp] = 2:
+					cumarrcpt[sparrtmpv] = sparrppt[cumarrtemp]*sparrvol[cumarrtemp]/sparrage[cumarrtemp]/1000
+					cumarrppt[sparrtmpv] = sparrppt[cumarrtemp]
+					$cumarrnam[sparrtmpv] = $sparrnam[cumarrtemp]
+					cumarrage[sparrtmpv] = sparrage[cumarrtemp]
+					cumarrdel[sparrtmpv] = 3
+					cumarrkno[sparrtmpv] = -1
+					cumarrcon[sparrtmpv] = 0
+					cumarrcnt[sparrtmpv] = sparrcnt[cumarrtemp]
+				elseif sparrloc[cumarrtemp] = 4:
+					cumarrcpt[sparrtmpv] = sparrppt[cumarrtemp]*sparrvol[cumarrtemp]/sparrage[cumarrtemp]/1000
+					cumarrppt[sparrtmpv] = sparrppt[cumarrtemp]
+					$cumarrnam[sparrtmpv] = $sparrnam[cumarrtemp]
+					cumarrage[sparrtmpv] = sparrage[cumarrtemp]
+					cumarrdel[sparrtmpv] = 2
+					cumarrkno[sparrtmpv] = -1
+					cumarrcon[sparrtmpv] = 0
+					cumarrcnt[sparrtmpv] = sparrcnt[cumarrtemp]
+				end
+			elseif sparrslc[cumarrtemp] = 5 and sparrage < 5:
+				if sparrloc[cumarrtemp] = 3:
+					cumarrcpt[sparrtmpv] = sparrppt[cumarrtemp]*sparrvol[cumarrtemp]/sparrage[cumarrtemp]/1000
+					cumarrppt[sparrtmpv] = sparrppt[cumarrtemp]
+					$cumarrnam[sparrtmpv] = $sparrnam[cumarrtemp]
+					cumarrage[sparrtmpv] = sparrage[cumarrtemp]
+					cumarrdel[sparrtmpv] = 2
+					cumarrkno[sparrtmpv] = -1
+					cumarrcon[sparrtmpv] = 0
+					cumarrcnt[sparrtmpv] = sparrcnt[cumarrtemp]
+				elseif sparrloc[cumarrtemp] = 5:
+					cumarrcpt[sparrtmpv] = sparrppt[cumarrtemp]*sparrvol[cumarrtemp]/sparrage[cumarrtemp]/1000
+					cumarrppt[sparrtmpv] = sparrppt[cumarrtemp]
+					$cumarrnam[sparrtmpv] = $sparrnam[cumarrtemp]
+					cumarrage[sparrtmpv] = sparrage[cumarrtemp]
+					cumarrdel[sparrtmpv] = 3
+					cumarrkno[sparrtmpv] = -1
+					cumarrcon[sparrtmpv] = 0
+					cumarrcnt[sparrtmpv] = sparrcnt[cumarrtemp]
+				elseif sparrloc[cumarrtemp] = 6:
+					cumarrcpt[sparrtmpv] = sparrppt[cumarrtemp]*sparrvol[cumarrtemp]/sparrage[cumarrtemp]/1000
+					cumarrppt[sparrtmpv] = sparrppt[cumarrtemp]
+					$cumarrnam[sparrtmpv] = $sparrnam[cumarrtemp]
+					cumarrage[sparrtmpv] = sparrage[cumarrtemp]
+					cumarrdel[sparrtmpv] = 3
+					cumarrkno[sparrtmpv] = -1
+					cumarrcon[sparrtmpv] = 0
+					cumarrcnt[sparrtmpv] = sparrcnt[cumarrtemp]
+				end
+			end
+
+			if sparrloc[cumarrtemp] = 0 or sparrloc[cumarrtemp] = 3 or sparrloc[cumarrtemp] = 12:
+				sparrvol[cumarrtemp] -= sparrage[cumarrtemp]/2
+				if sparrvol[cumarrtemp] < 0:sparrvol[cumarrtemp] = 0
+			end
+			if sparrloc[cumarrtemp] = 0 and cumsumvag > 60: sparrslc[cumarrtemp] = 1
+			if sparrloc[cumarrtemp] = 3 and cumsumass > 60: sparrslc[cumarrtemp] = 1
+			if sparrloc[cumarrtemp] = 17:
+				cumcondslip += 1
+				if sparridt[cumarrtemp] >= 0:
+					cumcondslip_aware = 1
+				end
+				if sparrage[cumarrtemp] > 48:
+					cumcondslip_aware = 1
+					pcs_health -= rand(3,sparrage[cumarrtemp] - 45)
+					'<br><b><font color="red">You feel nauseous.</font></b>'
+				end
+			end
+			if sparrloc[cumarrtemp] ! 0 and sparrloc[cumarrtemp] ! 3 and sparrloc[cumarrtemp] ! 12 and isprok = 0 and sparrage < 5: sparrslc[cumarrtemp] += 1
+			sparrage[cumarrtemp] += 1
+			cumarrtemp += 1
+			ctemp[0] += sparrvol[cumarrtemp]
+			if sparrloc[cumarrtemp] = 0: ctemp[1] += sparrvol[cumarrtemp]
+			if sparrloc[cumarrtemp] = 3: ctemp[2] += sparrvol[cumarrtemp]
+		else
+			gs 'cum_cleanup', 'cleandeposit', cumarrtemp
+		end
+		if cumarrtemp < arrsize('sparrvol'): jump 'cumspaloop'
+		cumsumbod = ctemp[0]
+		cumsumvag = ctemp[1]
+		cumsumass = ctemp[2]
+		KILLVAR 'ctemp'
+	end
+	
+	
+	!! new milkgrowday function.
+	!! Not lactating yet, but there was milkdemand, meaning someone worked your nipples and breasts.
+	if lactate = 0 and milkoverdemand >= 0 and prolactinlvl >= 0:
+		if milkgrowday < daystart:
+			prolactinlvl += milkoverdemand/200
+			!! 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.
+			if milkoverdemand = 0 and pregchem = 0 and tits < 11:
+				temp_var = prolactinlvl - 10
+				if temp_var < 0:
+					prolactinlvl = 0
+				end
+				!! 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.
+				if prolactinlvl < 75 and total_milkinduce_growth > 0:
+					nbsize -= total_milkinduce_growth
+					prolactinlvl -= 10
+					total_milkinduce_growth = 0				
+				else
+					prolactinlvl -= 10
+				end
+				milkoverdemand = 0
+				milkgrowday = daystart				
+			elseif milkoverdemand > 0 and pregchem = 0 and tits < 11:
+				!! inducing without ever being pregnant
+				if prolactinlvl > 75 and kid <= 0:
+					if total_milkinduce_growth < 8:
+						total_milkinduce_growth += 1 + pumpinggrowth
+						nbsize += 1 + pumpinggrowth
+						pumpinggrowth = 0
+					else
+						pumpinggrowth = 0
+					end
+				!! inducing after being pregnant
+				elseif prolactinlvl > 75 and kid > 0:
+					if total_milkinduce_growth < (total_preg_growth/2):
+						total_milkinduce_growth += 1 + pumpinggrowth
+						nbsize += 1 + pumpinggrowth
+						pumpinggrowth = 0
+					end	
+				end
+				milkoverdemand = 0
+			elseif milkoverdemand >= 0 and pregchem > 0 and tits < 11:
+				if prolactinlvl > 75 and pregchem < 3000 and kid <= 0:
+					if total_milkinduce_growth < 8:
+						total_milkinduce_growth += 1 + pumpinggrowth
+						nbsize += 1 + pumpinggrowth
+						pumpinggrowth = 0
+					else
+						pumpinggrowth = 0
+					end
+				!! first breast growth with first pregnancy
+				elseif prolactinlvl >= 75 and pregchem >= 2000 and pregchem < 3000 and kid <= 0:
+					if rand(0,100) > 55:
+						first_preg_growth += 1
+						total_preg_growth += 1
+						if total_preg_growth > total_milkinduce_growth: nbsize += 1
+					end
+				!! there is little chance your breast grow additional sizes if you have more kids.
+				elseif prolactinlvl >= 75 and pregchem >= 2000 and pregchem < 3000 and kid > 0:
+					if first_preg_growth > total_preg_growth:
+						total_preg_growth += 1
+						if total_preg_growth > total_milkinduce_growth: nbsize += 1
+					else
+						if rand(0,100) > 95:
+							total_preg_growth += 1
+							if total_preg_growth > total_milkinduce_growth: nbsize += 1
+						end
+					end
+				!! inducing after being pregnant
+				elseif prolactinlvl > 75 and pregchem =< 3000 and kid > 0:
+					if total_milkinduce_growth < (total_preg_growth/2):
+						total_milkinduce_growth += 1 + pumpinggrowth
+						nbsize += 1 + pumpinggrowth
+						pumpinggrowth = 0
+					end	
+				end
+				milkoverdemand = 0
+				milkgrowday = daystart
+			end
+			milkgrowday = daystart
+		else
+			milkgrowday = daystart
+		end
+	elseif lactate > 0 and milkoverdemand => 0 and prolactinlvl >= 0:
+		lactatemm = func('$calc_lactatemm')
+		!! checking if induced or not and if girl went through pregnancy already.
+		if lactateinduced > 0 and kid <= 0:
+			if milkgrowday < daystart:
+				!! first breast growth with first pregnancy
+				if prolactinlvl >= 75 and pregchem >= 2000 and pregchem < 3000 and kid <= 0:
+					if rand(0,100) > 55:
+						first_preg_growth += 1
+						total_preg_growth += 1
+						if total_preg_growth > total_milkinduce_growth: nbsize += 1
+					end
+				end
+				if lactatemm > lactatemv:
+					lactatemv += lactaterate
+					temp_var = lactaterate/100
+					if temp_var <= 0: temp_var = 1
+					pcs_energy -= temp_var
+					if lactatemv > lactatemm: lactatemv = lactatemm
+				end
+				if milkoverdemand > 0 and breastpumped > 0:
+					!! lactationrate growing, so you make more milk the more demand there was in the day before.
+					temp_var = prolactinlvl + milkoverdemand/20
+					if  temp_var > 120:
+						prolactinlvl += milkoverdemand/20
+						!! uppon reaching a specific limit, the lactationrate will grow slower. Human body limits etc... you know
+						if lactaterate > 3500:
+							lactaterate += 5*(prolactinlvl/200)
+						elseif lactaterate > 6000:							
+							lactaterate += prolactinlvl/200
+						else
+							lactaterate += 10*(prolactinlvl/200)
+						end
+						prolactinlvl = 100
+					else
+						prolactinlvl = 100
+					end
+					'Your breasts tingle a bit more from milkproduction.'
+				elseif milkoverdemand = 0 and breastpumped > 0:
+					prolactinlvl = 100
+				elseif milkoverdemand = 0 and breastpumped = 0:
+					if lactaterate > 0 and pregchem >=0:
+						temp_var = lactaterate/4
+						if temp_var < 1:temp_var = 0
+						lactaterate = temp_var
+						'Your breasts tingle a little less from milkproduction.'
+					elseif lactaterate = 0 and pregchem < 1000:
+						lactate = 0
+						lactateinduced = 0
+						nbsize -= total_milkinduce_growth
+						'You notice that you stopped lactating.'
+					elseif lactaterate = 0 and pregchem >= 1000:
+						lactaterate = 1
+					else
+						lactaterate = 0
+					end
+				end			
+				milkgrowday = daystart
+				milkoverdemand = 0
+				breastpumped = 0
+			else
+				milkgrowday = daystart
+				if lactatemm >= lactatemv:
+					lactatemv += lactaterate
+					if lactatemv > lactatemm:
+						lactatemv = lactatemm
+						lact_engorgement += 1
+						if lact_engorgement > 2: lactatemess += 1
+					end
+				end
+			end
+			milkgrowday = daystart
+		else
+			if milkgrowday < daystart:
+				if lactatemm > lactatemv:
+					lactatemv += lactaterate
+					temp_var = lactaterate/100
+					if temp_var <= 0: temp_var = 1
+					pcs_energy -= temp_var
+					if lactatemv > lactatemm: lactatemv = lactatemm
+				end
+				if milkoverdemand > 0 and breastpumped > 0:
+					!! lactationrate growing, so you make more milk the more demand there was in the day before.
+					temp_var = prolactinlvl + milkoverdemand/10
+					if  temp_var > rand(150,200):
+						prolactinlvl += milkoverdemand/20
+						!! uppon reaching a specific limit, the lactationrate will grow slower. Human body limits etc... you know :D
+						if lactaterate > 3500:
+							lactaterate += 5*(prolactinlvl/200)
+						elseif lactaterate > 6000:							
+							lactaterate += prolactinlvl/200
+						else
+							lactaterate += 10*(prolactinlvl/200)
+						end
+						prolactinlvl = 100
+					else
+						prolactinlvl = 100
+					end
+					'Your breasts tingle a bit more from milkproduction.'
+				elseif milkoverdemand = 0 and breastpumped > 0:
+					prolactinlvl = 100
+				else
+					if lactaterate > 0 and pregchem >= 0:
+						temp_var = lactaterate/8
+						if temp_var < 1:temp_var = 0
+						lactaterate = temp_var
+						milkoverdemand = 0
+						'Your breasts tingle a little less from milkproduction.'
+					elseif lactaterate = 0 and pregchem < 1000:
+						lactate = 0
+						lactateinduced = 0
+						if total_milkinduce_growth > 0: nbsize -= total_milkinduce_growth
+						if total_preg_growth > 0:
+							nbsize -= total_preg_growth
+							nbsize += first_preg_growth/2
+						end
+						total_milkinduce_growth = 0
+						milkoverdemand = 0
+						'You stopped lactating.'
+					elseif lactaterate = 0 and pregchem >= 1000:
+						lactaterate = 1
+					else
+						lactaterate = 0
+					end
+				end				
+				milkgrowday = daystart
+				milkoverdemand = 0
+				breastpumped = 0
+			else
+				milkgrowday = daystart
+				if lactatemm >= lactatemv:
+					lactatemv += lactaterate
+					if lactatemv > lactatemm:
+						lactatemv = lactatemm
+						lact_engorgement += 1
+						if lact_engorgement > 2: lactatemess += 1
+					end
+				end
+			end
+			milkgrowday = daystart
+		end
+		milkgrowday = daystart
+	end
+
+	if cycle <= 0:
+		gs 'femcyc', 'cyc0'
+	elseif cycle = 1:
+		gs 'femcyc', 'cyc1'
+	elseif cycle = 2:
+		gs 'femcyc', 'cyc2'
+	elseif cycle = 3:
+		gs 'femcyc', 'cyc3'
+	elseif cycle = 4:
+		gs 'femcyc', 'cyc4'
+	elseif cycle = 5:
+		gs 'femcyc', 'preg'
+	end
+
+	dynamic $d_cycreport_update
+end
+
+
+!{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.}
+
+if $ARGS[0] = 'cyc0':
+	if mesec <= 0:
+		lastmens = daystart
+		cycle = 1
+		mesec = 0
+		if rand(0,1000) = 1000:
+			EggRH = rand(20,80)
+		else
+			EggRH = 0
+		end
+		FocH += EggRH
+	else
+		mesec -= 1
+		FocH += 1
+	end
+end
+
+
+!{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.}
+
+if $ARGS[0] = 'cyc1':
+	FertEgg = 0
+	if FocH <= FocH_Max:
+		if pillcon <= 7000: EggRH += 1
+		if rand(0,9) = 0: EggRH += 1
+		FocH += 1
+		temprand = rand(0,9) - sterileov + tempovbonus
+		if temprand < 0: 
+			EggRH -= 1
+		elseif temprand > 9: 
+			EggRH += 1
+		end
+	else
+		!! the setting of the max_time can be here although it can be changed in the future
+		LutH_Max = rand(312,360) & !! 13-15 days including ovulation
+		!{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.}
+		Temprand = rand(0,20)
+		Temprand += age/15
+		Temprand -= pillcon/1000
+		if temprand > 20:
+			EggRH += 205
+			Temprand = rand(0,20)
+			Temprand += age/15
+			if temprand > 20: EggRH += 410
+		end
+		FocH = 0
+		Ovulate = 24 + rand(0,20)
+		cycle = 2
+		ferteggage = 0
+	end
+end
+
+
+!!{Fertilization.}
+
+if $ARGS[0] = 'cyc2':
+	can_sz = arrsize('$cumarrnam')
+	if Ovulate > 0 and can_sz > 0 and UnfertEgg > 0:
+		KILLVAR 'cumtime'
+		KILLVAR 'cumfthname'
+		KILLVAR '$wombpotfath'
+		$cumfthname[0] = 'unknown'
+		cumtime[0] = 0
+		can_idx = 0
+		cum_total = 0
+!!{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.}
+		:FatherCumAnalyze
+			!! 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. 
+			!! If exists, just increase the amount of cum in the womb.
+			
+			!! $wombDNA: sperm in womb potent enough to cause pregnancy
+			!! wombAmount: how potent is the sperm of a guy
+			!! $wombName: the name of the NPC
+			y = arrsize('$wombDNA')
+			if arrpos('$wombDNA',$npc_dna[$cumarrnam[can_idx]]) = -1:
+				!! New guy, create place for him at the end of the array, storing his DNA, sperm amount and name
+				$wombDNA[y] = $npc_dna[$cumarrnam[can_idx]]
+				wombAmount[y] = cumarrcpt[can_idx]
+				$wombName[y] = $cumarrnam[can_idx]
+				
+			else
+				!! This DNA is in the womb, but does it belong to the same guy?
+				x = 0
+				z = 0
+				:LocalizeLoop
+					if $wombDNA[x] = $npc_dna[$cumarrnam[can_idx]] and $wombName[x] = $cumarrnam[can_idx]: wombAmount[x] += cumarrcpt[can_idx] & z = 1
+				if z = 0 and x < (y - 1):x += 1 & jump 'LocalizeLoop'
+				killvar 'x'
+				if z = 0:
+					!! 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
+					$wombDNA[y] = $npc_dna[$cumarrnam[can_idx]]
+					$wombName[y] = $cumarrnam[can_idx]
+					wombAmount[y] = cumarrcpt[can_idx]
+				end
+				killvar 'z'
+			end
+			killvar 'y'
+			
+			if cumarrkno[can_idx] = 1 and arrpos('$wombpotfath', $cumarrnam[can_idx]) < 0:$wombpotfath[arrsize('$wombpotfath')] = $cumarrnam[can_idx]
+			
+			!! 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.
+			if instr('14570',str(cumarrcon[can_idx])) > 0 and cumarrdel[can_idx] = 0 and cumarrkno[can_idx] >= 0:
+				!! If guy is recorded already, increase his cumtime, else record him for the first time.
+				if arrpos('$cumfthname', $cumarrnam[can_idx]) = -1:
+					$cumfthname[arrsize('$cumfthname')] = $cumarrnam[can_idx]
+					cumtime[arrsize('$cumfthname')] = 1
+				else
+					cumtime[arrpos('$cumfthname', $cumarrnam[can_idx])] += 1
+				end
+			end
+			
+			cum_total += cumarrcpt[can_idx]
+			
+		if can_idx < can_sz:can_idx += 1 & jump 'FatherCumAnalyze'
+
+		!! setting the default believed father if there is no difficult choice or there is no choice
+		if arrsize('$cumfthname') = 2 and cumtime[0] = 0:
+			$wombpotfath[0] = $cumfthname[1]
+		elseif arrsize('$cumfthname') = 1:
+			$wombpotfath[0] = $cumfthname[0]
+		end
+
+!!{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.}
+		KILLVAR '$cumfathlotto'
+		cfw_idx = 0
+		cfw_sz = arrsize('wombAmount')
+		:FathLottoLoop
+		if cfw_idx < cfw_sz:
+			cfl_ct = (wombAmount[cfw_idx] * 100) / cum_total
+			if cfl_ct < 1: cfl_ct = 1
+			cfl_idx = arrsize('$cumfathlotto')
+			:FathLottoAdd
+			if cfl_ct > 0:
+				$cumfathlotto[cfl_idx] = $wombName[cfw_idx]
+				$cumfatherDNA[cfl_idx] = $wombDNA[cfw_idx]
+				cfl_idx += 1
+				cfl_ct -= 1
+				jump 'FathLottoAdd'
+			end
+			cfw_idx += 1
+			jump 'FathLottoLoop'
+		end
+		killvar '$wombDNA'
+		killvar '$wombName'
+		killvar 'wombAmount'
+		cfl_sz = arrsize('$cumfathlotto')
+
+		egg_idx = 0
+		egg_sz = UnfertEgg
+		if cheat_NoPregnancy = 1:egg_idx = egg_sz
+		:FertLoop
+		if egg_idx < egg_sz:
+!!{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.}
+			fert_thresh = rand(1,250000)
+			if pillcon < 0: pillcon = 0
+			!!fert_thresh += pillcon
+			if steriletu = 1: fert_thresh += fert_thresh*30
+			if fert_thresh > 0 and broodcurse > 0: fert_thresh = fert_thresh / 2
+			if fert_thresh <= cum_total:
+				lotto_idx = rand(0, cfl_sz-1)
+				UnfertEgg -= 1
+				FertEgg += 1
+				nextbaby = arrsize('$ChildFath')
+				polkid[nextbaby] = rand(0, 1)
+				$kidname[nextbaby] = 'unborn'
+				kidage[nextbaby] = 0
+				daykid[nextbaby] = 0
+				monthkid[nextbaby] = 0
+				yearkid[nextbaby] = 0
+				Babyptype[nextbaby] = 0
+				$kid_dna[nextbaby] = func('DNA', 'generate', $pcs_dna, $npc_dna[$cumfathlotto[lotto_idx]])
+				$ChildFath[nextbaby] = $cumfathlotto[lotto_idx]
+				$ChildFathDNA[nextbaby] = $cumfatherDNA[lotto_idx]
+				if arrsize('$wombpotfath') = 1:
+					$ChildThFath[nextbaby] = $wombpotfath[0]
+				else
+					$ChildThFath[nextbaby] = 'unknown'
+				end
+				hairkid[nextbaby] = rand(0, 3)
+				eyeskid[nextbaby] = rand(0, 3)
+				ChildConType[nextbaby] = cumarrcon[nextbaby]
+				if fertegg > 1:
+					$childtype[nextbaby] = 'paternal twin'
+					$childtype[nextbaby-1] = 'paternal twin'
+				else
+					$childtype[nextbaby] = ''
+				end
+			end
+			egg_idx += 1
+			jump 'FertLoop'
+		end
+		killvar 'temp'
+		tempovbonus = 0
+	end
+
+!!{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.}
+	if pillcon > 26000 and rand(0,400) ! 0: EggRH = 0
+	:OviLoop
+	If EggRH > ((UnfertEgg + FertEgg) * 150):
+		UnfertEgg += 1
+		EggRH -= (200 * UnfertEgg)
+		jump 'OviLoop'
+	end
+	If ovulate <= 0:
+		cycle = 3
+		UnfertEgg = 0
+	end
+	if fertegg = 1 and ferteggage < 330:
+		if rand(0,(2000 - age*20)) = 0:
+			fertegg += 1
+			nextbaby = arrsize('$ChildFath')
+			polkid[nextbaby] = polkid[nextbaby-1]
+			$kidname[nextbaby] = 'unborn'
+			kidage[nextbaby] = 0
+			daykid[nextbaby] = 0
+			monthkid[nextbaby] = 0
+			yearkid[nextbaby] = 0
+			Babyptype[nextbaby] = Babyptype[nextbaby-1]
+			$ChildFath[nextbaby] = $ChildFath[nextbaby-1]
+			$ChildFathDNA[nextbaby] = $ChildFathDNA[nextbaby-1]
+			$kid_dna[nextbaby] = $kid_dna[nextbaby-1]
+			hairkid[nextbaby] = hairkid[nextbaby-1]
+			eyeskid[nextbaby] = eyeskid[nextbaby-1]
+			cumarrcon[nextbaby] = cumarrcon[nextbaby-1]
+			$childtype[nextbaby] = 'identical twin'
+			$childtype[nextbaby-1] = 'identical twin'
+		end
+	end
+	ferteggage += 1
+	Ovulate -= 1
+	LutH += 1
+end
+
+
+!{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.}
+!{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.}
+!{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.}
+
+if $ARGS[0] = 'cyc3':
+	if fertegg = 1 and ferteggage < 330:
+		if rand(0,(2000 - age*20)) = 0:
+			fertegg += 1
+			nextbaby = arrsize('$ChildFath')
+			polkid[nextbaby] = polkid[nextbaby-1]
+			$kidname[nextbaby] = 'unborn'
+			kidage[nextbaby] = 0
+			daykid[nextbaby] = 0
+			monthkid[nextbaby] = 0
+			yearkid[nextbaby] = 0
+			Babyptype[nextbaby] = Babyptype[nextbaby-1]
+			$ChildFath[nextbaby] = $ChildFath[nextbaby-1]
+			$ChildFathDNA[nextbaby] = $ChildFathDNA[nextbaby-1]
+			$kid_dna[nextbaby] = $kid_dna[nextbaby-1]
+			hairkid[nextbaby] = hairkid[nextbaby-1]
+			eyeskid[nextbaby] = eyeskid[nextbaby-1]
+			cumarrcon[nextbaby] = cumarrcon[nextbaby-1]
+			$childtype[nextbaby] = 'identical twin'
+			$childtype[nextbaby-1] = 'identical twin'
+		end
+	end
+	ferteggage += 1
+	implant_idx = 0
+	implant_sz = arrsize('Babyptype')
+
+	:implant_loop
+	if implant_idx < implant_sz:
+
+		if Babyptype[implant_idx] = 0:
+			imp_rand = rand(0,120000)
+
+			if ferteggage < 120 and broodcurse <= 0:
+				imp_rand += 170
+				imp_rand -= age * 10
+				if steriletu = 1: imp_rand -= 200
+
+				if imp_rand <= 0:
+					Babyptype[implant_idx] = 2
+					FertEgg -= 1
+					babyembryo += 1
+					PregChem = rand(10,30)
+					if preg = 0: preg = 1
+					implant_day = daystart
+					implant_hour = hour
+
+				end
+
+			else
+				imp_rand += sterilewb
+				imp_rand -= tempwbbonus
+				if broodcurse > 0 and ferteggage >= 120: imp_rand = 0
+
+				if imp_rand <= (1200 - (age * 7)):
+					Babyptype[implant_idx] = 1
+					FertEgg -= 1
+					babyembryo += 1
+					PregChem = rand(10,30)
+					if preg = 0: preg = 1
+					implant_day = daystart
+					implant_hour = hour
+
+				end
+				tempwbbonus = 0
+
+			end
+
+		end
+
+		implant_idx += 1
+		jump 'implant_loop'
+
+	end
+
+!!{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.}
+	if LutH > LutH_Max:
+		rej_idx = 0
+		rej_sz = arrsize('Babyptype')
+		:lutcycloop
+		if rej_idx < rej_sz:
+			if Babyptype[rej_idx] = 0:
+				KILLVAR 'polkid',tempbabyi
+				KILLVAR '$kidname',tempbabyi
+				KILLVAR 'kidage',tempbabyi
+				KILLVAR 'daykid',tempbabyi
+				KILLVAR 'monthkid',tempbabyi
+				KILLVAR 'yearkid',tempbabyi
+				KILLVAR 'Babyptype',tempbabyi
+				KILLVAR '$ChildFath',tempbabyi
+				KILLVAR '$ChildThFath',tempbabyi
+				KILLVAR 'hairkid',tempbabyi
+				KILLVAR 'eyeskid',tempbabyi
+				KILLVAR 'cumarrcon',tempbabyi
+				FertEgg -= 1
+			end
+			rej_idx += 1
+			jump 'lutcycloop'
+		end
+		LutH = 0
+		if preg = 1:
+			cycle = 5
+		elseif menoage <= age:
+			KILLVAR '$wombpotfath'
+			killvar '$cumfthname'
+			killvar '$cumfthusedname'
+			killvar 'cumtime'
+			cycle = 6
+		else
+			KILLVAR '$wombpotfath'
+			killvar '$cumfthname'
+			killvar '$cumfthusedname'
+			killvar 'cumtime'
+			!! the setting of the max_time can be here although it can be changed in the future
+			FocH_Max = rand(312,360) & !! 13-15 days including menstruation
+			temprand = rand(0,10)
+			if pillcon >= 38000 or rand(1,24) = 1:
+				EggRH = 0
+				cycle = 1
+				mesec = 0
+			else
+				cycle = 0
+				killvar 'abortionbirthdate'
+				if cyccustom = 1: daylastperiod = daystart
+				firstmens = daystart
+				temprand = rand(0,10)
+				if temprand = 0 and pillcon < 10000:
+					mesec = rand(104,136) & !! 120
+				elseif temprand < 9 and pillcon < 15000:
+					mesec = rand(76,104) & !!  96
+				elseif pillcon < 20000:
+					mesec = rand(52,76) & !! 72
+				else
+					mesec = rand(44,52) & !! 48
+				end
+			end
+		end
+	else
+		if preg = 1:PregChem += 1+pregspeedcheat
+		if rand(0,100) < 100: LutH += 1
+	end
+end
+
+!{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.}
+
+if $ARGS[0] = 'cyc4':
+	if RecovH <= 0:
+		cycle = 1
+		if cyccustom = 1:
+			knowpregloss = 0
+			knowpregrecover = 0
+		end
+		if rand(0,1000) = 1000:
+			EggRH = rand(20,80)
+		else
+			EggRH = 0
+		end
+		FocH = EggRH
+	else
+		RecovH -= 1
+		if rand(0,10) = 0: RecovH -= 1
+	end
+end
+
+
+!{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.}
+
+if $ARGS[0] = 'preg':
+	if fertegg = 1 and ferteggage < 330:
+		if rand(0,(2000 - age*20)) = 0:
+			babyembryo += 1
+			PregChem += rand(10,30)
+			nextbaby = arrsize('$ChildFath')
+			polkid[nextbaby] = polkid[nextbaby-1]
+			$kidname[nextbaby] = 'unborn'
+			kidage[nextbaby] = 0
+			daykid[nextbaby] = 0
+			monthkid[nextbaby] = 0
+			yearkid[nextbaby] = 0
+			Babyptype[nextbaby] = Babyptype[nextbaby-1]
+			$ChildFath[nextbaby] = $ChildFath[nextbaby-1]
+			hairkid[nextbaby] = hairkid[nextbaby-1]
+			eyeskid[nextbaby] = eyeskid[nextbaby-1]
+			cumarrcon[nextbaby] = cumarrcon[nextbaby-1]
+			$childtype[nextbaby] = 'identical twin'
+			$childtype[nextbaby-1] = 'identical twin'
+		end
+	end
+	PregChem += (1+pregspeedcheat)
+	temprand = rand(-400,800)
+	temprand -= (babyembryo-1)*588
+	if PregChem > 6573 + temprand and preg ! 2:
+		'A sharp pain pierces your abdomen, and you feel something flow down your legs. Your water has broken!'
+		$cycreport_txt = 'In labour'
+		arrmodtmp =arrsize('$ChildFath')
+		arrmodtmp -= (babyembryo+1)
+		:babyfinalpreploop
+		if arrmodtmp < arrsize('$ChildFath') and daykid[arrmodtmp] = 0:
+			daykid[arrmodtmp] = 42
+			$ChildThFath[arrmodtmp] = $wombthfath
+			arrmodtmp += 1
+			jump 'babyfinalpreploop'
+		end
+		KILLVAR '$wombpotfath'
+		KILLVAR '$wombthfath'
+		preg = 2
+		pregminut = totminut + 1440
+		if babyembryo > 1:
+			'Your babies are coming...'
+		else
+			'Your baby is coming...'
+		end
+		if PregChem < 3885:
+			'Way too early!'
+		elseif PregChem < 5229:
+			'Very early!'
+		elseif PregChem < 6069:
+			'Early.'
+		elseif PregChem > 6959:
+			'Late.'
+		elseif PregChem > 7245:
+			'Very Late!'
+		end
+		'You need to get to a clinic.'
+	end
+	if PregChem > 3887:
+		if lactate <= 0:
+			'You begin lactating'
+			lactate = 1
+			lactatemv = 0
+			lactatemm = func('$calc_lactatemm')
+			lacaterate = 10
+			prolactinlvl = 150
+		else
+			if lactate < 1: lactate = 1
+		end
+	end
+	if PregChem > 1000:
+		if prolactinlvl < 100 and lactate <= 0:
+			if rand(0,100) > 50:
+				prolactinlvl +=1
+			end
+		end
+	end
+	if PregChem > 2203:
+		if pregchem > 2853 or kid > 0:
+			if rand(0,7) = 0: dynamic $d_pregmovement
+		else
+			if rand(0,500) = 0: dynamic $d_pregmovement
+		end
+	end
+end
+
+--- femcyc ---------------------------------
+

+ 435 - 0
locations/lact_lib.qsrc

@@ -0,0 +1,435 @@
+!! lact_lib
+
+# $calc_lactatemm
+
+!! FUNC('calc_lactatemm')
+!! No arguments at the moment. Information is taken from the global variables 'nbsize', 'lactate','lactateinduced','kid'.
+!! 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.
+!! Usage: lactatemm = func('$calc_lactatemm')
+!! RESULT = lactatemm in ml*10
+
+if lactate = 0:
+	RESULT = 0
+elseif lactate >0:
+	temp_breastsize = 0
+	temp_breastsize += nbsize
+	temp_var = 0
+	if lactateinduced > 0 and kid <= 0:
+		temp_var = ((8*temp_breastsize*temp_breastsize)+(37*temp_breastsize))/4
+		RESULT = temp_var
+	else
+		RESULT = ((8*temp_breastsize*temp_breastsize)+(37*temp_breastsize))
+	end
+else
+	cls & '<b><font color="red">BAD ARGUMENT CHECK IN <i>$calc_lactatemm</i>!</font></b>'
+end
+
+--- $calc_lactatemm ---------------------------------
+
+# $get_breastmilk
+
+!!	FUNC('$get_breastmilk', sucktion_type, sucktion_time)
+!!	ARGS[0] = 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]
+!!	ARGS[1] = sucktion_time: how many minutes the sucking/pumping takes place
+!!	Usage: breastmilkvolume = func('$get_breastmilk', 4, 20)
+!! 	RESULT = Milk in ml*10
+!! what type of sucktion is happening? different sucktion can cause a different demand of breastmilk. Base rate of sucktion is 10ml/minute.
+soreness_mod = 10
+breastpumped = 1
+!! 'suck_flow_rate initialized'
+if ARGS[0] = 0:
+	!! 'adult sucking'
+	suck_flow_rate = 12 + rand(0,4)
+	temp_var = pcs_mood +(ARGS[1]/8)
+	if temp_var > 100:
+		pcs_mood = 100
+	else
+		pcs_mood += ARGS[1]/8
+	end
+elseif ARGS[0] = 1:
+	!! 'child sucking'
+	suck_flow_rate = 8 + rand(0,2)
+	temp_var = pcs_mood + (ARGS[1]/2)
+	if temp_var > 100:
+		pcs_mood = 100
+	else
+		pcs_mood += ARGS[1]/2
+	end
+elseif ARGS[0] = 2:
+	!!	'baby sucking'
+	suck_flow_rate = 6 + (rand(0,2))
+	temp_var = pcs_mood + ARGS[1]
+	if temp_var > 100:
+		pcs_mood = 100
+	else
+		pcs_mood += ARGS[1]
+	end
+elseif ARGS[0] = 3:
+	!!	'manual_breastpump sucking'
+	suck_flow_rate = 9
+elseif ARGS[0] = 4:
+	!!	'electric_breastpump sucking'
+	suck_flow_rate = 10
+elseif ARGS[0] = 5:
+	!! 'hand expression'
+	suck_flow_rate = 3 + rand(1,2)
+elseif ARGS[0] = 6:
+	!! 'cow milker sucking'
+	suck_flow_rate = 100
+else
+	!! 'suck flow else branch'
+	suck_flow_rate = 10
+end
+!!	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.
+if breastcounter > 0:
+	temp_var = breastcounter/10
+	soreness_mod += temp_var
+	if soreness_mod > 20: soreness_mod = 20
+	if nipple_cream = 1:
+		soreness_mod += 10
+		nipple_cream = 0
+	end
+end
+!! No lactation, no milk, but stimulus is applied, so some things are going to happen here.	
+if lactate = 0:
+	if milkoverdemand <= 0: milkoverdemand = 0
+	pump_stop_brake = 0
+	!!	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.
+	max_sucktion_demand = 10*suck_flow_rate*ARGS[1]
+	if pain['nipples'] <= 60:
+		suck_until_pain = ((60 - pain['nipples'])*10*(soreness_mod/10))/suck_flow_rate
+	end
+	temp_var = pain['nipples'] + (max_sucktion_demand/100)/(soreness_mod/10)
+	if temp_var > 60:
+		pain['nipples'] = 65
+		pump_stop_brake = 1
+		pumptime = suck_until_pain
+		max_sucktion_demand = 10*suck_flow_rate*pumptime
+	else
+		pain['nipples'] += (max_sucktion_demand/100)/(soreness_mod/10)
+	end
+	
+	temp_var = pain['breasts'] + max_sucktion_demand/1000
+	if temp_var > 20:
+		pain['breasts'] = 25
+	else
+		pain['breasts'] += max_sucktion_demand/1000
+	end
+	!! Pumping breasts is exhausting even if no milk comes. so this is handled here.
+	
+	temp_var = pcs_energy - max_sucktion_demand/1500
+	if temp_var < 0:
+		pcs_energy = 0
+		!! energy usage flag on.
+		energytomilkpump = 1			
+	else
+		pcs_energy -= max_sucktion_demand/1500
+		!! energy usage flag on.
+		energytomilkpump = 1
+	end
+	
+	if pumptime < 10:
+		breastcounter += 1
+	else
+		breastcounter += pumptime/10
+	end
+	
+	milkoverdemand += max_sucktion_demand
+	RESULT = 0
+!! If there is lactation, do the magic
+elseif lactate >0:
+	!!	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.
+	if pcs_nips > 0:
+		max_nip_flow_rate = 6
+	elseif pcs_nips > 20:
+		max_nip_flow_rate = 8
+	elseif pcs_nips > 40:
+		max_nip_flow_rate = 10
+	elseif pcs_nips > 60:
+		max_nip_flow_rate = 12
+	elseif pcs_nips > 80:
+		max_nip_flow_rate = 14
+	elseif pcs_nips > 100:
+		max_nip_flow_rate = 16
+	else
+		max_nip_flow_rate = 10
+	end
+	
+	!!	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.
+	if breastcounter > 0:
+		temp_var = breastcounter/10
+		soreness_mod += temp_var
+		if soreness_mod > 20: soreness_mod = 20
+		if nipple_cream = 1:
+			soreness_mod += 10
+			nipple_cream = 0
+		end
+	end
+	
+	!!	If you pump more, more milk will come, disregarding nipplesize. Things will get used to milking and be more loose.
+	nip_flow_mod = 1
+	temp_var = breastcounter/10
+	nip_flow_mod += temp_var
+	if nip_flow > 30: nip_flow_mod = 30
+	max_nip_flow_rate += nip_flow_mod
+	
+	!!	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.
+	!!	If we only need 20ml from a 100ml storage, we would only substract 20ml, leaving 80ml inside the breasts.
+	max_sucktion_demand = 10*suck_flow_rate*ARGS[1]
+	!!	Is enough milk already in the breasts?
+	if lactatemv > max_sucktion_demand:
+		!! can the nipples handle the flow?
+		if max_nip_flow_rate >= suck_flow_rate:
+			milkedvolume = max_sucktion_demand
+			lactatemv -= max_sucktion_demand
+		elseif max_nip_flow_rate < suck_flow_rate:
+			milkedvolume = max_nip_flow_rate*10*ARGS[1]
+			lactatemv -= milkedvolume
+			!!	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.
+			max_sucktion_demand -= milkedvolume
+			temp_var = pain['nipples'] + (max_sucktion_demand/100)/(soreness_mod/10)
+			if temp_var > 60:
+				pain['nipples'] = 65
+			else
+				pain['nipples'] += (max_sucktion_demand/100)/(soreness_mod/10)
+			end
+		else
+			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>'
+		end
+	elseif lactatemv < max_sucktion_demand:
+		!!	Magic!
+		temp_var = (lactatemv/(max_nip_flow_rate*10))
+		if temp_var <= 0 and lactatemv > 0: temp_var = 1
+		pumptime_left = ARGS[1] - temp_var
+		if pumptime_left <= 0 and lactatemv > 0: pumptime_left = 1
+		temp_var = lactaterate/60
+		if temp_var <= 0 and lactaterate > 0: temp_var = 1
+		if temp_var >= max_nip_flow_rate:
+			if ARGS[0] = 2: breastcounter += 50
+			milkedvolume = (max_nip_flow_rate * 10 * pumptime_left) + (max_nip_flow_rate * 10 * (ARGS[1] - pumptime_left))
+			lactatemv -= (max_nip_flow_rate * 10 * (ARGS[1] - pumptime_left))
+		elseif temp_var < max_nip_flow_rate:
+			!!with a baby sucking, more milk should be made due to nature ...
+			if ARGS[0] = 2: milkoverdemand += 100000
+			milkedvolume = (temp_var * pumptime_left) + (max_nip_flow_rate * 10 * (ARGS[1] - pumptime_left))
+			lactatemv -= (max_nip_flow_rate * 10 * (ARGS[1] - pumptime_left))
+		else
+			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>'
+		end
+		if lactatemv <= 0: lactatemv = 0
+		!!	the breasts had to produce milk, so energy is used.
+		temp_var = pcs_energy - milkedvolume/1000
+		if temp_var < 0:
+			pcs_energy = 0
+			if rand(0,100) > 90: fat -= 1
+			!!	this is checking if pcs_energy was impacted during milking.
+			energytomilkpump = 1			
+		else
+			pcs_energy -= milkedvolume/1000
+			!!	this is checking if pcs_energy was impacted during milking.
+			energytomilkpump = 1
+		end
+		!! the breasts had to produce milk, so hydration is used.
+		temp_var = pcs_hydra - milkedvolume/500
+		if temp_var < 0:
+			pcs_hydra = 0
+			energytomilkpump = 1			
+		else
+			pcs_hydra -= milkedvolume/500
+			energytomilkpump = 1
+		end
+		!!	if more is pumped than produced the breasts will hurt too.
+		if milkedvolume < max_sucktion_demand:
+			!!	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.
+			milkoverdemand += max_sucktion_demand - milkedvolume
+			temp_var = pain['breasts'] + (max_sucktion_demand - milkedvolume)/1000
+			if temp_var > 20:
+				pain['breasts'] = 20
+			else
+				pain['breasts'] += (max_sucktion_demand - milkedvolume)/1000
+			end
+		end
+		if max_nip_flow_rate < suck_flow_rate:
+			!!	sore nipples again. "used to breastpumping" variable needs to come in here too!
+			temp_var = pain['nipples'] + ((((max_nip_flow_rate*100)/60) * pumptime_left)/100) + (max_sucktion_demand/100)/(soreness_mod/10)
+			if temp_var > 60:
+				pain['nipples'] = 65
+			else
+				pain['nipples'] += ((((max_nip_flow_rate*100)/60) * pumptime_left)/100) + (max_sucktion_demand/100)/(soreness_mod/10)
+			end			
+		end
+	end
+	!! The standard nipple pain applied due to pumping. Adding to the pain that is calculated above
+	temp_var = pain['nipples'] + (max_sucktion_demand/100)/(soreness_mod/10)
+	if temp_var > 60:
+		pain['nipples'] = 65
+	else
+		pain['nipples'] += (max_sucktion_demand/100)/(soreness_mod/10)
+	end
+	
+	if pumptime < 10:
+		breastcounter += 1
+	else
+		breastcounter += pumptime/10
+	end
+	
+	RESULT = milkedvolume
+else
+	cls & '<b><font color="red">BAD ARGUMENT CHECK IN <i>$get_breastmilk</i>!</font></b>'
+end
+
+--- $get_breastmilk ---------------------------------
+
+# lact_lib
+
+!!	bp_milking - breast pump milking
+!!	use href="exec:gt ''lact_lib'',''bp_milking''"
+if $ARGS[0] = 'bp_milking':
+	pumptime = 0
+	pumptype = 0
+	if $location_type ! 'bathroom' and pcs_exhibition < 60:
+		'You can''t use it here.'
+	else
+		*clr
+		cla
+		pumptime = input ("How long do you plan to pump your breasts? (Not more than 60 minutes)")
+		if pumptime <= 0 or pumptime > 60:
+			minut += 2			
+			act 'Don''t pump':gt $loc, $metka	
+		elseif pumptime > 0 and pumptime <= 60:
+			gt 'lact_lib', 'milking'
+		end	
+	end
+end
+
+!!	man_milking - manual (with hands) milking
+!!	use href="exec:gt ''lact_lib'',''man_milking''"
+if $ARGS[0] = 'man_milking':	
+	pumptime = 0
+	pumptype = 1
+	if $location_type ! 'bathroom' and pcs_exhibition < 60:
+		'You can''t do this here.'
+	else
+		*clr
+		cla
+		pumptime = input ("How long would you like to milk your breasts? (Not more than 60 minutes)")
+		if pumptime <= 0 or pumptime > 60:
+			minut += 2			
+			act 'Don''t milk':gt $loc, $metka	
+		elseif pumptime > 0 and pumptime <= 60:
+			gt 'lact_lib', 'milking'
+		end
+	end
+end
+
+!!	milking
+!!	never use directly. Always use bp_milking, man_milking or sex_milking
+
+if $ARGS[0] = 'milking':
+	if pumptime <= 0 or pumptime > 60:
+		act 'Finish':gt $loc, $metka
+	end
+	if pumptype = 1:
+		pumptime = (pumptime*6)/10
+	end
+	if lactate > 0 and pain['nipples'] < 60:				
+		milkedvolume = func('$get_breastmilk', 3, pumptime)
+		'<center><img <<$set_imgh>> src="images/pc/body/tits/pump_lactating.jpg"></center>'
+		'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.'
+		breastcounter += 1
+		if energytomilkpump > 0 and pcs_energy = 0:
+			'<br>During pumping you feel really hungry, producing breast milk seems to be more exhausing then thought.'
+			energytomilkpump = 0
+		elseif energytomilkpump > 0:
+			'<br>You feel a bit thirsty after pumping.'
+			energytomilkpump = 0
+		end
+		if bcream_used = 1:
+			pcs_nips += rand(0,2)
+			bcream_used = 0
+		end
+		minut += pumptime
+	elseif lactate = 0 and pain['nipples'] < 60:
+		if rand(1,50) + prolactinlvl >= rand(200,250):
+			'<center><img <<$set_imgh>> src="images/pc/body/tits/lactate_start.jpg"></center>'
+			'As usual, you attach the pump but after a few pumps white liquid suddenly starts flowing from your nipples.<br>You started lactating!'
+			lactateinduced = 1
+			lactate = 1
+			if func('$calc_lactatemm') > 0: lactatemm = func('$calc_lactatemm')
+			if prolactinlvl < 200: prolactinlvl = 200
+			lactaterate = 10*(prolactinlvl/200)
+			pcs_nips += 2
+			pumpinggrowth = 0
+		else
+			milkedvolume = func('$get_breastmilk', 3, pumptime)
+			'<center><img <<$set_imgh>> src="images/pc/body/tits/t<<tits>>.jpg"></center>'
+			'You attach the pump to your nipples and start squeezing the bulb. The vacuum feels good on your nipples.'
+			if prolactinlvl > 70: 'A few droplets of liquid come out of your nipples but it is not milk.'
+			breastcounter += 1
+			if pump_stop_brake = 1:
+				'During pumping your nipples start to hurt extremely. You have to stop after <<pumptime>> minutes, because you couldn''t go on.'
+			end
+			if prolactinlvl > 75:
+				if rand(0,10) > 9:
+					pumpinggrowth += 1
+				end
+				'After finishing, your breasts feel weirdly engorged.'
+			end
+			if bcream_used = 1:
+				pcs_nips += rand(0,2)
+				bcream_used = 0
+			end
+		end
+		minut += pumptime
+	else
+		'Your nipples feel too sore to use the pump right now.'
+	end
+	if milkedvolume > 0:
+		lact_engorgement = 0
+		lactatemess = 0
+		act 'Pour it into the sink':
+			*clr
+			cla
+			'<center><img <<$set_imgh>> src="images/pc/body/tits/milk_sink.jpg"></center>'
+			'<center>You pour <<milkedvolume/10>>ml of your breast milk into the sink and clean up your breastpump.</center>'
+			minute += 5			
+			act 'Finish':
+				milkedvolume = 0
+				gt $loc, $metka
+			end	
+		end
+		if pcs_hydra < 100:
+			act 'Drink it':
+				*clr
+				cla
+				'<center><img <<$set_imgh>> src="images/pc/body/tits/milk_drink.jpg"></center>'
+				'<center>You drink your own breast milk and clean up your breastpump.</center>'
+				'<center>The milk is still warm from your breasts.</center>'
+				if pcs_hydra < 90:
+					pcs_hydra += 10
+				else
+					pcs_hydra = 100
+				end
+				minute += 7
+				act 'Finish':
+					milkedvolume = 0
+					gt $loc, $metka
+				end					
+			end
+		end
+	else
+		act 'Finish':gt $loc, $metka
+	end	
+end
+
+
+!!	engorged_morning
+!!	use href="exec:gt ''lact_lib'',''engorged_morning''"
+if $ARGS[0] = 'engorged_morning':
+	minut += 5
+	'<center><img <<$set_imgh>> src="images/pc/body/tits/lactate_start.jpg"></center>'
+	'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.'
+	act 'Finish':gt $loc, $metka
+end
+
+--- balkon ---------------------------------

+ 57 - 45
locations/stat_display.qsrc

@@ -370,7 +370,7 @@ else
 		if pcs_shoot > 0: gs 'show_table', '<<pcs_shoot>> Marksmanship', '2'
 		if pcs_chess > 0: gs 'show_table', '<<pcs_chess>> Chess', '2'
 		if pcs_icesktng > 0: gs 'show_table', '<<pcs_icesktng>> Ice Skating', '2'
-		if pcs_gaming > 0: gs 'show_table', '<<pcs_gaming>> Gaming', '2'
+		if pcs_ttgmng > 0: gs 'show_table', '<<pcs_ttgmng>> Gaming', '2'
 		if pcs_pool > 0: gs 'show_table', '<<pcs_pool>> Pool', '2'
 	end
 
@@ -668,35 +668,65 @@ end
 
 if lactate = 1 and night_mode = 0:
 	if lactatemv >= lactatemm-1:
-			$stat_msg += '<BR><font color = black>Your breasts are so full they hurt and a little milk is constantly dribbling out.</font><BR>'
-		elseif lactatemv > lactatemm*9/10:
-			$stat_msg += '<BR><font color = black>Your breasts are firm and full, and starting to hurt from all the milk they contain.</font><BR>'
-		elseif lactatemv > lactatemm*3/4:
-			$stat_msg += '<BR><font color = black>Your breasts feel firm and heavy, full of milk.</font><BR>'
-		elseif lactatemv > lactatemm/2:
-			$stat_msg += '<BR><font color = black>Your breasts are heavy, a cargo of milk inside.</font><BR>'
-		elseif lactatemv > lactatemm/4:
-			$stat_msg += '<BR><font color = black>Your breasts feel a little heavy.</font><BR>'
-		elseif lactatemv > 0:
-			$stat_msg += '<BR><font color = black>Your breasts tingle a little from the feeling of milk production.</font><BR>'
+		if lact_engorgement > 3 and lact_engorgement <= 6:
+									
+			$stat_msg += '<BR><font color = red>Your breasts are so full they hurt and you can feel milk seeping out.</font><BR>'
+		elseif lact_engorgement > 6:
+																									
+								 
+			$stat_msg += '<BR><font color = red>Your breasts are so full they hurt and you can feel your milk spraying out.</font><BR>'
+								 
+																					  
+					   
+																													  
 		else
-			$stat_msg += '<BR><font color = black>Your breasts feel soft and empty.</font><BR>'
+			$stat_msg += '<BR><font color = orange>Your breasts are so full they hurt.</font><BR>'
+		end
+		if $clothingworntype = 'nude' and lactatemess > 0:
+			if lactatemess < 3:
+				$stat_msg += '<font color = black>You have a little milk residue around your nipples.</font>'
+			elseif lactatemess < 7:
+				$stat_msg += '<font color = orange>You have a lot of milk residue around your nipples.</font>'
+			else
+				$stat_msg += '<font color = red>Your breasts are drenched with milk residue.</font>'
+			end
+		elseif lactatemess > 0:
+			if lactatemess < 3:
+				$stat_msg += '<font color = orange>You have tiny wet spots on your clothes above your nipples.</font>'
+			elseif lactatemess < 7:
+				$stat_msg += '<font color = red>Milk has soaked through your clothes and made visible circles on your breasts.</font>'
+			else
+				$stat_msg += '<font color = red>Your shirt is drenched with milk from your breasts.</font>'
+			end
+		end		
+	elseif lactatemv > lactatemm*9/10:
+		$stat_msg += '<BR><font color = black>Your breasts are firm and full, and starting to hurt from all the milk they contain.</font><BR>'
+	elseif lactatemv > lactatemm*3/4:
+		$stat_msg += '<BR><font color = black>Your breasts feel firm and heavy, full of milk.</font><BR>'
+	elseif lactatemv > lactatemm/2:
+		$stat_msg += '<BR><font color = black>Your breasts are heavy, a cargo of milk inside.</font><BR>'
+	elseif lactatemv > lactatemm/4:
+		$stat_msg += '<BR><font color = black>Your breasts feel a little heavy.</font><BR>'
+	elseif lactatemv > 0:
+		$stat_msg += '<BR><font color = black>Your breasts tingle a little from the feeling of milk production.</font><BR>'
+	else
+		$stat_msg += '<BR><font color = black>Your breasts feel soft and empty.</font><BR>'
 	end
 elseif lactate = 1 and night_mode = 1:
 	if lactatemv >= lactatemm-1:
-			$stat_msg += '<BR><font color = white>Your breasts are so full they hurt and a little milk is constantly dribbling out.</font><BR>'
-		elseif lactatemv > lactatemm*9/10:
-			$stat_msg += '<BR><font color = white>Your breasts are firm and full, and starting to hurt from all the milk they contain.</font><BR>'
-		elseif lactatemv > lactatemm*3/4:
-			$stat_msg += '<BR><font color = white>Your breasts feel firm and heavy, full of milk.</font><BR>'
-		elseif lactatemv > lactatemm/2:
-			$stat_msg += '<BR><font color = white>Your breasts are heavy, a cargo of milk inside.</font><BR>'
-		elseif lactatemv > lactatemm/4:
-			$stat_msg += '<BR><font color = white>Your breasts feel a little heavy.</font><BR>'
-		elseif lactatemv > 0:
-			$stat_msg += '<BR><font color = white>Your breasts tingle a little from the feeling of milk production.</font><BR>'
-		else
-			$stat_msg += '<BR><font color = white>Your breasts feel soft and empty.</font><BR>'
+		$stat_msg += '<BR><font color = white>Your breasts are so full they hurt.</font><BR>'
+	elseif lactatemv > lactatemm*9/10:
+		$stat_msg += '<BR><font color = white>Your breasts are firm and full, and starting to hurt from all the milk they contain.</font><BR>'
+	elseif lactatemv > lactatemm*3/4:
+		$stat_msg += '<BR><font color = white>Your breasts feel firm and heavy, full of milk.</font><BR>'
+	elseif lactatemv > lactatemm/2:
+		$stat_msg += '<BR><font color = white>Your breasts are heavy, a cargo of milk inside.</font><BR>'
+	elseif lactatemv > lactatemm/4:
+		$stat_msg += '<BR><font color = white>Your breasts feel a little heavy.</font><BR>'
+	elseif lactatemv > 0:
+		$stat_msg += '<BR><font color = white>Your breasts tingle a little from the feeling of milk production.</font><BR>'
+	else
+		$stat_msg += '<BR><font color = white>Your breasts feel soft and empty.</font><BR>'
 	end
 end
 
@@ -1019,25 +1049,6 @@ killvar 'cumcount'
 killvar 'knownguy'
 killvar 'cumowner'
 
-
-if $clothingworntype = 'nude' and lactatemess > 0:
-	if lactatemess < 3:
-		$stat_msg += '<BR><font color = black>You have a little milk residue around your nipples.</font>'
-	elseif lactatemess < 7:
-		$stat_msg += '<BR><font color = black>You have a lot of milk residue around your nipples.</font>'
-	else
-		$stat_msg += '<BR><font color = black>Your breasts are drenched with milk residue.</font>'
-	end
-elseif lactatemess > 0:
-	if lactatemess < 3:
-		$stat_msg += '<BR><font color = black>You have tiny wet spots on your clothes above your nipples.</font>'
-	elseif lactatemess < 7:
-		$stat_msg += '<BR><font color = black>Milk has soaked through your clothes and made visible circles on your breasts.</font>'
-	else
-		$stat_msg += '<BR><font color = black>Your shirt is drenched with milk from your breasts.</font>'
-	end
-end
-
 if Gerpes >= 10 and GenHerpes = 1:
 	$stat_msg += '<BR><b><font color="red">On your pussy sores have appeared. This is genital herpes.</font></b>'
 elseif Gerpes >= 5 and GenHerpes =1:
@@ -1341,3 +1352,4 @@ end
 
 --- stat_display ---------------------------------
 
+>>>>>>> 48c11b415a2f0467c4e8bcf088acba01ca5cc362