:: stat
<<set $here = 'stat'>>
<<set $ARGS = $location_var[$here]>>

<<warn "STAT is deactivated">>

:: stat_deactivated

<<if !$stat>><<set $stat ={}>><</if>>


<<if setup.startingCharacterTagsIncludes('magic')>>
	<<set $magik_exp = $orgasm>>
<</if>>

<<if getvar("$insleep") == 0>>
	<<gs 'stat_sklattrib'>>
<</if>>


<<if (getvar("$analplay") >= 2 and $pc.pcs_ass <= 10) or (getvar("$analplay") >= 4 and $pc.pcs_ass <= 15) or (getvar("$analplay") >= 8 and $pc.pcs_ass <= 20)>>
	<<setn $pc.pcs_ass += 1>> <<set $analplay = 0>>

<</if>>
<!-- !!This is a temporary stop-gap measure for the accomadation skill and will be removed-->
<<if getvar("$succubusflag") == 1 and getvar("$sucskill") >= 4>>
	<<if $pc.pain('throat') > 0>>
		<<run $pc.painSet('throat',0)>> <<setn $sucexcess -= 1>>

	<</if>>
	<<if $pc.pain('asshole') > 0>>
		<<run $pc.painSet('asshole',0)>> <<setn $sucexcess -= 1>>

	<</if>>
	<<if $pc.pain('vaginal') > 0>>
		<<run $pc.painSet('vaginal',0)>> <<setn $sucexcess -= 1>>

	<</if>>
	<<if $pc.vgape > 0>>
		<<set $pc.vgape = 0>> <<set $pc.vgapetime = 0>> <<setn $sucexcess -= 1>>

	<</if>>
	<<if $pc.agape > 0>>
		<<set $pc.agape = 0>> <<set $pc.agapetime = 0>> <<setn $sucexcess -= 1>>

	<</if>>
<</if>>

<!-- ! Moved from cheats to settings under 'Enema realism'-->
<<if getvar("$cheatKlisma") == 0>>
	<<set $klismaday = $time.daystart>> <<set $klismaday1 = 1>>

<</if>>

<<if getvar("$lernSkill") >= 8>>
	<<run $pc.skillExperienceGain('intelligence',1)>> <<set $lernSkill = 0>>

<</if>>
<<if getvar("$lern") >= 10>>
	<<run $pc.skillExperienceGain('intelligence',1)>> <<set $lern = 0>>

<</if>>
<!-- !! Katja learning about you sexual experience from other sources because you are a slut.-->
<<if $pc.fame('pav_slut') >= 150 and $pc.sexStat('bj') > 0 and getvar("$katjaQW['knows_BJ']") != 1>>
	<<setinit $katjaQW['knows_BJ'] = 1>>

<</if>>
<<if $pc.fame('pav_slut') >= 250 or $pc.preg > 0 and $pc.sexStat('vaginal') > 0 and getvar("$katjaQW['knows_sex']") != 1>>
	<<setinit $katjaQW['knows_sex'] = 1>>

<</if>>
<<set $shameless = $guy + $pc.sexStat('bj') + $pc.sexStat('anal') + $pc.sexStat('hj') + (($slutty + $gang) * 2)>>
<<set $finances.cashSUM = $finances.cash + $finances.bank + $stolmoney>>
<<set $cumSUM = $cumsumbod / 40>>
<<if getvar("$husbizvradd") > 5>>
	<<set $izvratH = 1>>

<</if>>
<<if getvar("$husbharmin") > 10>>
	<<set $harakHusb = 0>>

<</if>>
<<if getvar("$husband") == 0>>
	<<set $husbizvradd = 0>>
	<<set $husbharmin = 0>>
	<<set $husbandMark = 0>>
	<<set $houseslut = 0>>
<</if>>
<<if getvar("$SNarkvnesh") == 0>>
	<<set $SNarkvnesh = 1>>

<</if>>
<<if $SNarkTimes >= $SNarkvnesh * 25>>
	<<set $SNarkvnesh += 1>>
	<<set $pc.visualAge += 1>>
<</if>>
<<if getvar("$gopota") >= 20 and getvar("$gnewQW") == 1>>
	<<set $gnewQW = 2>>

<</if>>
<<if getvar("$workDisk") == 4 and $time.weekday > 5>>
	<<set $workDisk = 1>>

<</if>>
<<if getvar("$workDisk") == 3 and $time.weekday > 5>>
	<<set $workDiskAtkPlayer = 1>>

<</if>>
<<if getvar("$bfa") < 0>>
	<<set $bfa = 0>>

<</if>>

<<if getvar("$NarkImmune") == 1>>
	<<if getvar("$pc.narkoman") != 0>>
		<<set $pc.narkoman = 0>>

	<</if>>
<<elseif $pc.nark >= 30 and getvar("$pc.narkoman") == 0 and getvar("$NarkImmune") == 0>>
	<<set $pc.narkoman = 1>>
<<elseif $pc.nark == 0 and getvar("$pc.narkoman") == 1>>
	<<set $pc.narkoman = 0>>
<</if>>
<<if getvar("$cheatSlut") == 1 or getvar("$succubusflag") == 1>>
	<!-- !!Succubus cannot get pregnant-->
	<<set $mesec = 0>>
	<<set $FocH = 0>>
	<<set $EggRH = 0>>
	<<set $Ovulate = 0>>
	<<set $fertegg = 0>>
	<<set $UnfertEgg = 0>>
	<<set $pc.PregChem = 0>>
	<<set $pc.preg = 0>>
	<<set $LutH = 0>>
	<<set $RecovH = 0>>
	<<set $babyembryo = 0>>
	<<set $cycle = 1>>
<</if>>
<<if getvar("$succubusflag") == 1 and getvar("$succublvl") > 2 and $rape > $rape_count>>
	<!-- !!High Level Succubus cannot get raped-->
	<<set $orgasm += 1>>
	<<set $rape = $rape_count>>
	<<set $pc.mood = 100>>
<</if>>

<!-- !!These will be made obsolete with the combat system overhaul-->
<<set $boxing = $pc.skillLevel("jabs") + $pc.skillLevel("punch") + $pc.skillLevel("kick") + $pc.skillLevel("defense")>>
<<if getvar("$boxing") > 100>>
	<<set $boxing = 100>>

<</if>>
<<set $manamax = ($pc.skillLevel("intelligence") * $pcs_magik) + $pcs_magik * 100 + $pc.vitality * 10 + $rikudo>>
<!-- !! Set the massage displayed each time the magik attribute is increased.-->
<<if setup.startingCharacterTagsIncludes('magic')>>
	<<if $pcs_magik > $magikhigh>>
		<<set $magikhigh = $pcs_magik>>
		<<set $rikudo += $pcs_magik * 100>>
		<<set $stat_msg += '<BR><b>You feel like a strength has been revealed within you, and you gush with magic, lifting you to a new energy level.</b>'>>
		<!-- !!		This will be replaced when a more advanced physical system is made-->
		<<if $pcs_magik % 2 != 0 and $pc.eyesize < 2>>
			<<setn $pc.eyesize += 1>>

		<</if>>
		<<if $pcs_magik % 2 == 0 and $pc.eyelashes < 2>>
			<<setn $pc.eyelashes += 1>>

		<</if>>
	<</if>>
<<else>>
	<!-- !!This is for error catching but also broke manamax calc which is why its now above this-->
	<<set $pcs_magik to null>>
	<<set $rikudo to null>>
	<<set $pcs_splcstng to null>>
<</if>>

<<if getvar("$manamax") < 1>>
	<<set $manamax = 1>>

<</if>>
<!-- !pre-calc max value for later display-->
<<if $fairycurse >= $time.daystart and getvar("$fairyshoo") > 0>>
	<<set $pc.horny = 90>>

<</if>>

<<if getvar("$Enable_lockhorny") > 0 and $pc.horny < $Enable_lockhorny - 1>>
	<<set $pc.horny = $Enable_lockhorny - 1>>

<</if>>

<<if $pcs_mana > $manamax>>
	<<set $pcs_mana = $manamax>>

<</if>>


<<if $quest('therapist').hypnoAddict == 1 and $pc.horny < 30>>
	<<set $pc.horny = 30>>
<<elseif $quest('therapist').hypnoAddict == 2 and $pc.horny < 50>>
	<<set $pc.horny = 50>>
<</if>>
<<if $pc.cumAtLocation(0) == 1 or $pc.cumAtLocation(3) == 1 or $quest('therapist').hypnoAddict == 0>>
	<<set $missCum to null>>
<<elseif $missCum > $timeTresh>>
	<<if $pc.horny < 90>>
		<<set $pc.horny = 90>>

	<</if>>
	<<if getvar("$preziktype") == 0>>
		<<set $prezikcount = $inventory.get("condom")>>

	<</if>>
	<<if getvar("$preziktype") == 2>>
		<<set $preziksabo = $inventory.get("condom")>>

	<</if>>
	<<run $inventory.set('condom',0)>>
	<<set $preziktype = 1>>
<</if>>

<!-- ! Execute time based spells-->
<<gs 'spellTimer' $prevtotmin $totminut>>
<!-- ! Determine Incoming Telephone Calls-->
<<gs 'telefon' 'IncomingCheck' $prevtotmin $totminut>>


<!-- !!Gaping of vagina recovery time-->
<!-- !! [1] stored gape value-->
<!-- !! [3] timer-->
<!-- !! [4] time between each reduction in gape-->
<<if !$pc.agape>><<set $pc.agape = []>><</if>>
<<if $pc.agape[4] == 0>>
	<<setinit $pc.agape[4] = 10>>

<</if>>
<<if !$pc.vgape>><<set $pc.vgape = []>><</if>>
<<if $pc.vgape[4] == 0>>
	<<setinit $pc.vgape[4] = 10>>

<</if>>
<<if $pc.vgape > $pc.vgape[1]>>
	<<setinit $pc.vgape[3] = $totminut>>
	<<setinit $pc.vgape[1] = $pc.vgape>>
<<elseif $pc.vgape > 0>>
	<<if ($time.minutesTimestamp- $pc.vgape[3]) / $pc.vgape[4] >= 1>>
		<<setn $pc.vgape -= 1>>

	<</if>>
	<<setinit $pc.vgape[1] = $pc.vgape>>
<<else>>
	<<setinit $pc.vgape[3] = 0>>
<</if>>
<!-- !!Gaping of anus recovery time-->
<<if $pc.agape > $pc.agape[1]>>
	<<setinit $pc.agape[3] = $totminut>>
	<<setinit $pc.agape[1] = $pc.agape>>
<<elseif $pc.agape > 0>>
	<<if ($time.minutesTimestamp- $pc.agape[3]) / $pc.agape[4] >= 1>>
		<<setn $pc.agape -= 1>>

	<</if>>
	<<if $pc.agape == 0>>
		<<setinit $pc.agape[3] = 0>>

	<</if>>
	<<setinit $pc.agape[1] = $pc.agape>>
<<else>>
	<<setinit $pc.agape[3] = 0>>
<</if>>
<!-- !!Recovery from spanking - will be superseded by pain system-->
<<if $pc.spanked > 0>>
	<<if getvar("$pc.spankedtime") == 0>>
		<<set $pc.spankedtime = $totminut>>

	<</if>>
	<<if ($pc.spankedtime + 2040) <= $totminut>>
		<<setn $pc.spanked -= 1>> <<set $pc.spankedtime = 0>>

	<</if>>
<<elseif getvar("$pc.spankedtime") != 0>>
	<<set $pc.spankedtime to null>>
<</if>>
<!-- !! Orgasmic cooldown-->
<<if getvar("$orgasmic") != 0>>
	<<if $orgasmic < $time.minutesTimestamp- 30>>
		<<set $orgasmic = 0>> <<set $pc.horny = 0>>

	<</if>>
<</if>>
<!-- !!!!!!!!!!!!!!! Heels pain and skill gain-->
<!-- !! This compares the player heels skill to the skill required to wear any heels the player-->
<!-- !! currently wears. If the skill needed is greater than the player currently possesses,-->
<!-- !! the pain in the feet increases and the player earns heels skill. If the skill required-->
<!-- !! is lower, the player might still get experience, depending on how much greater the-->
<!-- !! player skill is.-->
<!-- !! Variables-->
<!-- !! pcs_heels is the main heels skill-->
<!-- !! heels_exp is used when the player gains experience using heels-->
<!-- !! heels_deg is used when the player neglects their heels-->
<!-- !! PShoHeels tracks the height of the heels currently worn-->
<!-- !! heelsminut tracks when the heels skill was last changed-->
<!-- !! heelsRequiredskill substitutes PShoHeels to allow comparison with pcs_heels-->
<!-- !! heelsSkilldiff tracks difference between the players current and skill required by heels-->
<!-- !! Required skill for various heel sizes-->
<!-- !! 1 flats - 0-->
<!-- !! 2 low heel - 5-->
<!-- !! 3 Mid heel - 15-->
<!-- !! 4 High heel - 25-->
<!-- !! 5 ultra high heel - 40-->
<!-- !! 6 fetish heel - 60-->
<!-- !! Only run if at least X minutes have passed since last time-->
<<if $time.minutesTimestamp>= $heelsminut + 120>>
	<<set $heelsminut = $totminut>>
	<!-- !! Only check experience and pain gain and if the player wears heels, flats give nothing-->
	<<if $wardrobe.PShoHeels > 1>>
		<<if $wardrobe.PShoHeels == 2>>
			<<set $heelsRequiredskill = 5>>
		<<elseif $wardrobe.PShoHeels == 3>>
			<<set $heelsRequiredskill = 15>>
		<<elseif $wardrobe.PShoHeels == 4>>
			<<set $heelsRequiredskill = 25>>
		<<elseif $wardrobe.PShoHeels == 5>>
			<<set $heelsRequiredskill = 40>>
		<<elseif $wardrobe.PShoHeels == 6>>
			<<set $heelsRequiredskill = 60>>
		<</if>>
		<!-- !! stat is called a lot, there should be a limit to how much exp and pain you can accumulate...-->
		<!-- !! If the player skill is below the required skill, give heel_exp and apply ache-->
		<<if $pc.skillLevel("highHeels") < $heelsRequiredskill>>
			<<set $heelsSkilldiff = $heelsRequiredskill - $pc.skillLevel("highHeels")>>
			<<if getvar("$heelsSkilldiff") <= 5>>
				<<run $pc.skillExperienceGain('highHeels',rand(3,6))>>
				<<if $pc.pain('feet') < 40>>
					<<gs 'pain' `rand(0,1)` 'feet' 'ache'>>

				<</if>>
			<<elseif getvar("$heelsSkilldiff") <= 10>>
				<<run $pc.skillExperienceGain('highHeels',rand(5,9))>>
				<<if $pc.pain('feet') < 50>>
					<<gs 'pain' `rand(0,2)` 'feet' 'ache'>>

				<</if>>
			<<elseif getvar("$heelsSkilldiff") <= 15>>
				<<run $pc.skillExperienceGain('highHeels',rand(7,12))>>
				<<if $pc.pain('feet') < 60>>
					<<gs 'pain' `rand(1,3)` 'feet' 'ache'>>

				<</if>>
			<<elseif getvar("$heelsSkilldiff") <= 20>>
				<<run $pc.skillExperienceGain('highHeels',rand(9,15))>>
				<<if $pc.pain('feet') < 70>>
					<<gs 'pain' `rand(2,4)` 'feet' 'ache'>>

				<</if>>
			<<elseif getvar("$heelsSkilldiff") > 20>>
				<<run $pc.skillExperienceGain('highHeels',rand(12,20))>>
				<<if $pc.pain('feet') < 80>>
					<<gs 'pain' `rand(3,5)` 'feet' 'ache'>>

				<</if>>
			<</if>>
			<!-- !! Player skill is equal to or higher than the required skill-->
			<!-- !! Maybe have excessive skill result in no gain, or even a degrading skill?-->
		<<else>>
			<<set $heelsSkilldiff = $pc.skillLevel("highHeels") - $heelsRequiredskill>>
			<<if getvar("$heelsSkilldiff") <= 5>>
				<<run $pc.skillExperienceGain('highHeels',rand(3,6))>>
			<<elseif getvar("$heelsSkilldiff") <= 10>>
				<<run $pc.skillExperienceGain('highHeels',rand(2,4))>>
			<<elseif getvar("$heelsSkilldiff") <= 15>>
				<<run $pc.skillExperienceGain('highHeels',rand(1,2))>>
			<<elseif getvar("$heelsSkilldiff") <= 20>>
				<<run $pc.skillExperienceGain('highHeels',0)>>
			<<elseif getvar("$heelsSkilldiff") > 20>>
				<<set $heels_deg -= rand(0,1)>>
			<</if>>
		<</if>>
		<!-- !! If not wearing heels, degrade heels skill-->
	<<else>>
		<<set $heels_deg -= rand(0,1)>>
	<</if>>
<</if>>
<!-- !!!!!!!!!!!!!!! End heels-->
<<if getvar("$sec") >= 60>>
	<<warn 'JUMP MARKER ENCOUNTERED: :loopsec'>>
	<<set $time.minutes += 1>>
	<<set $sec -= 60>>
	<<if getvar("$sec") >= 60>>
		<<warn 'JUMP COMMAND ENCOUNTERED: jump loopsec'>>

	<</if>>
<</if>>
<<if !$sucexcess>><<set $sucexcess = 0>><</if>>
<!-- !! Hourly Changes-->
<<gs 'stat_hourly_changes'>>

<!-- !! End of Hourly Changes-->
<<if $time.hour >= 24>>
	<<gs 'cikl'>>

<</if>>
<<if $time.minutes < 10>>
	<<set $nilmin = '0'>>
<<else>>
	<<set $nilmin = ''>>
<</if>>
<<if getvar("$kid") > 0>>
	<<set $i = arrsize('yearkid')>>
	<<warn 'JUMP MARKER ENCOUNTERED: :LoopKidAgeCounter'>>
	<<if getvar("$i") >= 0>>
		<<if $time.yearkid[$i] == $time.year + 1 and $time.monthkid[$i] == $time.month and $time.daykid[$i] == $time.day>>
			<<msg 'It is <<$kidname[$i]>>""s birthday today.'>>

		<</if>>
		<<set $i -= 1>>
		<<warn 'JUMP COMMAND ENCOUNTERED: jump LoopKidAgeCounter'>>
	<</if>>
<</if>>
<<if getvar("$pcs_nerd") > 0>>
	<<if $lastreadday == $time.daystart>>
		<!-- !!<font color="green">You are completely healthy shine and a healthy glow.</font>-->
		<<set $pc.mood = 100>>
		<<set $SbrosNerdism = 0>>
		<<set $mudnerd = '<font color="green">You are lost in a fantasy after reading a book.</font>'>>
	<</if>>
	<<if $lastreadday + 1 == $time.daystart>>
		<<set $SbrosNerdism = 0>>
		<<set $mudnerd = '<font color="black">You are a little bored and want to plunge into a book.</font>'>>
	<</if>>
	<<if $lastreadday + 2 == $time.daystart>>
		<<set $SbrosNerdism = 0>>
		<<if $pc.mood > 50>>
			<<setn $pc.mood -= 10>>
		<<else>>
			<<set $stat_msg += '<BR><font color=red><B>You starved to death, but Cheat Mode keeps you Alive.</B></font>'>>
			<<set $pc.fat = 1>>
		<</if>>
		<<set $mudnerd = '<font color="red">You really want to read something.</font>'>>
	<</if>>
	<<if $lastreadday + 3 <= $time.daystart>>
		<<if $pc.mood > 10>>
			<<setn $pc.mood -= 10>>

		<</if>>
		<<set $SbrosNerdism = 1>>
		<<set $mudnerd = '<font color="red"><b>You have an incredibly strong desire to read!!!</b></font>'>>
	<</if>>
<<else>>
	<<set $SbrosNerdism = 0>>
	<<set $mudnerd = ''>>
<</if>>
<<if getvar("$bimbolevel") > 0>>
	<<if getvar("$bimbowithdrawal") == 0>>
		<<set $bimbostatus = '<font color = #FF1493>You`re, like, super hawt today.</font>'>>
		<<set $bimbo_tooltip = 'You`re, like, super hawt today.'>>
	<<elseif getvar("$bimbowithdrawal") == 1>>
		<<set $bimbostatus = '<font color="green">You feel, like, kind of lame today.</font>'>>
		<<set $bimbo_tooltip = 'You feel, like, kind of lame today.'>>
	<<elseif getvar("$bimbowithdrawal") < 4>>
		<<set $bimbostatus = '<font color="grey">You feel, like, totally lame today.</font>'>>
		<<set $bimbo_tooltip = 'You feel, like, totally lame today.'>>
	<<elseif getvar("$bimbowithdrawal") < 6>>
		<<if $pc.mood > 50>>
			<<setn $pc.mood -= 10>>

		<</if>>
		<<set $bimbostatus = '<font color="red">You really feel, like, awful today.</font>'>>
		<<set $bimbo_tooltip = 'You really feel, like, awful today.'>>
	<<elseif getvar("$bimbowithdrawal") >= 6>>
		<<if $pc.mood > 10>>
			<<setn $pc.mood -= 10>>

		<</if>>
		<<set $bimbostatus = '<font color="red"><b>You feel that, like, horrible today!</b></font>'>>
		<<set $bimbo_tooltip = 'You feel that, like, horrible today!'>>
	<</if>>
<<else>>
	<<set $bimbowithdrawal = 0>>
	<<set $bimbostatus = ''>>
<</if>>
<<gs 'stat_15minutes_changes'>>
<!-- !!!!!!!!!!!!!-->
<!-- !!!ENERGY!!!-->
<!-- !!!!!!!!!!!!!-->
<<if getvar("$succubusflag") == 1>>
	<<if $pc.pcs_energy < 0>>
		<<if $pc.fat >= 1>>
			<<if getvar("$cheatNoFat") == 0>>
				<<setn $pc.fat -= 2>>

			<</if>>
			<<set $pc.pcs_energy += 8 + getvar('$succublvl')>>
		<<else>>
			<<set $pc.pcs_energy += 8 + getvar('$succublvl')>>
			<<set $sucexcess -= (8 + getvar('$succublvl')) * (6 - getvar('$succublvl'))>>
		<</if>>
	<</if>>
	<<if $pc.pcs_health < 0>>
		<<set $pc.pcs_health = 10>>
		<<set $sucexcess -= 25 * (9 - getvar('$succublvl'))>>
	<</if>>
	<<if $pc.pcs_willpwr < 0>>
		<<set $pc.pcs_willpwr = 10>>
		<<set $sucexcess -= 20 * (9 - getvar('$succublvl'))>>
		<<set $sucpowzeroed = 4>>
	<</if>>
<</if>>

<<if $pc.pcs_energy < 0>>
	<<set $pc.pcs_energy = 0>>
	<<set $pc.pcs_health -= 5>>
	<<if $pc.salo == 0 and $pc.skillLevel("strength") + getvar("$pc.vitality") > 0>>
		<<set $stren_deg -= 1>>
		<<set $vital_deg -= 1>>
		<<set $pc.pcs_energy += 8>>
	<<elseif $pc.salo == 0 and $pc.skillLevel("strength") + getvar("$pc.vitality") <= 0>>
		<<if getvar("$Enable_nogameover") == 0>>
			<<set $pc.gameover= 3>>
			<<if $loc != 'gameover'>>
				<<gt 'gameover'>>

			<</if>>
			$exit
		<<else>>
			<<set $stat_msg += '<BR><font color=red><B>You starved to death, but Cheat Mode keeps you Alive.</B></font>'>>
			<<set $pc.fat = 1>>
		<</if>>
	<<elseif $pc.salo > 0>>
		<<if getvar("$cheatNoFat") == 0>>
			<<setn $pc.fat -= 1>>

		<</if>>
		<<set $pc.pcs_energy += 8>>
	<</if>>
<</if>>

<<if $pc.pcs_willpwr <= 0>>
	<!-- !this will set willpower to 0 correctly; then check mana =1 for insane-gameover(pcs_willpwr=0&mana=1).-->
	<<if $pc.mood <= 1>>
		<<if getvar("$Enable_nogameover") == 0>>
			<<set $pc.gameover= 2>>
			<<if $loc != 'gameover'>>
				<<gt 'gameover'>>

			<</if>>
		<<else>>
			<<set $stat_msg += '<BR><font color=red><B>You are insane, but Cheat Mode keeps you Alive.</B></font>'>>
			<!-- !mood already checked for >=1 in line 1113 if mood <= 0, no need to set another one-->
		<</if>>
	<</if>>
	<<set $pc.pcs_willpwr = 0>>
<</if>>
<!-- !!cars-increase/depressed mood after orgasm/rape-->
<<if getvar("$rape") > 0 and $rape != $rape_count and $orgasm == $orgasm_count>>
	<<set $pc.mood = 10>>
	<<set $rape_count = $rape>>
<<elseif getvar("$orgasm") > 0 and $orgasm != $orgasm_count>>
	<<set $pc.mood = 100>>
	<<set $orgasm_count = $orgasm>>
<<elseif getvar("$rape") > 0 and $rape != $rape_count and getvar("$orgasm") > 0 and $orgasm != $orgasm_count>>
	<<set $pc.mood = 100>>
	<<set $orgasm_count = $orgasm>>
	<<set $rape_count = $rape>>
<</if>>
<!-- !! Drug stats-->
<<if $pc.strongNarkota <= 0>>
	<<if getvar("$SNarkTimes") >= 3 and getvar("$SLomka") == 0>>
		<<set $SLomka = 1>>

	<</if>>
<</if>>
<<if getvar("$amphCount") > 3 and getvar("$amphHigh") <= 0>>
	<<set $addictChance = rand(1,10)>>
	<<if getvar("$addictChance") > 8>>
		<<set $amphWithdrawl = 2>>
	<</if>>
<</if>>
<<if $pc.strongNarkota > 0>>
	<<if getvar("$SLomka") > 0>>
		<<set $SLomka = 0>>

	<</if>>
	<<set $pc.mood = 100>>
<</if>>

<!-- !!stop auto birth control pill taking if the player believes they are pregnant or are pregnant-->
<<if ($pc.thinkpreg == 1 or $pc.knowpreg == 1) and getvar("$tabletkicheck") == 1>>
	<<set $tabletkicheck = 0>>

<</if>>
<<if !$birth_control>><<set $birth_control = {}>><</if>>
<<if getvar("$birth_control['remind_hour']") > 0 and $time.hour >= $birth_control['remind_hour'] and $time.hour <= $birth_control['remind_hour'] + 1 and $tabletkiday != $time.daystart>>
	<<setinit $birth_control['remind_icon'] = 1>>
<<else>>
	<<setinit $birth_control['remind_icon'] = 0>>
<</if>>



<<if getvar("$workFabrika") == 1 and $time.weekday >= 1 and $time.weekday <= 5 and $time.hour > 8 and getvar("$pc.age") >= 16 and getvar("$pc.age") < 18 and $FabrikaProgulDay != $time.day or getvar("$workFabrika") == 1 and $time.weekday >= 1 and $time.weekday <= 5 and $time.hour > 16 and getvar("$pc.age") > 18 and $FabrikaProgulDay != $time.day>>
	<!-- !!absence from work in a factory in Pavlovsk-->
	<<set $FabrikaProgul += 1>>
	<<set $FabrikaProgulDay = $time.day>>
<</if>>


<<if getvar("$cumcondslip") <= 0>>
	<<set $cumcondslip_deep = 0>>

<</if>>
<!-- !!Sex stat update-->
<<run $pc.sexStatInc('mast','aware',$mastr)>> <<set $mastr = 0>>
<<run $pc.sexStatInc('hj','aware',$hj)>> <<set $hj = 0>>
<<run $pc.sexStatInc('bj','aware',$bj)>> <<set $bj = 0>>
<<run $pc.sexStatInc('vaginal','aware',$sex)>> <<set $sex = 0>>
<<run $pc.sexStatInc('anal','aware',$anal)>> <<set $anal = 0>>
<<run $pc.sexStatInc('cuni','aware',$kuni)>> <<set $kuni = 0>>
<<run $pc.sexStatInc('anal_strap_give','aware',$pegging)>> <<set $pegging = 0>>
<!-- !!Pain calculation-->


<!-- !!update skills and attributes to pcs_ from there _lvl values plus adjustments based on condition-->
<<gs 'stat_sklattrib_lvlset'>>

<!-- !!--------------------------Job Checks For Icons---------------------------------->
<<if !$acting>><<set $acting = {}>><</if>>
<<if !$audition>><<set $audition = {}>><</if>>
<<if ($acting['shoot_day'] == $time.daystart and getvar("$actress_cast") == 1) or $audition['day'] == $time.daystart>>
	<<setinit $acting['icon'] = 1>>
<<else>>
	<<setinit $acting['icon'] = 0>>
<</if>>
<<if getvar("$model_job_week") < 2 and getvar("$model['status']") == 1>>
	<<setinit $model['icon'] = 1>>
<<else>>
	<<setinit $model['icon'] = 0>>
<</if>>
<<if !$pfilmday>><<set $pfilmday = []>><</if>>
<<if $pfilmday[0] > 0>>
	<<setinit $pornstar['icon'] = 1>>
<<else>>
	<<setinit $pornstar['icon'] = 0>>
<</if>>
<<if $quest('therapist').therapistday != $time.daystart and $remindedtherapyday != $time.daystart and $quest('therapist').hypnoSchedule == 1 and ($time.hour >= 18 and ($time.minutes > 45 or $time.hour >= 19)) and ($time.hour < 20 and ($time.minutes < 15 or $time.hour < 19)) and getvar("$menu_off") == 0 and getvar("$workDolg") == 0>>
	<<set $remindedtherapyday = $time.daystart>>
	<<gt 'therapist_reminder'>>
<</if>>
<!-- !!--------------------------Booty Call SMSs---------------------------------->
<<if arrsize('$FuckBuddy') > 0 and $time.hour > 1>>
	<<gs 'booty_call' 'SMS raiser'>>

<</if>>

:: stat_hourly_changes
/*
	<<if getvar("$SbrosNerdism") == 1 and getvar("$orgasm") != 10>>
		<<set $pcs_nerd = $pc.skillLevel("spirit") / 10 - $orgasm>>
	<<elseif getvar("$sbrosnerdism") == 1 and getvar("$orgasm") == 10>>
		<<set $pcs_nerd = $pc.skillLevel("spirit") / 9 - $orgasm>>
	<</if>>
	<<if getvar("$pcs_nerd") < 0>>
		<<set $pcs_nerd = 0>>

	<</if>>
	<<if getvar("$obkvsdam") > 0>>
		<<set $obkvsdam = rand(2, 5)>>

	<</if>>
	<<if getvar("$scpopt") > 1>>
		<<set $scpopt = 0>>

	<</if>>
	<<if !$amphetamineBonus>><<set $amphetamineBonus = 1>><</if>>
	<<if getvar("$insleep") == 1>>
	<<else>>
		<<if $pc.pcs_sleep <= 0>>
			<<setinit $pcs_condition['lack_of_sleep'] += 2>>
			<<if getvar("$pc.mood_type['slpredcheck']") == 1>>
				<<set $pc.mood -= 5>>
			<</if>>
			<<setinit $pc.mood_type['slpredcheck'] = 1>>
		<<else>>
			<<setinit $pc.mood_type['slpredcheck'] = 0>>
		<</if>>
		<<if $pc.pcs_energy == 0>>
			<<if getvar("$pc.mood_type['nrgredcheck']") == 1>>
				<<set $pc.mood -= 5>>
			<</if>>
			<<setinit $pc.mood_type['nrgredcheck'] = 1>>
		<<else>>
			<<setinit $pc.mood_type['nrgredcheck'] = 0>>
		<</if>>
		<<if $pc.pcs_hydra == 0>>
			<<if getvar("$pc.mood_type['hydredcheck']") == 1>>
				<<set $pc.mood -= 5>>
			<</if>>
			<<setinit $pc.mood_type['hydredcheck'] = 1>>
		<<else>>
			<<setinit $pc.mood_type['hydredcheck'] = 0>>
		<</if>>
	<</if>>


	<<gs 'femcyc'>>
	<<if getvar("$insleep") == 0 and getvar("$period['cramp']") == 0 and getvar("$placebopart") > 0 and getvar("$LutH") > 0 and $pc.knowpreg == 0>>
		<<setinit $period['cramp'] = 1>>
		<<msg 'Your stomach suddenly twinges, muscles tightening with involuntarily contractions, causing you to nearly double over in pain. With a grimace, you realize it""s probably a sign your period is going to start soon.'>>
	<<elseif getvar("$mesec") > 0>>
		<<setinit $period['cramp'] = 0>>
	<</if>>
	<!-- !! code to trigger vomitting based on morning sickness, hangovers, or just plain bad luck-->
	<<if getvar("$insleep") == 0>>
		<<setinit $vomit['daily_check'] = 0>>
	<</if>>
	<<if getvar("$insleep") == 1>>
		<<if getvar("$vomit['daily_check']") == 0>>
			<<setinit $vomit['daily_check'] = 1>>
			<<if $pc.alko > 4>>
				<<setinit $vomit['hangover'] = 1>>
			<<elseif getvar("$pc.pregchem") > 600 and getvar("$pc.pregchem") < 2160 and rand(1,4) == 4>>
				<<setinit $vomit['morning_sick'] = 1>>
			<<elseif rand(1,100) == 100>>
				<<setinit $vomit['unlucky'] = 1>>
			<</if>>
		<</if>>
	<</if>>
	<<if $quest('therapist').hypnoAddict > 0>>
		<<hypnoAddiction>>

	<</if>>
	<!-- !!mana regen-->
	<<set $pcs_mana += $manamax / 20>>
	<<if $pc.alko > 0 and getvar("$pc.alkoblock") == 0>>
		<<if $pc.alko >= 6>>
			<<if $pc.skillLevel("run") > 0>>
				<<setn $run_deg -= 1>>

			<</if>>
			<<if getvar("$vball_lvl") >= 50>>
				<<setn $vball_deg -= 1>>

			<</if>>
			<<if $pc.alko >= 10>>
				<<if $pc.skillLevel("strength") > 10>>
					<<setn $stren_deg -= 1>>

				<</if>>
				<<if getvar("$pc.vitality") > 10>>
					<<setn $vital_deg -= 1>>

				<</if>>
				<<if $pc.skillLevel("intelligence") > 10>>
					<<setn $intel_deg -= 1>>

				<</if>>
				<<set $pc.alko -= rand(0,1)>>
			<</if>>
		<</if>>
		<<set $pc.alko -= rand(0,1)>>
	<<elseif $pc.alko < 0>>
		<<set $pc.alko = 0>>
	<</if>>
	<<if getvar("$shame") > 0>>
		<<setn $shame -= 1>> <<setn $pc.mood -= 5>>

	<</if>>
	<<if getvar("$smoker") >= 20 and getvar("$NarkImmune") == 0>>
		<<setn $smokerNeed += 1>>

	<</if>>
	<<if getvar("$smokerNeed") > 10 and getvar("$insleep") == 0 and $pc.mood > 20 and getvar("$NarkImmune") == 0>>
		<<set $pc.mood -= $pc.mood / 10>>

	<</if>>
	<<if getvar("$smokerNeed") > 300>>
		<<set $smokerNeed = 0>> <<set $smoker = 0>>

	<</if>>
	<<if $pc.strongNarkota > 0>>
		<<set $pc.mood -= (40 / $pc.strongNarkota)>> <<setn $pc.strongNarkota -= 1>>

	<</if>>
	<<if getvar("$amphWithdrawl") >= 5>>
		<<setn $amphWithdrawl += 1>> <<set $pc.mood -= ($amphWithdrawl / 5)>>

	<</if>>
	<<if getvar("$amphHigh") > 0>>
		<<if getvar("$amphWithdrawl") < 2>>
			<<set $amphWithdrawl = 2>>

		<</if>>
		<<set $amphetamineBonus = 3>>
		<<set $amphHigh -= 4>>
		<<set $pc.mood += (2 * $amphHigh)>>
	<<elseif getvar("$amphHigh") <= 0 and getvar("$amphWithdrawl") == 2>>
		<<if getvar("$amphIntake") > 0>>
			<<set $amphIntake -= 1>>
		<<else>>
			<<set $amphWithdrawl = 0>>
		<</if>>
		<<set $amphHigh = 0>>
		<<set $amphetamineBonus = 2>>
		<<set $pc.mood -= $pc.mood / 10>>
	<<elseif getvar("$amphIntake") > 0>>
		<<set $amphWithdrawl += 1>>
	<<elseif getvar("$amphHigh") == 0 and getvar("$amphWithdrawl") == 0>>
		<<set $amphetamineBonus = 1>>
	<</if>>
	<<if getvar("$amphWithdrawl") > 169>>
		<<set $amphWithdrawl = 1>> <<set $amphetamineBonus = 1>> <<set $amphCount = 0>>

	<</if>>
	<<if getvar("$SLomka") > 0 and $pc.mood > 10>>
		<<setn $SLomka += 1>> <<set $pc.mood -= $pc.mood / 10>>

	<</if>>
	<<if getvar("$SLomka") > 100 and $pc.strongNarkota <= 0>>
		<<set $SLomka = 0>> <<set $SNarkTimes = 0>>

	<</if>>
	<<if getvar("$jointhigh") > 0>>
		<<setn $jointhigh -= 1>>

	<</if>>
	<<if getvar("$pc.narkoman") == 1 and $pc.narkday != $time.daystart>>
		<<set $pc.pcs_health -= 5>>
		<<if $pc.mood > 40>>
			<<set $pc.mood -= 40>>
		<<else>>
			<<set $pc.mood = 5>>
		<</if>>
	<</if>>
	<<if !$wardrobe.isWearingPanties and $wardrobe.PCloPants > 0 and $wardrobe.PCloPanties == 0 and $wardrobe.clothingworntype != 'nude' and $pc.trait('commando_lvl') < 2>>
		<<if $pc.trait('commando_lvl') < 1>>
			<<set $mosol += 2>>
		<<elseif $pc.trait('commando_lvl') == 1>>
			<<set $mosol += 1>>
		<</if>>
		<<if getvar("$mosol") >= 100>>
			<<setn $pc.mood -= 5>>

		<</if>>
		<<if getvar("$mosol") >= 60 and $pc.pain('pubic') < 80>>
			<<gs 'pain' 1 'pubic' 'ache'>>

		<</if>>
	<</if>>

	<<if getvar("$mosol") > 0>>
		<<if $wardrobe.isWearingPanties or $wardrobe.clothingworntype == 'nude' or $wardrobe.PCloPanties == 1>>
			<<set $mosol -= rand(0,1)>>

		<</if>>
	<</if>>

	<<if getvar("$sickstage") == 1>>
		<<setn $sick += 1>> <<setn $sicktimer += 1>>

	<</if>>
	<<if getvar("$sickstage") == 1 and getvar("$sicktimer") >= 80>>
		<<set $sicktimer = 0>> <<set $sickstage = 2>>

	<</if>>
	<<if getvar("$sickstage") == 2 and getvar("$sick") > 0>>
		<<setn $sick -= 1>>

	<</if>>
	<<if getvar("$sickstage") == 2 and getvar("$sick") <= 0>>
		<<set $sick = 0>> <<set $sickstage = 0>>

	<</if>>
	<<if getvar("$perkice") > 0>>
		<<setn $perkice -= 1>>

	<</if>>
	<<if $pc.frost > 0>>
		<<setn $pc.frost -= 1>>

	<</if>>
	<<if getvar("$KGOLpers") > 0>>
		<<if $KGHP < $KGHPMAX>>
			<<setn $KGHP += 10>>

		<</if>>
		<<if $KGMana < $KGManaMax>>
			<<setn $KGMana += 10>>

		<</if>>
	<</if>>
	<!-- !! Panty happiness gain-->
	<<if $pc.mood < 60 and $wardrobe.pantyworntype == 'cats'>>
		<<setn $pc.mood += 2>>

	<</if>>
	<<if $pc.mood < 60 and $wardrobe.braworntype == 'cats'>>
		<<setn $pc.mood += 2>>

	<</if>>
	<!-- !!Arousal adjustments-->
	<<if (getvar("$PanThinness") >= 5 and getvar("$BraThinness") >= 5) and $pc.horny < 25>>
		<<set $pc.horny += 10>>
	<<elseif $pc.horny < 10 and (getvar("$PanThinness") >= 5 or getvar("$BraThinness") >= 5)>>
		<<set $pc.horny += 5>>
	<</if>>
	<<if getvar("$aphrodisiac_timer") >= 1>>
		<<if $pc.horny < 80>>
			<<set $pc.horny = 80>>
		<<else>>
			<<set $pc.horny += 10>>
		<</if>>
		<<set $aphrodisiac_timer -= 1>>
	<</if>>
	<<if $wardrobe.isWearingPanties and $pc.clit_size >= 25 and $pc.horny < 60>>
		<<setn $pc.horny += 20>>

	<</if>>
	<<if getvar("$insleep") == 0>>
		<<gs 'sweat' 'add' `rand(0,1)`>>
		<<if $weather.temperature >= 20>>
			<<gs 'sweat' 'add' `rand(0,1)`>>

		<</if>>
	<</if>>
	<!-- ! vovan edition, from 1.2.5-->
	<<if getvar("$huntersAndreisex") > 0>>
		<<setn $huntersAndreisex -= 1>>

	<</if>>
	<<if getvar("$huntersSergeisex") > 0>>
		<<setn $huntersSergeisex -= 1>>

	<</if>>
	<<if getvar("$huntersIgorsex") > 0>>
		<<setn $huntersIgorsex -= 1>>

	<</if>>
	<<if getvar("$huntslutsex") > 0>>
		<<setn $huntslutsex -= 1>>

	<</if>>
	<<if getvar("$mira_go_blok") > 0>>
		<<setn $mira_go_blok -= 1>>

	<</if>>
	<<if getvar("$mira_no_home") > 0>>
		<<setn $mira_no_home -= 1>>

	<</if>>
	<<gs 'traits' 'hourly'>>

	<!-- !! I do not think that this should be here, but I put it here temporaly - rachels-->
	<!-- !! generate SMS for nerd games-->
	<<if rand(0,2) == 0 and $time.hour > 10 and $time.hour < 16 and $time.weekday == 1 and getvar("$time.yearstart") == 1 and $quest('school').func('isGroupMember','nerds') and $nerd_game['invite_day'] < $time.daystart>>
		<<gs 'nerd_game_night' 'summer_invite_sms' 'Add SMS'>>

	<</if>>
	<<if rand(0,2) == 0 and $time.hour > 10 and $time.hour < 16 and $time.weekday == 1 and getvar("$time.yearstart") > 1 and getvar("$nerd_game['fixed_uni_day']") == 0 and getvar("$nerd_game['stage']") > 0 and $nerd_game['invite_day'] < $time.daystart>>
		<<gs 'nerd_game_night' 'summer2_invite_sms' 'Add SMS'>>

	<</if>> */

:: stat_15minutes_changes
/*
		<<if $pc.horny > 100>>
			<<set $Trig15Minute = $totminut>>
		<<else>>
			<<set $Trig15Minute += 15>>
			<!-- ! WD: Fix vibrator arousal to trigger every 15 minutes, moved from 'time' location-->
			<<if $pc.vibratorin == 1>>
				<<set $pc.horny += rand(1, 5)>>

			<</if>>
			<!-- ! WD: Fixed Piecing arousal to trigger every 15 minutes, instead of once per day-->
			<<if $pc.horny < 70>>
				<<set $hornystat = 0>>
				<<if $pc.decoGet('piercing','nipple') > 0 and $pc.decoGet('piercing','nipple') < 10000>>
					<<setn $hornystat += 1>>

				<</if>>
				<<if $pc.decoGet('piercing','pussy') > 0 and $pc.decoGet('piercing','pussy') < 10000>>
					<<setn $hornystat += 1>>

				<</if>>
				<<set $hornyStat = $hornystat * 4>>
				<<if $pc.decoGet('piercing','tongue') > 0 and $pc.decoGet('piercing','tongue') < 10000>>
					<<setn $hornystat += 1>>

				<</if>>
				<<if $pc.decoGet('piercing','lip') > 0 and $pc.decoGet('piercing','lip') < 10000>>
					<<setn $hornystat += 1>>

				<</if>>
				<<if $pc.decoGet('piercing','ears') > 0 and $pc.decoGet('piercing','ears') < 10000>>
					<<setn $hornystat += 1>>

				<</if>>
				<<if $pc.decoGet('piercing','nose') > 0 and $pc.decoGet('piercing','nose') < 10000>>
					<<setn $hornystat += 1>>

				<</if>>
				<<if $pc.decoGet('piercing','eyebrow') > 0 and $pc.decoGet('piercing','eyebrow') < 10000>>
					<<setn $hornystat += 1>>

				<</if>>
				<<if $pc.decoGet('piercing','navel') > 0 and $pc.decoGet('piercing','navel') < 10000>>
					<<setn $hornystat += 1>>

				<</if>>
				<<set $pc.horny += ($hornyStat / 4 + rand(1 , 4) <= $hornyStat % 4) ? 1 : 0>>
			<</if>>
			<!-- ! WD: Clothing-->
			<<if getvar("$CloStyle") == 4 and $pc.horny < 70>>
				<<set $pc.horny += rand(0, 2)>>

			<</if>>
			<<if ($wardrobe.PCloSkirt > 5 or $wardrobe.PCloPants > 5) and $pc.horny < 50>>
				<<set $pc.horny += rand(0, 1)>>

			<</if>>
			<<if $wardrobe.PCloTopCut == 4 and $pc.horny < 50>>
				<<set $pc.horny += rand(0, 1)>>

			<</if>>
		<</if>>
		<!-- !!SECTION: Bimbo (15 minute interval update checks)-->
		<<if getvar("$bimbolevel") == 2>>
			<<if $pc.mood < 100>>
				<<set $pc.mood += (($pc.mood / 100) * (rand(0,1)))>>

			<</if>>
			<<if $pc.horny < 25>>
				<<set $pc.horny = 25>>

			<</if>>
			<<if $pc.horny < 100>>
				<<setn $pc.horny += 1>>

			<</if>>
		<</if>>
		<<if getvar("$bimbolevel") == 3>>
			<<if $pc.mood < 100>>
				<<set $pc.mood += (($pc.mood / 100) * (rand(0,2)))>>

			<</if>>
			<<if $pc.horny < 50>>
				<<set $pc.horny = 50>>

			<</if>>
			<<if $pc.horny < 100>>
				<<setn $pc.horny += 2>>

			<</if>>
		<</if>>
		<!-- !!SECTION: Commando trait (15 minute interval update checks)-->
		<<if $wardrobe.clothingworntype != 'nude'>>
			<<if !$wardrobe.isWearingPanties>>
				<!-- !! Addition to trait exp/lvls-->
				<<if $pc.trait('commando_lvl') == 0>>
					<<if $wardrobe.PCloSkirt > 0>>
						<<run $pc.traitInc('commando_exp',2)>>
					<<else>>
						<<run $pc.traitInc('commando_exp',1)>>
					<</if>>
					<<if $pc.trait('commando_exp') >= 1000>>
						<<run $pc.traitSet('commando_exp',50)>>
						<<run $pc.traitSet('commando_lvl',1)>>
						<<msg 'You have gained the Commando trait! You have become accustomed to the idea you don""t have to wear panties all the time and can now comfortably wear skirts without panties. Pants are still a little itchy though...'>>
					<</if>>
				<<elseif $pc.trait('commando_lvl') == 1>>
					<<run $pc.traitInc('commando_exp',2)>>
					<<if $pc.trait('commando_exp') >= 1000>>
						<<run $pc.traitSet('commando_exp',50)>>
						<<run $pc.traitSet('commando_lvl',2)>>
						<<msg 'You have gained the 2nd level of the Commando trait! You have become very comfortable without panties and the raw insides of your pants no longer irritate your pussy.'>>
					<</if>>
				<<elseif $pc.trait('commando_lvl') == 2>>
					<<set $mosol = 0>>
					<<run $pc.traitInc('commando_exp',2)>>
					<<if $pc.trait('commando_exp') >= 1000>>
						<<run $pc.traitSet('commando_exp',500)>>
						<<run $pc.traitSet('commando_lvl',3)>>
						<<msg 'You have gained the 3rd level of the Commando trait! You have become so accustomed to going commando that any kind of underwear over your hips just feels <i>wrong</i>. You suffer mood penalties while wearing panties.'>>
					<</if>>
				<<elseif $pc.trait('commando_lvl') == 3>>
					<<run $pc.traitInc('commando_exp',1)>>
				<</if>>
			<<elseif $pc.trait('commando_lvl') > 0>>
				<!-- !!Reduction from exp/lvls-->
				<<if $pc.trait('commando_lvl') == 3>>
					<<run $pc.traitDec('commando_exp',1)>>
					<<set $pc.mood -= 1>>
					<<if $pc.trait('commando_exp') <= 0>>
						<<run $pc.traitSet('commando_exp',500)>>
						<<run $pc.traitSet('commando_lvl',2)>>
						<<msg 'You have lost the 3rd level of the Commando trait! You are now only comfortable not wearing panties and will not suffer irritation from wearing pants while going commando.'>>
					<</if>>
				<<else>>
					<<run $pc.traitDec('commando_exp',1)>>
					<<if $pc.trait('commando_exp') <= -0>>
						<<run $pc.traitSet('commando_exp',900)>>
						<<run $pc.traitDec('commando_lvl',1)>>
					<</if>>
				<</if>>
			<</if>>
			<!-- !!{
			if $wardrobe.braworntype = 'none':
			end} -->
		<</if>>
		<!-- !!	This is the Succubus non-direct injection (pun intented) sex to sexnutrition and the sexnutrition conversion handling-->
		<<if getvar("$succubusflag") == 1>>
			<<if $quest('therapist').hypnoAddict > 0>>
				<<RestTherapyVariables>>

			<</if>>
			<<if $pc.horny < 50>>
				<<set $pc.horny = 50>>

			<</if>>
			<<if $pc.horny < 100>>
				<<set $pc.horny += getvar('$succublvl')>>

			<</if>>
			<<if getvar("$succhungry") > 0>>
				<<set $pc.pcs_energy -= $succhungry * getvar('$succublvl')>>
				<<set $pc.pcs_hydra -= $succhungry * getvar('$succublvl')>>
				<<set $pc.pcs_sleep -= $succhungry * getvar('$succublvl')>>
			<</if>>
			<<if arrsize('sparrvol') > 0>>
				<<set $suctempi = -1>>
				<<warn 'JUMP MARKER ENCOUNTERED: :SuccAbsorbLoop'>>
				<<set $suctempi += 1>>
				<<if getvar("$suctempi") <= 1 or getvar("$suctempi") == 3 or getvar("$suctempi") == 4 or getvar("$suctempi") >= 8>>
					<<set $suctemparr = arrpos('sparrloc',suctempi)>>
					<<if getvar("$suctemparr") >= 0 and $sparrloc[$suctemparr] == $suctempi and getvar("$sparrvol["+$suctemparr+"]") > 0>>
						<<set $scfeed = succublvl + rand(1,4)>>
						<<set $sexnutrition += 30 * $scfeed>>
						<<set $succubxp += 5>>
						<<set $cumsumbod -= $sparrvol[$suctemparr]>>
						<!-- !						msg "we've got xp!" + sparrloc[$suctemparr]-->
						<<set $sucabscum = 1>>
						<<gs 'cum_cleanup' 'cleandeposit' $suctemparr>>
						<<setinit $cumloc[$suctempi] = 0>>
						<<set $spdirty = 0>>
						<!-- !debug code $stat_msg += '<BR>Absorb ext <<sexnutrition>>'-->
					<</if>>
				<</if>>
				<<if getvar("$suctempi") < 17>>
					<<warn 'JUMP COMMAND ENCOUNTERED: jump SuccAbsorbLoop'>>

				<</if>>
				<<setinit $pc.cumAtLocation(0) = 0>>
				<<setinit $pc.cumAtLocation(1) = 0>>
				<<setinit $pc.cumAtLocation(2) = 0>>
				<<setinit $pc.cumAtLocation(3) = 0>>
				<<setinit $pc.cumAtLocation(4) = 0>>
				<<setinit $pc.cumAtLocation(5) = 0>>
				<<setinit $pc.cumAtLocation(6) = 0>>
				<<setinit $pc.cumAtLocation(7) = 0>>
				<<setinit $pc.cumAtLocation(8) = 0>>
				<<setinit $pc.cumAtLocation(9) = 0>>
				<<setinit $pc.cumAtLocation(10) = 0>>
				<<setinit $pc.cumAtLocation(11) = 0>>
				<<setinit $pc.cumAtLocation(12) = 0>>
				<<setinit $pc.cumAtLocation(13) = 0>>
				<<setinit $pc.cumAtLocation(14) = 0>>
				<<setinit $pc.cumAtLocation(15) = 0>>
				<<setinit $pc.cumAtLocation(16) = 0>>
				<<setinit $pc.cumAtLocation(17) = 0>>
			<</if>>
			<<if $suclezsex < $lesbian>>
				<<set $sexnutrition += getvar('$succublvl') * 20>>
				<<set $suclezsex = $lesbian>>
				<<set $succubxp += 5>>
				<<set $sucabslez = 1>>
			<</if>>
			<<if getvar("$sexnutrition") > 0>>
				<<if getvar("$sucskill") >= 3 and getvar("$succublvl") >= 2>>
					<<set $sexnutrition += ($sexnutrition * 2) / 10>>

				<</if>>
				<<if getvar("$sucabslez") == 1 and getvar("$sucabscum") == 1>>
					<<set $sucabs1 = 'absorbed energy from the woman you had sex with'>>
					<<set $sucabs2 = ' and you '>>
					<<set $sucabs3 = 'absorb the semen in your body'>>
				<<elseif getvar("$sucabscum") == 1>>
					<<set $sucabs3 = 'absorb the semen in your body'>>
				<<elseif getvar("$sucabslez") == 1>>
					<<set $sucabs1 = 'absorbed energy from the woman you had sex with'>>
				<<else>>
					<!-- !!Debug code-->
					<<set $stat_msg += '<BR>SOMETHING HAPPENED!'>>
				<</if>>
				<<set $stat_msg += '<BR>You $sucabs1$sucabs2$sucabs3, gaining nourishment.'>>
				<<set $sucabslez = 0>> <<set $sucabscum = 0>>
				<<set $sucabs1 = ''>> <<set $sucabs2 = ''>> <<set $sucabs3 = ''>>
				<<if $pc.mood < 100>>
					<<set $pc.mood += (($pc.mood / 100) * 5)>>

				<</if>>
				<<if $pc.pcs_energy > 100>>
					<<set $entemp = ($pc.pcs_energy - 100)>>

				<</if>>
				<<if getvar("$sucexcess") < 0 and getvar("$sexnutrition") > 20 and $pc.pcs_energy > 30>>
					<<if $sexnutrition - 20 >= (0 - sucexcess) * 2>>
						<<set $sexnutrition += $sucexcess * 2>>
						<<set $sucexcess = 0>>
					<<else>>
						<<set $sucexcess += ($sexnutrition - 20) / 2>>
						<<set $sexnutrition = 20>>
					<</if>>
				<</if>>
				<<set $pc.pcs_energy += $sexnutrition / 2>>
				<<set $pc.pcs_hydra += $sexnutrition>>
				<<set $pc.pcs_sleep += $sexnutrition / 20>>
				<<if getvar("$succhungry") > 0>>
					<<set $succhungry = 0>>

				<</if>>
				<<set $sexnutrition = 0>>
				<<if $pc.pcs_energy > 100>>
					<<set $sucexcess += ($pc.pcs_energy - $entemp - 100)>> <<set $pc.pcs_energy = 100 + $entemp>>
				<</if>>
			<</if>>
		<</if>>
		<!-- !! safeguards to prevent bimbolevel from going above or below its intended limits-->
		<<if getvar("$bimbolevel") > 3>>
			<<set $bimbolevel = 3>>

		<</if>>
		<<if getvar("$bimbolevel") < 0>>
			<<set $bimbolevel = 0>>

		<</if>>
<!-- END: stat_15minutes_changes -->
 */
