123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946 |
- # 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('lact_lib','$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('lact_lib','$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 ---------------------------------
|