:: intro_initialization
<!-- !!*************************-->
<!-- !!	Final Initializations-->
<!-- !!	Top area for things that need to be done before setting the variables for either start-->

<<run $wardrobe.add('school_6')>>


<<set $BDSMfilm = 0>>
<<set $pornstudio = 0>>
<<set $pfilmSTOP = 0>>
<<set $denypreg = 0>>
<<set $pertemp = 1>>
<<set $pillcvrt = 1>>
<<set $pcs_naturallashes = $pc.eyelashes>>
<!-- !!	Initializing elasticity-->
<<set $vshrink = 1>>
<<set $vshrinkdays = 6>>
<<set $ashrink = 1>>
<<set $ashrinkdays = 3>>
<<set $fairycurse = -1>>

<<gs 'telefon' 'setup'>>

<<if getvar("$pc.age") < 17>>
	<<set $pc.visualAge = $pc.age>>
<<else>>
	<<set $pc.visualAge = $pc.age - 1>>
<</if>>
<<set $pc.pcs_health = $pc.vitality * 10 + $pc.skillLevel("strength") * 5>>
<<set $pc.willpower = $pc.skillLevel("intelligence") * 5 + $pc.skillLevel("spirit") * 5>>
<<set $pcs_mana = ($pc.skillLevel("intelligence") * $pcs_magik) + $pcs_magik * 100 + $pc.vitality * 10 + $rikudo>>
<<set $pc.pcs_stam = 100>>
<<set $pc.hairColorNatural = $pc.hairColor>>
<<set $pcs_pubecol = $pc.hairColor>> <<setinit $pcs_pubecol_num[1] = 1>>
<<set $oldsavepcs_haircol = 1>>
<<gs 'dina'>>
<!-- !!	**********-->


<!-- !! KEY! I merged 'dinBoroda' with 'clener' and removed the dynamics. This line was at the end of dinBoroda, so I moved it here just in case. Sicaa-->
<<set $rikudootvet = 1415>>
<<gs 'BanSexType'>>
<<set $menoage = rand(40,50)>>
<<set $temprand = rand(0,10)>>
<<if getvar("$temprand") == 0>>
	<<set $menoage += rand(0,5)>>
<<elseif getvar("$temprand") < 4>>
	<<set $menoage += rand(3,10)>>
<<elseif getvar("$temprand") < 9>>
	<<set $menoage += rand(5,12)>>
<<else>>
	<<set $menoage += rand(7,13)>>
<</if>>
<!-- !!Setting up period start and turning on auto tracking if not on hardcore difficulty-->
<<set $time.daylastperiod = $time.daystart>>
<<set $temprand = rand(1,3)>>
<<if getvar("$temprand") == 1>>
	<<set $cycle = 1>>
	<<set $EggRH = rand(1,149)>>
	<<set $FocH = $EggRH + 4 * 24>>
	<<set $mesec = 0>>
	<<set $unfertegg = 0>>
	<<set $ferteggage = 0>>
	<<set $Ovulate = 0>>
	<<set $LutH = 0>>
	<<set $time.daylastperiod -= $FocH / 24>>
<<elseif getvar("$temprand") == 2>>
	<<set $lastovulation = $time.daystart>>
	<<set $cycle = 2>>
	<<set $unfertegg = 1>>
	<<set $ferteggage = rand(0,44)>>
	<<set $Ovulate = (rand(24,44) - $ferteggage)>>
	<<if getvar("$Ovulate") <= 0>>
		<<set $Ovulate = 1>>

	<</if>>
	<<set $mesec = 0>>
	<<set $EggRH = 0>>
	<<set $FocH = 0>>
	<<set $LutH = 0>>
	<<set $time.daylastperiod -= 10 + ($ferteggage / 24)>>
<<elseif getvar("$temprand") == 3>>
	<<set $cycle = 3>>
	<<set $LutH = rand(0,300)>>
	<<set $ferteggage = 36 + $LutH>>
	<<set $mesec = 0>>
	<<set $EggRH = 0>>
	<<set $FocH = 0>>
	<<set $unfertegg = 0>>
	<<set $Ovulate = 0>>
	<<set $time.daylastperiod -= 10 + ($ferteggage / 24)>>
<</if>>
<<if $time.daylastperiod + 4 > $time.daystart>>
	<<set $lastmens = $time.daylastperiod - 20>>
<<else>>
	<<set $lastmens = $time.daylastperiod + 4>>
<</if>>
<<if getvar("$difficulty") == 4>>
	<<set $cyccustom = 0>>
<<else>>
	<<set $cyccustom = 1>>
<</if>>
<<set $opPRE to null>>
<<set $tgs_skipinto to null>>
<!-- !! Clothing must go last so that hip size is set-->
<!-- !! Adding underwear and default shoes and assigning them-->
<<if $location_var[$here][1] != 'CSB' and getvar("$school_clothing") != 1>>
	<<run $wardrobe.wear('gm_panties_1',false)>>
	<<run $wardrobe.wear('gm_bra_1',false)>>
	<<run $wardrobe.add('danilovich_shoes_21')>>
	<<run $wardrobe.wear('gm_shoes_6',false)>>
<</if>>
<<if getvar("$school_clothing") == 7>>
	<!-- !!Dancer gets leotard-->
	<<run $wardrobe.add('danilovich_outfit_155')>>
<</if>>
<!-- !!	Starting clothing set-->
<<if getvar("$school_clothing") == 1>>
	<<run $wardrobe.wear('cats_panties_15',false)>>
	<<run $wardrobe.wear('cats_bra_15',false)>>
	<<run $wardrobe.add('danilovich_outfit_80')>>
	<<run $wardrobe.add('danilovich_shoes_19')>>
	<<run $wardrobe.wear('gm_shoes_25',false)>>
	<<run $wardrobe.add('dolls_outfit_16')>>
	<<run $wardrobe.wear('dolls_outfit_37',false)>>
<<elseif $location_var[$here][1] == 'CSB'>>
	<<run $wardrobe.wear('gm_panties_12',false)>>
	<<run $wardrobe.wear('gm_bra_12',false)>>
	<<run $wardrobe.add('danilovich_outfit_81')>>
	<<run $wardrobe.add('danilovich_shoes_21')>>
	<<run $wardrobe.wear('gm_shoes_9',false)>>
	<<run $wardrobe.add('gm_outfit_30')>>
	<<run $wardrobe.wear('cats_dress_1',false)>>
<<elseif getvar("$alterstrtimg") == 17>>
	<!-- !!Beautiful start-->
	<<run $wardrobe.add('cats_outfit_56')>>
	<<run $wardrobe.add('danilovich_outfit_136')>>
	<<run $wardrobe.add('cats_dress_59')>>
	<<run $wardrobe.wear('gm_dress_57',false)>>
<<elseif $pc.pcs_inhib < 5>>
	<<run $wardrobe.add('gm_outfit_30')>>
	<<run $wardrobe.add('danilovich_outfit_81')>>
	<<run $wardrobe.wear('cats_dress_1',false)>>
<<elseif $pc.pcs_inhib < 10>>
	<<run $wardrobe.add('gm_outfit_15')>>
	<<run $wardrobe.add('danilovich_outfit_80')>>
	<<run $wardrobe.wear('gm_dress_4',false)>>
<<elseif $pc.pcs_inhib < 15>>
	<<run $wardrobe.add('gm_outfit_58')>>
	<<run $wardrobe.add('danilovich_outfit_106')>>
	<<run $wardrobe.wear('gm_dress_7',false)>>
<<elseif $pc.pcs_inhib < 20>>
	<<run $wardrobe.add('gm_outfit_55')>>
	<<run $wardrobe.add('danilovich_outfit_102')>>
	<<run $wardrobe.wear('gm_dress_7',false)>>
<<elseif $pc.pcs_inhib < 25>>
	<<run $wardrobe.add('gm_outfit_58')>>
	<<run $wardrobe.add('danilovich_outfit_87')>>
	<<run $wardrobe.wear('gm_dress_39',false)>>
<<elseif $pc.pcs_inhib < 30>>
	<<run $wardrobe.add('gm_outfit_91')>>
	<<run $wardrobe.add('danilovich_outfit_96')>>
	<<run $wardrobe.wear('gm_dress_57',false)>>
<<elseif $pc.pcs_inhib < 35>>
	<<run $wardrobe.add('gm_outfit_95')>>
	<<run $wardrobe.add('danilovich_outfit_48')>>
	<<run $wardrobe.wear('gm_dress_63',false)>>
<<elseif $pc.pcs_inhib < 40>>
	<<run $wardrobe.add('gm_outfit_124')>>
	<<run $wardrobe.add('danilovich_outfit_45')>>
	<<run $wardrobe.wear('gm_dress_89',false)>>
<<elseif $pc.pcs_inhib < 45>>
	<<run $wardrobe.add('gm_outfit_131')>>
	<<run $wardrobe.add('danilovich_outfit_38')>>
	<<run $wardrobe.wear('gm_dress_109',false)>>
<<elseif $pc.pcs_inhib < 50>>
	<<run $wardrobe.add('gm_outfit_145')>>
	<<run $wardrobe.add('danilovich_outfit_17')>>
	<<run $wardrobe.wear('gm_dress_123',false)>>
<<else>>
	<<run $wardrobe.add('gm_outfit_149')>>
	<<run $wardrobe.add('danilovich_outfit_15')>>
	<<run $wardrobe.wear('gm_dress_149',false)>>
	<<run $wardrobe.add('scandalicious_swim_two_55')>>
<</if>>
<<if getvar("$swim_start") == 99>>
	<<if $pc.pcs_inhib <= 10>>
		<<run $wardrobe.add('allure_swim_one_3')>>
	<<else>>
		<<run $wardrobe.add('allure_swim_one_99')>>
	<</if>>
<<elseif getvar("$swim_start") == 1>>
	<<if $pc.pcs_inhib < 10>>
		<<run $wardrobe.add('danilovich_swim_one_1')>>
	<<else>>
		<<run $wardrobe.add('danilovich_swim_one_12')>>
	<</if>>
<</if>>
<!-- !!setting default danilovich outfit and setting coats-->
<<if getvar("$school_clothing") == 1>>
	<<set $school_clothing to null>>
	<<run $wardrobe.add('dolls_outfit_29')>>
	<<run $wardrobe.add('danilovich_bra_3')>>
	<<run $wardrobe.add('danilovich_panties_3')>>
	<<run $wardrobe.wear('dolls_coat_19',false)>>
<<elseif getvar("$alterstrtimg") == 17>>
	<!-- !! beautiful start-->
	<<run $wardrobe.wear('cats_coat_16',false)>>
	<<run $wardrobe.add('danilovich_bra_4')>>
	<<run $wardrobe.add('danilovich_panties_4')>>
	<<run $wardrobe.add('school_48')>>
<<else>>
	<<run $wardrobe.wear('gm_coat_12',false)>>
	<<run $wardrobe.add('danilovich_bra_1')>>
	<<run $wardrobe.add('danilovich_panties_1')>>
	<<if getvar("$school_clothing") == 2>>
		<<run $wardrobe.add('school_49')>>
		<<run $wardrobe.add('market_outfit_17')>>
	<<elseif getvar("$school_clothing") == 3>>
		<<run $wardrobe.add('school_25')>>
	<<elseif getvar("$school_clothing") == 4>>
		<<run $wardrobe.add('bomba_dress_40')>>
	<<elseif getvar("$school_clothing") == 5>>
		<<run $wardrobe.add('school_52')>>
	<<elseif getvar("$school_clothing") == 6>>
		<<run $wardrobe.add('school_4')>>
	<<elseif getvar("$school_clothing") == 7>>
		<<run $wardrobe.add('school_17')>>
		<<run $wardrobe.add('danilovich_outfit_65')>>
		<<run $wardrobe.add('danilovich_shoes_17')>>
	<</if>>
	<<unset $school_clothing>>
<</if>>
<<unset $swim_start>>
<<run $pc.bodyDailyUpdate()>>

<<set _currentOutfit = $wardrobe.wornItemIds>>
<<run $wardrobe.outfitAdd('Default',_currentOutfit)>>

<<set _anySchoolClothingItems = Object.values($wardrobe.itemsFiltered({subtype:'school'}))>>
<<if _anySchoolClothingItems.length > 0>>
	<<set _schoolOutfit = clone(_currentOutfit)>>
	<<set _anySchoolClothingItemId = _anySchoolClothingItems[0].id>>
	<<set _schoolOutfit.clothes = _anySchoolClothingItemId>>
	<<run $wardrobe.outfitAdd('School',_schoolOutfit)>>
	<<set $wardrobe.outfitSchool = 'School'>>

	<<run $wardrobe.setMetadata(_anySchoolClothingItemId,{h:-1,bmi:0})>><!-- Make the school uniform indesctructable -->
<</if>>



<<set _sportsOutfit = clone(_currentOutfit)>>
<<set _sportsItems = $wardrobe.itemsFiltered({vendor:'danilovich'})>>
<<for _key,_itemData range _sportsItems>>
	<<set _sportsOutfit[_itemData.type] = _itemData.id>>
<</for>>
<<run $wardrobe.outfitAdd('Sports',_sportsOutfit)>>
<<set $wardrobe.outfitSports = 'Sports'>>


