:: cikl
<<set $here = 'cikl'>>
<<set $ARGS = $location_var[$here]>>
<!-- !!-------------------------------------------------------------------------------------------------------------->
<!-- !!	Masseuse Job (MUST COME BEFORE DAY CHANGES)-->
<!-- !!-------------------------------------------------------------------------------------------------------------->
<<if getvar("$masseuse['jobtype']") < 1>>
	<<setinit $masseuse[$time.weekday + '_shift_1'] = 0>>
	<<setinit $masseuse[$time.weekday + '_shift_2'] = 0>>
	<<setinit $masseuse[$time.weekday + '_shift_3'] = 0>>
<</if>>
<<if ($masseuse[$time.weekday + '_shift_1'] != 0 or $masseuse[$time.weekday + '_shift_2'] != 0 or $masseuse[$time.weekday + '_shift_3'] != 0) and $masseuse['last_worked_day'] != $time.daystart>>
	<<setinit $masseuse['missed_shift2'] = 1>>
<</if>>
<!-- !!------------------------------------------------------------------------------>
<!-- !! Time calculations-->
<!-- !! day = day in this month-->
<!-- !! week = day in the week. 1 == Monday-->
<!-- !! hour = Full hour in this day-->
<<set $time.day += 1>>
<<set $time.weekday += 1>>
<<set $time.hour -= 24>>
<<if $time.day > $time.monthsEnd[$time.month]>>
	<<set $time.day -= $time.monthsEnd[$time.month]>>
	<<set $time.month += 1>>
	<!-- !! Changing the year at new year and making sure February have the correct number of days.-->
	<<if $time.month > 12>>
		<<set $time.month = 1>>
		<<set $time.year += 1>>
		<<if ($time.year % 4 == 0 and $time.year % 100 != 0) or $time.year % 400 == 0>>
			<<setinit $time.monthsend[2] = 29>>
		<<else>>
			<<setinit $time.monthsend[2] = 28>>
		<</if>>
	<</if>>
	<!-- !!MJ: Don't think that one is needed. But it was in the original loop.-->
	<<if $time.month < 1>>
		<<set $time.month = 1>>

	<</if>>
	<<set $time.month_name = $time.monthName[$time.month]>>
	<!-- !! new years party calculation-->
	<<set $temp = setup.func('shortgs','dow',year,12,31)>>
	<<if getvar("$temp") < 6>>
		<<set $nyp_day = 31>>
	<<elseif getvar("$temp") == 6>>
		<<set $nyp_day = 30>>
	<<else>>
		<<set $nyp_day = 29>>
	<</if>>
<</if>>
<!-- !!MJ: Don't think that one is needed. But it was here already.-->
<<if $time.day <= 0>>
	<<set $time.day = 1>>

<</if>>
<<set $ciklNewWeek = 0>>
<<if $time.weekday > 7>>
	<<set $odd_week = iif(odd_week,0,1)>>
	<<set $ciklNewWeek = 1>>
	<<warn 'JUMP MARKER ENCOUNTERED: :loopweek'>>
	<<set $time.weekday -= 7>>
	<<set $husbandrink = 0>>
	<<if getvar("$military") == 1>>
		<<set $military = 0>>

	<</if>>
	<<if $time.weekday > 7>>
		<<warn 'JUMP COMMAND ENCOUNTERED: jump loopweek'>>

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

<!-- !!------------------------------------------------------------------------------>
<!-- !!Fame call to update all the fame variables-->
<<gs 'fame'>>
<!-- !!Cycle stats for Contacts-->
<<gs 'telefon' 'DailyStatRefresh' $ciklNewWeek>>
<!-- !!moving the porn schedule ahead a day, flaffing for missed shootings, if it even matters-->
<<if (getvar("$film") > 0 or getvar("$pornstack") == 1) and getvar("$pfilmNO") == 0 and getvar("$pfilmSTOP") == 0>>
	<<if $pfilmday[0] > 0>>
		<<gs 'pornschedule' 'pornmiss'>>

	<</if>>
	<<gs 'pornschedule' 'schedule'>>
<</if>>
<!-- !! set the time when the SMS will be send-->
<<gs 'booty_call' 'scheduler'>>
<<setinit $booty_call_time['daystart'] = $time.daystart>>
<!-- !!-------------------------------------------------------------------------------------------------------------->
<!-- !!	Job Stuff-->
<!-- !!-------------------------------------------------------------------------------------------------------------->
<!-- !! masseuse paycheck-->
<<if getvar("$masseuse['weeks_pay']") > 0 and $time.weekday == 5>>
	<<setinit $masseuse['paycheck'] = 1>>

<</if>>
<<if getvar("$masseuse['jobtype']") > 0 and $time.weekday == 5 and getvar("$masseuse['weeks_pay']") > 0>>
	<<setinit $masseuse['payday'] = 1>>
<</if>>
<<if $time.weekday == 7 and $masseuse['schedule_update'] != $time.daystart>>
	<<gs 'masseuse_schedule' 'schedule_reset'>>

<</if>>
<!-- !!modelling check-->
<<if $model_week != (daystart - week) / 7>>
	<<set $model_job_week = 0>>

<</if>>
<!-- !!acting strings to set available jobs-->
<<if getvar("$casting") == 1>>
	<<set $acting_string1 = rand(10000000,199999999)>>
	<<set $acting_string2 = rand(10000000,199999999)>>
<</if>>
<!-- !!phone reset for bf-->
<<set $ringA = 0>>
<<set $ringB = 0>>
<<set $ringC = 0>>
<!-- !!Appearance Age-->
<<set $pc.visualAgeDaysInverse -= 1>>
<<if $pc.visualAgeDaysInverse <= 0>>
	<<set $pc.visualAgeDaysInverse = 360>>
	<<set $pc.visualAge += 1>>
<</if>>
<!-- !!Birthday-->
<<set $pc.age = $time.year - (($pcs_dob - ($pcs_dob % 10000)) / 10000)>>
<<if (($time.month * 100) + $time.day) <= $pcs_dob % 10000>>
	<<setn $pc.age -= 1>>

<</if>>
<<if $pc.birthday == $time.day and $pc.birthmonth == $time.month and getvar("$model['age']") > 0>>
	<<setinit $model['age'] += 1>>

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

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

<</if>>
<<if getvar("$husband") > 0>>
	<<setn $husbanday += 1>>

<</if>>
<<if getvar("$husband") > 10 and getvar("$husbanday") > 0>>
	<<setn $husband -= 15>>

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

<</if>>
<<if getvar("$husbandMark") == 1 and getvar("$husband") <= 10>>
	<<set $husbizvradd = 0>>
	<<set $husbharmin = 0>>
	<<set $husbandMark = 0>>
	<<set $husband = 0>>
	<<set $divorced += 1>>
	<<if getvar("$KFOnLineReaga") > 0>>
		<<setn $KFOnLineReaga -= 1>>

	<</if>>
	<b><font color="red">Your husband has filed for a divorce.</font></b>
<</if>>
<!-- !! after having surgery you will be in recuperation for a few days-->
<<if $surgeryday != ''>>
	<<if $time.daystart - 7 <= $surgeryday>>
		<<set $dailyhealthimprov = ($time.daystart - $surgeryday) * 50>>
		<<set $pc.pcs_health = $dailyhealthimprov>>
		<<set $recuperation = 1>>
	<<else>>
		<<set $recuperation to null>>
		<<set $dailyhealthimprov to null>>
	<</if>>
<</if>>

<<if State.getVar('$'+$wardrobe.coatworntype+'_coats_h['+$wardrobe.coatwornnumber+']') <= 0>>
	<<set $wardrobe.coatworntype = 'none'>>

<</if>>
<!-- !! Abortion and pregnancy recovery resets if finished-->
<<if getvar("$abortionbirthdate") != 0 and $time.daystart - getvar("$abortionbirthdate") > 24>>
	<<set $abortionbirthdate = 0>>

<</if>>
<<if getvar("$pc.pregbirthdate") != 0 and $time.daystart - getvar("$pc.pregbirthdate") > 73>>
	<<set $pc.pregbirthdate = 0>>

<</if>>
<!-- !!-------------------------------------------------------------------------------------------------------------->
<!-- !!	Nympho-->
<!-- !!-------------------------------------------------------------------------------------------------------------->
<!-- !! Reserved for nympho trait-->
<<if getvar("$nymphosex_flag") == 1>>
<</if>>
<<set $nymphosex_flag = 0>>
<!-- !!-------------------------------------------------------------------------------------------------------------->
<!-- !!	Bimbo-->
<!-- !!-------------------------------------------------------------------------------------------------------------->
<!-- !!bimbo flag set in stat_display if bimbo clothing, shoes and makeup are worn at same time-->
<<if getvar("$succubusflag") == 0 or getvar("$CheatBimbo2") == 1>>
	<<if getvar("$cheatBimbo") == 0 and getvar("$bimbo_flag") == 1>>
		<<set $bimbo += 1>>
	<</if>>
<</if>>
<!-- !!Once bimbolevel is set to 1, must use the withdrawal in stat to return to 0-->
<<if getvar("$bimbo") > 0 or getvar("$bimbolevel") > 0>>
	<<if getvar("$bimbo") < 10>>
		<<if getvar("$bimbo_flag") == 0>>
			<<set $bimbo -= 2>>
		<</if>>
	<<elseif getvar("$bimbo") < 20>>
		<<set $bimbolevel = 1>>
	<<elseif getvar("$bimbo") < 30>>
		<<set $bimbolevel = 2>>
	<<else>>
		<<set $bimbolevel = 3>>
	<</if>>
<</if>>
<<if getvar("$bimbo") >= 40>>
	<<set $bimbo = 40>>

<</if>>
<!-- !!Bimbo levels. They use custom variables so they won''t permanently change character stats-->
<<if getvar("$bimbolevel") == 0>>
	<<set $supnatvnesh = 0>> <<set $bimbostupidity = 0>>

<</if>>
<<if getvar("$CheatBimbo2") == 0>>
	<<if getvar("$bimbolevel") == 1>>
		<<set $supnatvnesh = 2>> <<set $bimbostupidity = ($pc.skillLevel("intelligence") / 6)>>

	<</if>>
	<<if getvar("$bimbolevel") == 2>>
		<<set $supnatvnesh = 2>> <<set $bimbostupidity = ($pc.skillLevel("intelligence") / 4)>>

	<</if>>
	<<if getvar("$bimbolevel") == 3>>
		<<set $supnatvnesh = 4>> <<set $bimbostupidity = ($pc.skillLevel("intelligence") / 3)>>

	<</if>>
<<elseif getvar("$CheatBimbo2") == 1>>
	<<if getvar("$bimbolevel") == 1>>
		<<set $supnatvnesh = 2>> <<set $bimbostupidity = 0>>

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

	<</if>>
	<<if getvar("$bimbolevel") == 3>>
		<<set $supnatvnesh = 4>> <<set $bimbostupidity = 0>>

	<</if>>
<</if>>
<!-- !!A Succubus cannot be a Bimbo-->
<<if getvar("$succubusflag") == 1 and getvar("$CheatBimbo3") == 0>>
	<<if getvar("$bimbolevel") > 0 and getvar("$bimbo") > 0>>
		<<set $bimbowithdrawal = 40>>

	<</if>>
<<elseif getvar("$bimbolevel") >= 1>>
	<!-- !!Checks flag and adds withdrawal if 0-->
	<<if getvar("$bimbo_flag") == 0>>
		<<set $bimbowithdrawal += 1>>
	<<else>>
		<<set $bimbowithdrawal = 0>>
	<</if>>
<</if>>
<<if getvar("$bimbo") < 0>>
	<<set $bimbo = 0>>

<</if>>
<!-- !! flag reset-->
<<set $bimbo_flag = 0>>
<!-- !!-------------------------------------------------------------------------------------------------------------->
<!-- !!	Butt slut-->
<!-- !!-------------------------------------------------------------------------------------------------------------->
<<if $orgasm_anal > $orgasm_anal[1]>>
	<<if $pc.trait('buttslut_lvl') > 0>>
		<<run $pc.traitInc('buttslut_exp',$orgasm_anal - $orgasm_anal[1])>>

	<</if>>
<<else>>
	<<if $pc.trait('buttslut_exp') > 1>>
		<<run $pc.traitDec('buttslut_exp',1)>>

	<</if>>
<</if>>
<<setinit $orgasm_anal[1] = $orgasm_anal>>
<<if getvar("$orgasm_anal") > 10 and $pc.trait('buttslut_lvl') == 0>>
	<<run $pc.traitSet('buttslut_lvl',1)>>

<</if>>
<<if $pc.trait('buttslut_exp') >= 15 and $pc.trait('buttslut_lvl') == 1>>
	<<run $pc.traitSet('buttslut_lvl',2)>> <<run $pc.traitSet('buttslut_exp',0)>>

<</if>>
<<if $pc.trait('buttslut_exp') >= 50 and $pc.trait('buttslut_lvl') == 2>>
	<<run $pc.traitSet('buttslut_lvl',3)>>

<</if>>
<<if $pc.trait('buttslut_exp') <= 0 and $pc.trait('buttslut_lvl') == 3>>
	<<run $pc.traitSet('buttslut_lvl',2)>> <<run $pc.traitSet('buttslut_exp',0)>>

<</if>>
<!-- !!-------------------------------------------------------------------------------------------------------------->
<!-- !!	Exhibitionism-->
<!-- !!-------------------------------------------------------------------------------------------------------------->
<<if getvar("$pcs_exhib") > 0 or getvar("$exhibitionist_lvl") > 0>>
	<<if getvar("$pcs_exhib") < 10>>
		<<set $pcs_exhib -= 1>>
	<<elseif getvar("$pcs_exhib") < 50>>
		<<set $exhibitionist_lvl = 1>>
	<<elseif getvar("$pcs_exhib") < 100 or getvar("$exhibitionQW") < 3>>
		<<set $exhibitionist_lvl = 2>>
	<<elseif getvar("$exhibitionQW") > 2>>
		<<set $exhibitionist_lvl = 3>>
	<</if>>
<</if>>
<!-- !!Inhibition increases from wearing revealing clothing-->
<<if getvar("$exhibition_outdoors") > 0>>
	<<if $pc.pcs_inhib > 90>>
		<<set $exhibition_outdoors = $exhibition_outdoors * 3>>
	<<elseif $pc.pcs_inhib > 75>>
		<<set $exhibition_outdoors = $exhibition_outdoors * 5 / 2>>
	<<elseif $pc.pcs_inhib > 60>>
		<<set $exhibition_outdoors = $exhibition_outdoors * 2>>
	<<elseif $pc.pcs_inhib > 30>>
		<<set $exhibition_outdoors = $exhibition_outdoors * 3 / 2>>
	<</if>>
	<<if getvar("$exhibition_outdoors") <= 5>>
		<<run $pc.skillExperienceGain('inhibition',rand(3,6))>>
	<<elseif getvar("$exhibition_outdoors") <= 10>>
		<<run $pc.skillExperienceGain('inhibition',rand(5,9))>>
	<<elseif getvar("$exhibition_outdoors") <= 15>>
		<<run $pc.skillExperienceGain('inhibition',rand(7,12))>>
	<<elseif getvar("$exhibition_outdoors") <= 20>>
		<<run $pc.skillExperienceGain('inhibition',rand(9,15))>>
	<<elseif getvar("$exhibition_outdoors") <= 25>>
		<<run $pc.skillExperienceGain('inhibition',rand(12,20))>>
	<<elseif getvar("$exhibition_outdoors") <= 30>>
		<<run $pc.skillExperienceGain('inhibition',rand(16,25))>>
	<<elseif getvar("$exhibition_outdoors") <= 35>>
		<<run $pc.skillExperienceGain('inhibition',rand(20,30))>>
	<<elseif getvar("$exhibition_outdoors") <= 40>>
		<<run $pc.skillExperienceGain('inhibition',rand(25,40))>>
	<<elseif getvar("$exhibition_outdoors") <= 50>>
		<<run $pc.skillExperienceGain('inhibition',rand(35,50))>>
	<<elseif getvar("$exhibition_outdoors") <= 65>>
		<<run $pc.skillExperienceGain('inhibition',rand(50,75))>>
	<<else>>
		<<run $pc.skillExperienceGain('inhibition',rand(70,100))>>
	<</if>>
<</if>>
<<set $exhibition_outdoors = 0>>
<!-- !!-------------------------------------------------------------------------------------------------------------->
<!-- !!	Everything is new again-->
<!-- !!-------------------------------------------------------------------------------------------------------------->
<!-- !!Trait ''Everything is new again'', gained from the sg_tg start-->
<<if $start_type == 'sg_tg' and $time.daystart == 85>>
	<<gs 'traits' 'dbl_exp_lvl'>>

<</if>>
<!-- !!-------------------------------------------------------------------------------------------------------------->
<!-- !!	Succubus Level & hunger calcs-->
<!-- !!-------------------------------------------------------------------------------------------------------------->
<<if getvar("$succubusflag") == 1>>
	<<gs 'succubus' 'cikl'>>

<</if>>
<!-- !!-------------------------------------------------------------------------------------------------------------->
<<if getvar("$defcurly") == 0 and getvar("$curly") > 0>>
	<<setn $curly -= 1>>

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

	<</if>>
	<<if getvar("$straight") == 0>>
		<<set $curly = 2147483647>>

	<</if>>
<</if>>
<!-- ! WD: Added daily reduction of braids for Maruda Hair Mod-->
<<if getvar("$hbraids") > 0>>
	<<setn $hbraids -= 1>>

<</if>>
<<run $pc.sweatAdd(2)>>
<<if $pc.tan > 0>>
	<<setn $pc.tan -= 1>>

<</if>>
<<if getvar("$prezikmsg") == 2>>
	<<set $prezikmsg = 3>>

<</if>>
<<gs 'fertility' 'birth_control'>>
<<if getvar("$birth_control['think_safe']") == 1>>
	<<run $pc.sexStatSet('forgot_bc_pill','aware',0)>>
<<elseif $pilldaychk < $time.daystart - 1 and $pilldaychk > $time.daystart - 5 and getvar("$pillcon2") > 0>>
	<<run $pc.sexStatSet('forgot_birth_control_pill','aware',1)>>
	<!-- !!	stat['forget_bc_count'] += 1-->
<</if>>
<<run $pc.sexStatSet('safe_day','aware',0)>>
<<run $pc.sexStatSet('probably_safe_day','aware',0)>>
<<run $pc.sexStatSet('dangerous_day','aware',0)>>
<<if getvar("$cycle") > 3>>
	<<run $pc.sexStatSet('safe_day','aware',1)>>
<<elseif getvar("$cycle") == 0 or getvar("$cycle") == 3>>
	<<run $pc.sexStatSet('probably_safe_day','aware',1)>>
<<else>>
	<<run $pc.sexStatSet('dangerous_day','aware',1)>>
<</if>>
<!-- !!-------------------------------------------------------------------------------------------------------------->
<<if $pc.pcs_breath == 1>>
	<<set $pc.pcs_breath = 0>>

<</if>>
<<if getvar("$cheatNoEat") == 1 and getvar("$dounspell") == 1>>
	<<setn $pc.fat += 15>>

<</if>>
<!-- !!STD check-->
<<if getvar("$SifacOnce") == 1>>
	<<setn $Sifilis += 1>>

<</if>>
<<if getvar("$GerpesOnce") == 1>>
	<<setn $Gerpes += 1>>

<</if>>
<<if getvar("$TriperOnce") == 1>>
	<<if getvar("$Triper") > 0>>
		<<set $Triper += 1>>
	<</if>>
	<<if getvar("$TriperOral") > 0>>
		<<set $TriperOral += 1>>
	<</if>>
	<<if getvar("$TriperOral") > 14 and getvar("$TriperNapr") == 0>>
		<<if rand(TriperOral,100) > 80>>
			<<set $TriperOral = 0>>
			<<if getvar("$Triper") == 0>>
				<<set $TriperOnce = 0>>

			<</if>>
			<<set $TriperOralSigns = 0>>
		<</if>>
	<</if>>
<</if>>
<<if getvar("$KandidozOnce") == 1>>
	<<setn $Kandidoz += 1>>

<</if>>
<<set $Venera = 0>>
<<if getvar("$SifacOnce") == 1>>
	<<setn $Venera += 1>>

<</if>>
<<if getvar("$GerpesOnce") == 1>>
	<<setn $Venera += 1>>

<</if>>
<<if getvar("$TriperOnce") == 1>>
	<<setn $Venera += 1>>

<</if>>
<!-- !! Fail safe-->
<<if getvar("$ashrinkdays") == 0>>
	<<set $ashrinkdays = 6>>

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

<</if>>
<<if $pc.pcs_ass > 1 and getvar("$ashrink") > 0 and getvar("$pc.analplugin") == 0>>
	<<if daystart mod(ashrinkdays) == 0>>
		<<set $pc.pcs_ass -= $ashrink>>

	<</if>>
	<<if $pc.pcs_ass < 0>>
		<<set $pc.pcs_ass = 0>>

	<</if>>
<</if>>
<<if $pc.pcs_vag > 10 and getvar("$vshrink") > 0>>
	<<if daystart mod(vshrinkdays) == 0>>
		<<set $pc.pcs_vag -= $vshrink>>

	<</if>>
	<<if $pc.pcs_vag < 0>>
		<<set $pc.pcs_vag = 0>>

	<</if>>
<</if>>
<<set $lipkoef -= rand(0,1)>>
<<if getvar("$lipkoef") <= 0>>
	<<set $lipkoef = 0>>

<</if>>
<<if getvar("$isprok") == 1 or getvar("$isprokp") == 1>>
	<<set $isprok_lastday = 1>>
<<else>>
	<<set $isprok_lastday = 0>>
<</if>>
<<if getvar("$Enable_autotampon") == 0 and getvar("$isprok") == 1>>
	<<set $isprok = 0>>

<</if>>
<<if getvar("$Enable_autotampon") == 0 and getvar("$isprokp") == 1>>
	<<set $isprokp = 0>>

<</if>>
<<if $pc.preg == 1>>
	<<set $pc.pregtime = $pc.pregchem / 24>>
	<<if getvar("$pc.pregtimes") == 0>>
		<<set $pc.pregtimes = 1>>

	<</if>>
<<elseif $pc.preg == 2 and $pc.pregminut < $totminut>>
	<<if getvar("$Enable_nogameover") == 0>>
		 		<<set $pc.gameover= 4>>
		<<msg '<center><b>A horrible pain shoots through your body.</b></center>'>>
		<<xgt 'gameover'>>
		$exit
	<<else>>
		<<msg '<font color=red><B>You should die for giving birth unprepared, but Cheat Mode keeps you Alive.</B></font>'>>
		<<set $pc.pregminut = $time.minutesTimestamp+ 1440>>
	<</if>>
<<elseif $pc.preg == 0>>
	<<gs 'shortgs' 'remove_array_element' 'npc_pregtalk' 'A14'>>
	<<gs 'shortgs' 'remove_array_element' 'npc_pregtalk' 'A16'>>
	<<gs 'shortgs' 'remove_array_element' 'npc_pregtalk' 'A23'>>
	<<gs 'shortgs' 'remove_array_element' 'npc_pregtalk' 'A28'>>
	<<gs 'shortgs' 'remove_array_element' 'npc_pregtalk' 'A29'>>
	<<gs 'shortgs' 'remove_array_element' 'npc_pregtalk' 'A33'>>
	<<gs 'shortgs' 'remove_array_element' 'npc_pregtalk' 'A34'>>
	<<gs 'shortgs' 'remove_array_element' 'npc_pregtalk' 'A69'>>
	<<gs 'shortgs' 'remove_array_element' 'npc_pregtalk' 'A131'>>
	<!-- !{killvar 'pregTalkFamily' -- Do not kill this (Abortion talk).} -->
	<<set $pcs_pregtalk to null>>
	<<set $pc.pregTalk to null>>
	<<set $pc.pregtime to null>>
	<<set $pc.knowpreg to null>>
	<<set $denypreg to null>>
	<<set $wombthfath to null>>
<</if>>
<!-- !!-------------------------------------------------------------------------------------------------------------->
<!-- !!	Arousal-->
<!-- !!-------------------------------------------------------------------------------------------------------------->
<<if setup.startingCharacterTagsIncludes('magic')>>
	<<if $pc.horny < 100>>
		<<set $pc.horny += $pc.pcs_vag>>

	<</if>>
<<else>>
	<<if $pc.thinksIsVirgin>>
		<<set $razeba = 0>>
		<<if $pc.horny > 0 and $pc.horny <= 50>>
			<<setn $pc.horny -= 10>>

		<</if>>
		<<if $pc.horny > 50>>
			<<setn $pc.horny -= 25>>

		<</if>>
	<<elseif !$pc.thinksIsVirgin>>
		<<if getvar("$pc.pregtimes") == 0>>
			<<if getvar("$pc.age") < 18>>
				<<set $razeba = 1>>
				<<if $pc.horny > 0 and $pc.horny <= 50>>
					<<setn $pc.horny -= 5>>

				<</if>>
				<<if $pc.horny > 50 and $pc.horny < 80>>
					<<setn $pc.horny -= 10>>

				<</if>>
				<<if $pc.horny >= 80>>
					<<setn $pc.horny -= 20>>

				<</if>>
			<<elseif getvar("$pc.age") >= 18 and getvar("$pc.age") < 21>>
				<<set $razeba = 2>>
				<<if $pc.horny > 0 and $pc.horny <= 50>>
					<<setn $pc.horny -= 1>>

				<</if>>
				<<if $pc.horny > 50 and $pc.horny < 80>>
					<<setn $pc.horny -= 5>>

				<</if>>
				<<if $pc.horny >= 80>>
					<<setn $pc.horny -= 10>>

				<</if>>
			<<elseif getvar("$pc.age") >= 21 and getvar("$pc.age") < 25>>
				<<set $razeba = 3>>
				<<if $pc.horny > 0 and $pc.horny <= 50>>
					<<setn $pc.horny += 1>>

				<</if>>
				<<if $pc.horny > 50 and $pc.horny < 80>>
					<<setn $pc.horny -= 1>>

				<</if>>
				<<if $pc.horny >= 80>>
					<<setn $pc.horny -= 5>>

				<</if>>
			<<elseif getvar("$pc.age") >= 25 and getvar("$pc.age") < 30>>
				<<set $razeba = 4>>
				<<if $pc.horny > 0 and $pc.horny <= 50>>
					<<setn $pc.horny += 5>>

				<</if>>
				<<if $pc.horny > 50 and $pc.horny < 80>>
					<<setn $pc.horny += 1>>

				<</if>>
				<<if $pc.horny >= 80>>
					<<setn $pc.horny -= 5>>

				<</if>>
			<<elseif getvar("$pc.age") >= 30>>
				<<set $razeba = 5>>
				<<if $pc.horny > 0 and $pc.horny <= 50>>
					<<setn $pc.horny += 10>>

				<</if>>
				<<if $pc.horny > 50 and $pc.horny < 80>>
					<<setn $pc.horny += 5>>

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

				<</if>>
			<</if>>
		<<elseif getvar("$pc.pregtimes") > 0>>
			<<if $pc.preg == 0>>
				<<set $razeba = 5>>
				<<if $pc.horny > 0 and $pc.horny <= 50>>
					<<setn $pc.horny += 10>>

				<</if>>
				<<if $pc.horny > 50 and $pc.horny < 80>>
					<<setn $pc.horny += 5>>

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

				<</if>>
			<<elseif $pc.preg > 0>>
				<<set $razeba = 6>>
				<<if $pc.horny < 100>>
					<<set $pc.horny += $pc.pregchem / 240>>

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

<</if>>
<!-- !!-------------------------------------------------------------------------------------------------------------->
<!-- !reset Natasha Belova''s clothes-->
<<if getvar("$NatbelQW['seethroughwearing']") == 1>>
	<<setinit $NatbelQW['seethroughwearing'] = 0>>

<</if>>
<!-- !!-------------------------------------------------------------------------------------------------------------->
<!-- !counter for Dimka avoidance-->
<<if getvar("$dimaFilm") == 1 and getvar("$dimaRudeBlock") == 0>>
	<<set $nodimkaK += 1>>
	<<set $DimkaWarnedToday = 0>>
<</if>>
<!-- !!-------------------------------------------------------------------------------------------------------------->
<!-- !!Fame degradation-->
<<gs 'fame' 'deg'>>
<!-- !!Traits-->
<<gs 'traits' 'overnight'>>
<!-- !!-------------------------------------------------------------------------------------------------------------->
<!-- !!cocaine reduction-->
<<if $pc.nark > 60>>
	<<set $pc.nark = 60>>
<<elseif $pc.nark > 30>>
	<<set $pc.nark -= 3>>
<<elseif $pc.nark > 0>>
	<<set $pc.nark -= 1>>
<</if>>
<<if getvar("$pc.pregchem") > 240>>
	<<setn $pc.fat += 1>>

<</if>>
<!-- !!-------------------------------------------------------------------------------------------------------------->
<!-- !!	Pain-->
<!-- !!-------------------------------------------------------------------------------------------------------------->
<<if $pc.pain('head') > 0>>
	<<run $pc.painDec('head',rand(1,3))>>

<</if>>
<<if $pc.pain('hair') > 0>>
	<<run $pc.painDec('hair',rand(1,3))>>

<</if>>
<<if $pc.pain('ears') > 0>>
	<<run $pc.painDec('ears',rand(1,3))>>

<</if>>
<<if $pc.pain('eyebrows') > 0>>
	<<run $pc.painDec('eyebrows',rand(1,3))>>

<</if>>
<<if $pc.pain('eyes') > 0>>
	<<run $pc.painDec('eyes',rand(1,3))>>

<</if>>
<<if $pc.pain('cheeks') > 0>>
	<<run $pc.painDec('cheeks',rand(1,3))>>

<</if>>
<<if $pc.pain('nose') > 0>>
	<<run $pc.painDec('nose',rand(1,3))>>

<</if>>
<<if $pc.pain('mouth') > 0>>
	<<run $pc.painDec('mouth',rand(1,3))>>

<</if>>
<<if $pc.pain('lips') > 0>>
	<<run $pc.painDec('lips',rand(1,3))>>

<</if>>
<<if $pc.pain('tongue') > 0>>
	<<run $pc.painDec('tongue',rand(1,3))>>

<</if>>
<<if $pc.pain('throat') > 0>>
	<<run $pc.painDec('throat',rand(1,3))>>

<</if>>
<<if $pc.pain('neck') > 0>>
	<<run $pc.painDec('neck',rand(1,3))>>

<</if>>
<<if $pc.pain('back') > 0>>
	<<run $pc.painDec('back',rand(1,3))>>

<</if>>
<<if $pc.pain('asscheeks') > 0>>
	<<run $pc.painDec('asscheeks',rand(1,3))>>

<</if>>
<<if $pc.pain('asshole') > 0>>
	<<run $pc.painDec('asshole',rand(1,3))>>

<</if>>
<<if $pc.pain('hips') > 0>>
	<<run $pc.painDec('hips',rand(1,3))>>

<</if>>
<<if $pc.pain('thighs') > 0>>
	<<run $pc.painDec('thighs',rand(1,3))>>

<</if>>
<<if $pc.pain('legL') > 0>>
	<<run $pc.painDec('legL',rand(1,3))>>

<</if>>
<<if $pc.pain('legR') > 0>>
	<<run $pc.painDec('legR',rand(1,3))>>

<</if>>
<<if $pc.pain('feet') > 0>>
	<<run $pc.painDec('feet',rand(1,3))>>

<</if>>
<<if $pc.pain('toes') > 0>>
	<<run $pc.painDec('toes',rand(1,3))>>

<</if>>
<<if $pc.pain('shoulders') > 0>>
	<<run $pc.painDec('shoulders',rand(1,3))>>

<</if>>
<<if $pc.pain('armL') > 0>>
	<<run $pc.painDec('armL',rand(1,3))>>

<</if>>
<<if $pc.pain('armR') > 0>>
	<<run $pc.painDec('armR',rand(1,3))>>

<</if>>
<<if $pc.pain('hands') > 0>>
	<<run $pc.painDec('hands',rand(1,3))>>

<</if>>
<<if $pc.pain('fingers') > 0>>
	<<run $pc.painDec('fingers',rand(1,3))>>

<</if>>
<<if $pc.pain('chest') > 0>>
	<<run $pc.painDec('chest',rand(1,3))>>

<</if>>
<<if $pc.pain('breasts') > 0>>
	<<run $pc.painDec('breasts',rand(1,3))>>

<</if>>
<<if $pc.pain('nipples') > 0>>
	<<run $pc.painDec('nipples',rand(1,3))>>

<</if>>
<<if $pc.pain('ribs') > 0>>
	<<run $pc.painDec('ribs',rand(1,3))>>

<</if>>
<<if $pc.pain('tummy') > 0>>
	<<run $pc.painDec('tummy',rand(1,3))>>

<</if>>
<<if $pc.pain('pubic') > 0>>
	<<run $pc.painDec('pubic',rand(1,3))>>

<</if>>
<<if $pc.pain('vaginal') > 0>>
	<<run $pc.painDec('vaginal',rand(1,3))>>

<</if>>
<<if $pc.pain('labia') > 0>>
	<<run $pc.painDec('labia',rand(1,3))>>

<</if>>
<<if $pc.pain('clitoris') > 0>>
	<<run $pc.painDec('clitoris',rand(1,3))>>

<</if>>
<<if $pc.pain('urethra') > 0>>
	<<run $pc.painDec('urethra',rand(1,3))>>

<</if>>
<<if $pc.pain('cervix') > 0>>
	<<run $pc.painDec('cervix',rand(1,3))>>

<</if>>
<<if getvar("$painpub") == 2>>
	<<if $painpubday + 5 < $time.daystart>>
		<<set $painpub = 'Your vulva is painfully sore.'>>
		<<set $painpub = 1>>
		<<set $painpubday = $time.daystart>>
	<<elseif $painpubday + 5 >= $time.daystart>>
		<<set $painpub = 'Your vulva is painfully sore.'>>
	<</if>>
<<elseif getvar("$painpub") == 1>>
	<<if $painpubday + 5 < $time.daystart>>
		<<set $painpub = ''>>
		<<set $painpub = 0>>
		<<set $painpubday = $time.daystart>>
	<<elseif $painpubday + 5 >= $time.daystart>>
		<<set $painpub = 'Your vulva is a little sore.'>>
	<</if>>
<</if>>
<<if getvar("$pirs_pain_ton") > 0>>
	<<setn $pirs_pain_ton -= 1>>

<</if>>
<<if getvar("$shorthair") == 1>>
	<<set $shorthairday += 1>>
	<<if getvar("$shorthairday") >= 45>>
		<<set $shorthairday = 0>> <<set $shorthair = 0>>

	<</if>>
<</if>>
<!-- !!-------------------------------------------------------------------------------------------------------------->
<!-- !!Resetting the counter for relationship modifications that are limited in how many time a day they can be applied.-->
<<set $npc_rel_daily to null>>
<!-- !!Resetting the counters for npc reactions after certain time periods have passed.-->
<<gs 'npc_reactions' 'cikl'>>
<!-- !! Setting the day for nerd game nights-->
<<gs 'nerd_game_night' 'cikl'>>
<!-- !!Keeping Christina hating Sveta-->
<<gs 'Zvereva_events' 'cikl'>>
<!-- !!if Vitek''s ex he never forgives her-->
<<if getvar("$kotovLoveQW") == -1>>
	<<gs 'npc_relationship' 'set' 'A9' '0'>>
<</if>>
<!-- !!Updating Katja''s variables.-->
<<gs 'katja_procedural' 'cikl'>>
<<if $npc('A69').rel > 60 and rand(0,3) == 0>>
	<<run $npcs.dec('A69','rel',1)>>

<</if>>
<!-- !!Making Sonia''s fall progress if the player do not see the scenes at the disco, by making it such that if at a Sunday her fall have not advanced this weekend it will automatically advance.-->
<<gs 'soniadisco' 'cikl'>>
<<set $dmishaevent = 0>>
<<if getvar("$Gspravka") <= 0 and getvar("$GspravkaT") == 1>>
	<<set $GspravkaT = 0>> <<set $Gspravka = 0>>

<</if>>
<<if getvar("$GspravkaT") == 1>>
	<<setn $Gspravka -= 1>>

<</if>>
<<if getvar("$BurgerQW['IlyQW']") == 2 and getvar("$BurgerQW['IlyQWPoliceDayCount']") == 30>>
	<<setinit $BurgerQW['IlyQW'] = 3>>

<</if>>
<<if getvar("$BurgerQW['IlyQW']") == 2 and getvar("$BurgerQW['IlyQWPoliceDayCount']") > 0 and getvar("$BurgerQW['IlyQWPoliceDayCount']") < 30>>
	<<setinit $BurgerQW['IvanQWPoliceDayCount'] += 1>>

<</if>>
<!-- !!Remove degradation for inhibition-->
<<set $inhib_flr = $inhib_lvl>>
<<gs 'stat_sklattrib' 'daycall'>>

<<gs 'body_desc'>>
<<if getvar("$husband") > 0 and getvar("$husbandrink") != 11>>
	<<set $husbandrink = rand(0, 10)>>

<</if>>
<!-- !!Pussy_Kats job settings-->
<<set $inWorkYoungShop = 0>>
<<if $time.weekday == 1 and getvar("$young_shop_work") == 100>>
	<<set $young_shop_work = 1>>

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

<</if>>
<<if $time.weekday == 1 and getvar("$young_shop_work2") == 100>>
	<<set $young_shop_work2 = 1>>

<</if>>
<<set $husbandsexday = 0>>
<<set $borsexkol = 0>>
<<set $givisexday = 0>>
<<if getvar("$shantsr") > 0>>
	<<set $pay = $shantsr * 5000>>
	<<set $finances.bank += $pay>>
	<<set $shantsr = 0>>
<</if>>
<<if getvar("$shantbog") > 0>>
	<<warn 'JUMP MARKER ENCOUNTERED: :shantftb'>>
	<<set $shantftbgrand = rand(0, 10)>>
	<<if getvar("$shantftbgrand") > 2>>
		<<set $shantpopala += 1>>
		<<set $shantbog -= 1>>
		<<if getvar("$shantbog") > 0>>
			<<warn 'JUMP COMMAND ENCOUNTERED: jump shantftb'>>

		<</if>>
	<<elseif getvar("$shantftbgrand") <= 2>>
		<<set $finances.bank += 30000>>
		<<set $shantbog -= 1>>
		<<if getvar("$shantbog") > 0>>
			<<warn 'JUMP COMMAND ENCOUNTERED: jump shantftb'>>

		<</if>>
	<</if>>
<</if>>
<<set $petersexday = 0>>
<<set $klismaday1 = 0>>
<!-- !!ugly duckling start becoming a swan-->
<<if getvar("$uglyduck_flag") == 1 and $pc.hotcat >= 5>>
	<<set $uglyduck_flag to null>>
	<<gs 'npc_relationship' 'socialgroup_setting_boys' 10 10 10 10 0 0>>
	<<run $quest('school').func('groupRelInc','cool',100)>>
	<<setinit $old_grupvalue[1] += 100>>
<</if>>
<!-- !! Resetting relationships that go over the max-->
<<warn 'JUMP MARKER ENCOUNTERED: :toptemprel'>>
<<if $temprel < $aarraynumber>>
	<<set $temprel += 1>>
	<<if $npc('A' + '' + $temprel).rel > 100>>
		<<set $npc('A' + '' + $temprel).rel = 100>>

	<</if>>
	<<warn 'JUMP COMMAND ENCOUNTERED: jump toptemprel'>>
<</if>>
<<set $temprel to null>>
<<gs 'bank' 'cikl'>>
<<set $pcs_ate to null>>
<<set $pcs_drank to null>>
<!-- !! THIS IS THE OLD SYSTEM. Only keeping this in while it's still in use as reference for the old variables, otherwise THESE VALUES ARE NOT THE CORRECT ONES FOR NEW VARIABLES-->
<!-- !!sisboyparty-->
<!-- !!-1 - don't go to the party-->
<!-- !!0 - don't know about parties-->
<!-- !!1 - knows about the parties-->
<!-- !!2 - agreed to go to the party-->
<!-- !!3 - Missed the party-->
<!-- !!Suspension ends-->
<<if $suspended['day'] == $time.daystart>>
	<<setinit $suspended['on'] = 0>>

<</if>>
<<if setup.startingCharacterTagsIncludes('sg')>>
	<!-- !!Party refresh if you didn''t see sis-->
	<<if $time.weekday == 1 and getvar("$sisboyparty") != 2>>
		<<if getvar("$sisterQW['party']") == -1>>
			<<setinit $sisterQW['party'] = 0>>

		<</if>>
		<<if getvar("$sisboypartyQW") >= 2 and getvar("$sisboyparty") > 0>>
			<<set $sisboyparty_day = daystart + rand(3,5)>>
		<</if>>
	<</if>>
	<<if getvar("$sisboyparty") == 2 and $sisboyparty_day + 1 < $time.daystart>>
		<<set $sisboyparty = 3>>

	<</if>>
	<!-- !!Brother''s dick growth as he gets older-->
	<!-- !Commented out till some future time-->
	<!-- !if kolka_dick_day + 30 < daystart and npc_dick['A34'] < 26:-->
	<!-- !	kolka_dick_day = daystart-->
	<!-- !	npc_dick['A34'] += 1-->
	<!-- !end-->
	<!-- !if npc_dick['A34'] < 20 and npc_dick['A34'] > 16:-->
	<!-- !	<<=$npc('A34').thdick>> = 'well proportioned'-->
	<!-- !elseif npc_dick['A34'] >= 20 and npc_dick['A34'] <= 26:-->
	<!-- !	<<=$npc('A34').thdick>> = 'thick'-->
	<!-- !end-->
	<!-- !! Calcualting the increase/decreas of the grade each week.-->
	<<gs 'gschool' 'weekly grade update'>>
<</if>>
<<set $natholi to null>>
<<if $time.month == 1 and $time.day >= 1 and $time.day <= 8>>
	<<set $natholi = 'New Year holidays'>>
	<<set $natholi = 1>>
	<<if $time.day == 1>>
		<<sets $natholi += ', New Year'>>

	<</if>>
	<<if $time.day == 7>>
		<<sets $natholi += ', Christmas'>>

	<</if>>
<</if>>
<<if $time.month == 2 and $time.day == 23>>
	<<set $natholi = 'Defender of Fatherland Day'>> <<set $natholi = 1>>

<</if>>
<<if $time.month == 3 and $time.day == 8>>
	<<set $natholi = 'Women`s Day'>> <<set $natholi = 1>>

<</if>>
<<if $time.month == 5 and $time.day == 1>>
	<<set $natholi = 'Spring and Labor Day'>> <<set $natholi = 1>>

<</if>>
<<if $time.month == 5 and $time.day == 2>>
	<<set $natholi = 'National holiday'>> <<set $natholi = 1>>

<</if>>
<<if $time.month == 5 and $time.day == 9>>
	<<set $natholi = 'Victory Day'>> <<set $natholi = 1>>

<</if>>
<<if $time.month == 6 and $time.day == 12>>
	<<set $natholi = 'Russia Day'>> <<set $natholi = 1>>

<</if>>
<<if $time.month == 6 and $time.day == 13>>
	<<set $natholi = 'National holiday'>> <<set $natholi = 1>>

<</if>>
<<if $time.month == 11 and $time.day == 4>>
	<<set $natholi = 'Unity Day'>> <<set $natholi = 1>>

<</if>>
<<if getvar("$natholi") == 1>>
	<<if $holyday != ''>>
		<<set $holyday += '<br>'>>

	<</if>>
	<<set $holyday += $natholi>>
<</if>>
<!-- !!-------------------------------------------------------------------------------------------------------------------------->
<!-- !!Setting the weeks in the university semester and making sure that the gades are calculated at the right times-->
<<gs 'uni_lessons' 'cikl'>>
<!-- !!-------------------------------------------------------------------------------------------------------------------------->
<!-- !!resetting moisturizer so it can be used in the morning regardless-->
<<set $item_moisturizer_time = $totminut>>
<<if getvar("$bcream_used") >= 1>>
	<<set $bcream_used = 0>>
	<<set $temp = rand(0,max(nbsize-genbsize+5,5)) / Math.max(nbsize-genbsize,1)>>
	<<if getvar("$temp") > 0>>
		<<set $temp = 1>>

	<</if>>
	<<set $pc.nbsize += $temp>>
	<<if getvar("$temp") > 0>>
		Feels like your breasts have grown slightly.

	<</if>>
<</if>>
<<if getvar("$steroid_dose") >= 1>>
	<<if getvar("$lashair") < 1>>
		<<set $pc.pubesLength += $steroid_dose>>
		<<set $pc.legHair += $steroid_dose>>
	<</if>>
	<<set $steroid_dose = 0>>
<</if>>
<<if getvar("$aphrodisiac_overdose") == 1>>
	<<set $aphrodisiac_overdose = 0>>

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

<</if>>
<<if getvar("$mentats_dose") == 1>>
	<<set $mentats_dose = 0>>
<<elseif getvar("$mentats_dose") > 1>>
	<<run $pc.painInc('head','',20 * $mentats_dose)>>
	<<set $mentats_dose = 0>>
<</if>>
<<gs 'gaddvor' 'cikl'>>
<<set $loc_count = ARRSIZE('$CloLosLoc')>>
<<set $i = $loc_count - 1>>
<<warn 'JUMP MARKER ENCOUNTERED: :loopCloLoc'>>
<<set $CloLoc = $CloLosLoc[$i]>>
<<set $CloLostOn = $CloLosDay[$CloLoc]>>
<<if CloLostOn + RAND(7,14) < $time.daystart>>
	<<gs 'clothing' 'recover_lost_clothes' $CloLoc 2>>
<</if>>
<<set $i -= 1>>
<<if getvar("$i") > -1>>
	<<warn 'JUMP COMMAND ENCOUNTERED: jump loopCloLoc'>>

<</if>>
<<if $pc.visualAgeDaysInverse > 1080>>
	<<set $pc.visualAgeDaysInverse = 1080>>

<</if>>
<<if getvar("$blizoruk") < 10>>
	<<setn $blizoruk -= 1>>

<</if>>
<<if getvar("$blizoruk") < 100>>
	<<set $blizoruk -= rand(0,1)>>

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

<</if>>
<!-- !!-------------------------------------------------------------------------------------------------------------------------->
<!-- !!C and b array cleaning-->
<<if getvar("$insleep") == 1>>
	<<gs 'npc' 'cleanarrays'>>

<</if>>
<!-- !!-------------------------------------------------------------------------------------------------------------->
<!-- !!-------------Therapist Route schedule variables------------------------------------------------------------------------>
<!-- !! 23 = kitchen-->
<!-- !! 24 = Living room-->
<!-- !! 25 = bathroom-->
<!-- !! 26 = Master''s room-->
<<if getvar("$therapistWantsSlave") > 0>>
	<<set $annaclean1 = rand(23,26)>>
<</if>>
<!-- !!-------------------------------------------------------------------------------------------------------------->
<!-- !!-------------Family Dog------------------------------------------------------------------------>
<<if $status['dog'] != 'blocked' and getvar("$rex['owned']") == 1>>
	<<setinit $rex['timer_day'] = $time.daystart>>
	<!-- !!Daily decay-->
	<<setinit $rex['relationship'] -= 1>>
	<!-- !!Chores-->
	<<if getvar("$cheat['dog_rel']") == 0 and $rex['gadukino_day'] != $time.daystart>>
		<<run $npcs.dec('A29','rel',iif(rex['count_walk'] + rex['count_feed'] = 0, -1, ($rex['count_walk'] + $rex['count_feed'])))>>
		<<setinit $rex['relationship'] -= iif(rex['count_walk'] + rex['count_feed'] = 0, -1, ($rex['count_walk'] + $rex['count_feed']))>>
	<</if>>
	<<setinit $rex['count_run'] = 0>>
	<<setinit $rex['count_walk'] = $rex['count_walk_base']>>
	<<setinit $rex['timer_walk'] = 0>>
	<<setinit $rex['count_feed'] = $rex['count_feed_base']>>
	<<setinit $rex['timer_feed'] = 0>>
	<<if $time.weekday == 1>>
		<<if getvar("$cheat['dog_rel']") == 0>>
			<<run $npcs.dec('A29','rel',$rex['count_bath'])>>
			<<setinit $rex['relationship'] -= ($rex['count_bath'] * 5)>>
		<</if>>
		<<setinit $rex['count_bath'] = $rex['count_bath_base']>>
	<</if>>
<</if>>
<!-- !!-------------------------------------------------------------------------------------------------------------->
<!-- !!---------- School related schedule --------------------------------------------------------------------------->
<<set $starlets_on = iif( ( (week = 5 and odd_week = 0) or (week = 1 or week = 3 or week >= 6) ) and natholi = 0,1,0)>>
<<set $cheerleaders_on = iif( ( (week = 5 and odd_week = 1) or (week = 2 or week = 4) ) and (natholi = 0 and (month >9 or month <6)) ,1,0)>>
<<if getvar("$starlets['late_message']") == 1>>
	<<setinit $starlets['late_message'] = 0>>

<</if>>
<!-- !!-------------------------------------------------------------------------------------------------------------->
<!-- !!---------- Starlet Content ----------------------------------------------------------------------------------->
<<if getvar("$AlbinaQW['StarletsJoined']") > 0 and getvar("$AlbinaQW['StarletsShutDown']") == 0 and $npc('A23').pregtalk == 0>>
	<<if $starlets_practice == $time.daystart - 1>>
		<<set $starlets_missed = 1>>
		<<set $starlets_practice = 0>>
	<</if>>
	<<if getvar("$starlets_on") == 1>>
		<<set $starlets_practice = $time.daystart>>

	<</if>>
<</if>>
<<if $time.month == 9 and $time.day == 16 and getvar("$AlbinaQW['ParkRally']") == 0>>
	<<setinit $AlbinaQW['ParkRally'] = 1>>

<</if>>
<<if $time.month == 10 and $time.day == 16 and getvar("$AlbinaQW['ParkRally']") == 1>>
	<<setinit $AlbinaQW['ParkRally'] = 2>>

<</if>>
<<if $time.month == 11 and $time.day == 19 and (getvar("$AlbinaQW['StarletsJoined']") <= 0 or (getvar("$AlbinaQW['StarletsJoined']") == 1 and $npc('A23').pregtalk == 1)) and getvar("$AlbinaQW['StarletsShutDown']") == 0>>
	<<setinit $AlbinaQW['StarletsShutDown'] = 1>>

<</if>>
<!-- !!-------------------------------------------------------------------------------------------------------------->
<!-- !!-------------Music career related variables and calculations-------------------------------------------------->
<!-- !! Setting Del Parco initial variables-->
<<if $time.daystart < 2>>
	<<setinit $ml_delparcoQW['Stage'] = 0>>
	<<setinit $ml_delparcoQW['Zariyah Trust'] = 50>>
<</if>>
<!-- !! How many hours a day can Sveta perform. It maxes out at 3.-->
<!-- !! Using the actual skill level, not the one modified by Attributes because that is more realistic for this.-->
<<setinit $ml_performance['max_perform_minutes'] = $pc.skillLevel("playInstrument") + $pc.skillLevel("singing")>>
<<setinit $ml_performance['performed_minutes'] = 0>>
<!-- !! Checking for missed guitar lesson-->
<<if $ml_guitarlesson['nextlesson'] < $time.daystart and getvar("$ml_guitarlesson['lessonday']") != 8>>
	<<setinit $ml_guitarlesson['lessonday'] = 8>>
<</if>>
<!-- !! Calculating the fame increase from the uploaded songs and removing ones that do not effect fame anymore to keep the-->
<!-- !! data at a sane level-->
<<if getvar("$ml_onlinesongcount") > 0>>
	<<set $i = 0>>
	<<set $j = -1>>
	<<warn 'JUMP MARKER ENCOUNTERED: :looponlinesongs'>>
	<!-- !!      this so every song counts only every 7 days and only for a limited number of weeks-->
	<<if getvar("$ml_onlinesong_freshness["+$i+"]") > 0>>
		<<set $j += 1>>
		<<setinit $ml_tempsong_freshness[$j] = $ml_onlinesong_sfreshness[$i]>>
		<<setinit $ml_tempsong_lastcalcday[$j] = $ml_onlinesong_lastcalcday[$i]>>
		<<setinit $ml_tempsong_hotcat[$j] = $ml_onlinesong_hotcat[$i]>>
		<<setinit $ml_tempsong_skilllevel[$j] = $ml_onlinesong_skilllevel[$i]>>
		<<setinit $ml_tempsong_uploaded[$j] = $ml_onlinesong_uploaded[$i]>>
		<<if $ml_tempsong_lastcalcday[$j] <= (daystart - 7) and getvar("$ml_tempsong_uploaded") == 1>>
			<<run $pc.fameInc('city','music',`rand(0, ml_tempsong_freshness[$j]/100)`)>>
			<<setinit $ml_tempsong_freshness[$j] -= 10>>
			<<setinit $ml_tempsong_lastcalcday[$j] = $time.daystart>>
		<</if>>
	<</if>>
	<<set $i += 1>>
	<<if $i < $ml_onlinesongcount>>
		<<warn 'JUMP COMMAND ENCOUNTERED: jump looponlinesongs'>>

	<</if>>
	<<set $ml_onlinesong_freshness to null>>
	<<set $ml_onlinesong_lastcalcday to null>>
	<<set $ml_onlinesong_hotcat to null>>
	<<set $ml_onlinesong_skilllevel to null>>
	<<set $ml_onlinesong_uploaded to null>>
	<<set $i = 0>>
	<<if getvar("$j") >= 0>>
		<<warn 'JUMP MARKER ENCOUNTERED: :looprebuildsongs'>>
		<<setinit $ml_onlinesong_freshness[$i] = $ml_tempsong_freshness[$i]>>
		<<setinit $ml_onlinesong_hotcat[$i] = $ml_tempsong_hotcat[$i]>>
		<<setinit $ml_onlinesong_lastcalcday[$i] = $ml_tempsong_lastcalcday[$i]>>
		<<setinit $ml_onlinesong_skilllevel[$i] = $ml_tempsong_skilllevel[$i]>>
		<<setinit $ml_onlinesong_uploaded[$i] = $ml_tempsong_uploaded[$i]>>
		<<set $i += 1>>
		<<if $i <= $j>>
			<<warn 'JUMP COMMAND ENCOUNTERED: jump looprebuildsongs'>>

		<</if>>
	<</if>>
	<<set $ml_tempsong_freshness to null>>
	<<set $ml_tempsong_lastcalcday to null>>
	<<set $ml_tempsong_hotcat to null>>
	<<set $ml_tempsong_skilllevel to null>>
	<<set $ml_tempsong_uploaded to null>>
<</if>>
<!-- !! Repertoire quality decay if no practice is done-->
<<if $ml_performance['set_lastpracticeday'] != (daystart-1)>>
	<<setn $repertoire_quality -= 2>>

<</if>>
<!-- !!------------- Prostitution - WLife integration related stuff -------------------------------------------------->
<!-- !! Check if people will start to seek Sveta randomly for services, based on her reputation-->
<<gs 'prostitution_functions' 'check_for_wlife'>>
<<if getvar("getvar("$prostitute['blocked']")") == 0>>
	<<gs 'prostitution_functions' 'set_pavlovsk_prostitute'>>

<</if>>
<<setinit $prostitute['earnings_day'] = 0>>
<<setinit $prostitute['customer_day'] = 0>>
<!-- !!------------- Property and Home Related daily, nonfinancial checks -------------------------------------------->
<!-- !! Moves time for the rented properties-->
<<gs 'homes_properties' 'progress_property_rent_time'>>
<!-- !!------------- Check for Daily Events for event generator, sets evt_chk variable  -------------------------------------------->
<<gs 'emp_functions' 'evt_day_chk'>>
