# dachain

$loc = 'dachain'
$locM = 'dachain'
$menu_loc = 'dachain'

gs 'stat'
gs 'themes', 'indoors'

if $args[0] = '':
	$location_type = 'private'
	$loc_arg = ''
	$locM_arg = ''
	$menu_arg = ''
	menu_off = 0
	internetS = internet

	killvar '$locclass'
	*clr & cla
	gs 'stat'
	'<center><b><font color="maroon">Cottage</font></b></center>'
	if home_owned[3] = 2:
		'<center><img <<$set_imgh>> src="images/locations/suburban/cottage/dacharoom2.jpg"></center>'
	else
		'<center><img <<$set_imgh>> src="images/locations/suburban/cottage/dacharoom1.jpg"></center>'
	end
	'Your favorite summer residence.'
	*nl
	'There is a <a href="exec:gt ''bed'', ''start''">bed</a> against one wall. Next to it is a <a href="exec:gt ''wardrobe'', ''start''">wardrobe</a> (where you can choose outfits and organize your clothing). On the other side of the bed is a table and a <a href="exec:gt ''mirror'', ''start''">mirror</a>'
	*nl
	'You can access your <a href="exec: quick_dress = 1 & gt ''wardrobe'', ''default''">default clothing</a> options directly.' 
	*nl
	'There is a sofa in front of the fireplace, a kitchen alcove opposite the bed and the door to the bathroom next to that.'
	*nl
	if komp = 1:'Your <a href="exec: gt ''Komp'',''start''">laptop</a> is on the table.'
	*nl
	
	if hour >= 6 and hour <= 20 and etoexhib = 11:'Kopashatsya working in the garden, hmm... maybe sometime <a href="exec:gt ''etoexhib'', ''pos10''">motivate</a> for them to work quicker and smarter.'
	if hour >= 6 and hour <= 20 and etoexhib = 12:'Leave in <a href="exec:gt ''etoexhib'', ''pos11''">garden in lingerie and robe.</a>'
	if hour >= 6 and hour <= 20 and etoexhib = 13 and temp ! daystart:'I wonder how to <a href="exec:gt ''etoexhib'', ''pos12''">garden</a>'

!!-------------------------------------------------------------------------------------------------------------------------------------
!!------------------------------------------------------- Music related actions come here ---------------------------------------------
!!-------------------------------------------------------------------------------------------------------------------------------------

	!!Storing and picking up the guitar
	if ml_guitar['carried'] = 1:
		act 'Place the guitar next to your desk': 
			ml_guitar['carried'] = 0
			$ml_guitar['location'] = $curloc
			gt 'dachain', ''
		end
	elseif ml_guitar['hasguitar'] and ml_guitar['carried'] = 0:
		act 'Pick up the guitar':
			ml_guitar['carried'] = 1
			$ml_guitar['location'] = ''
			gt 'dachain', ''
		end
	end

	if ml_guitar['hasguitar'] = 1:
		act 'Play something on the guitar (10 minutes)':
			pcs_mood += 10
			minut += 10
			gs 'stat'
			'You pick up your guitar and start to play some songs you know, just for your own entertainment.'
			'You hum along the tune, relaxing into the music, just enjoying it. When you look up a quarter of an hour passed and you are in a much better mood.'
		end
	end
	
	!!Guitar practice 
	if ml_guitar['hasguitar'] = 1 and (ml_guitar['chordbook'] = 1 or ml_guitarlesson['lessoncount'] > 0) and ml_performance['performed_minutes'] <= ml_performance['max_perform_minutes']:
		act 'Practice guitar (0:30)': gt 'music_bedroomPractice', 'guitar'
	end
			
	if ml_online['account'] = 0 and internet > 0:
		act 'Set up an online music account (0:30)': gt 'music_onlinemusic', 'setupAccount'
	end

	!! Streaming music 
	if ml_online['account'] = 1 and internet > 0 and ml_performance['performed_minutes'] <= ml_performance['max_perform_minutes']:
		if pcs_inhib < 30:
			if pcs_inhib < 10: 
				$diff = 'hard'
			elseif pcs_inhib < 20: 
				$diff = 'medium'
			else 
				$diff = 'easy'
			end
			gs 'willpower', 'skill', 'self', $diff
			will_cost = (will_cost * 3) - (pcs_perform)

			if will_cost <= pcs_willpwr:
				act 'Live stream (1:00) (<<will_cost>> Willpower)': 
					inhib_exp += rand(1,3)	
					gs 'willpower', 'pay', 'self'
					gs 'stat'
					gt 'music_onlinemusic', 'liveStream'
				end
			else	
				act 'Live stream (1:00) (<font color="red"><<will_cost>> Willpower</font>)': '<br><font color="red">You don''t have enough willpower to use this action.</font>'
			end
		else 
			act 'Live stream (1:00)': gt 'music_onlinemusic', 'liveStream'			
		end
	end

	!! Recording music
	if ml_performance['performed_minutes'] <= ml_performance['max_perform_minutes']:
		if pcs_inhib < 20:
			if pcs_inhib < 10: 
				$diff = 'medium'
			elseif pcs_inhib < 20: 
				$diff = 'easy'
			end
			gs 'willpower', 'skill', 'self', $diff

			if will_cost <= pcs_willpwr:
				act 'Record a song with your phone (0:30) (<<will_cost>> Willpower)': 
					inhib_exp += rand(1,2)	
					gs 'willpower', 'pay', 'self'
					gs 'stat'
					gt 'music_onlinemusic', 'recordSong'
				end							
				if komp = 1 and webcamera = 1 and ml_studio['scarlet-3rd-gen'] = 1:
					act 'Record and edit a song (2:00) (<<will_cost>> Willpower)': 
						inhib_exp += rand(1,2)	
						gs 'willpower', 'pay', 'self'
						gs 'stat'
						gt 'music_onlinemusic', 'recordAndEditSong' 
					end						
				end
			else	
				act 'Record a song (0:30) (<font color="red"><<will_cost>> Willpower</font>)': '<br><font color="red">You don''t have enough willpower to use this action.</font>'
				act 'Record and edit a song (1:30) (<font color="red"><<will_cost>> Willpower</font>)': '<br><font color="red">You don''t have enough willpower to use this action.</font>'				
			end
		else
			act 'Record a song with your phone (0:30)': gt 'music_onlinemusic', 'recordSong'
			if komp = 1 and webcamera = 1 and ml_studio['scarlet-3rd-gen'] = 1:
				act 'Record and edit a song (2:00)': gt 'music_onlinemusic', 'recordAndEditSong' 
			end	
		end
	end


	!!Uploading recorded music if there are any not uploaded yet
	if ml_uploadablemusic > 0 and internet > 0 and ml_online['account'] = 1:
		if pcs_inhib < 30:
			if pcs_inhib < 10: 
				$diff = 'hard'
			elseif pcs_inhib < 20: 
				$diff = 'medium'
			else 
				$diff = 'easy'
			end
			gs 'willpower', 'skill', 'self', $diff

			will_cost = (will_cost * 2) - (pcs_perform)
			if will_cost <= pcs_willpwr:
				act 'Upload music (<<will_cost>> Willpower)': gt 'music_onlinemusic', 'uploadmusic'
			else	
				act 'Upload music (<font color="red"><<will_cost>> Willpower</font>)': '<br><font color="red">You don''t have enough willpower to use this action.</font>'
			end
		end
		act 'Upload music': gt 'music_onlinemusic', 'uploadallmusic'
	end

	act 'Lie on the couch': gt 'divan', 'start'
	act 'Go to the kitchen alcove': gt 'dachain', 'dachakit'
	act 'Go to the Bathroom':  gt 'dachain', 'dachavann'
	act 'Get in the bed': gt 'bed', 'start'

	act 'Go outside':
		if $clothingworntype ! 'nude':
			minut += 5 & gt 'dachamy'
		else
			msg'<b><font color = red>You can''t leave the house naked! You need to get dressed first.</font></b>'
			gt 'dachain'
		end
	end
end

if $args[0] = 'dachakit':
	$location_type = 'private'
	$loc_arg = 'dachakit'
	$locM_arg = 'dachakit'
	$menu_arg = 'dachakit'
	menu_off = 0
	$locclass = 'kitr'
	*clr & cla
	gs 'stat'
	'<center><b><font color="maroon">Cottage Kitchen</font></b></center>'
	if home_owned[3] = 2:
		'<center><img <<$set_imgh>> src="images/locations/suburban/cottage/dachakit2.jpg"></center>'
	else
		'<center><img <<$set_imgh>> src="images/locations/suburban/cottage/dachakit1.jpg"></center>'
	end
	if cltarelka > 0:
		'<b><<cltarelka>></b> clean plates are stored in the cupboard.'
	else
		'<b><font color="red">You have no clean dishes left.</font></b>'
	end

	if dirttarelka > 0:'<b><<dirttarelka>></b> dirty dishes are lying in the sink. <a href="exec:dynamic $dirtarm">Wash the dishes</a>.'

	if fairy > 0:
		'Next to the sink is dishwashing liquid, enough for <b><<fairy>></b> uses.'
	else
		'<b><font color="red">You have nothing to wash dishes with, you need to buy dishwashing liquid.</font></b>'
	end

	if eda > 0:
		if cltarelka = 0 or edahot > 0:$edagot = ''
		if cltarelka > 0 and edahot = 0:$edagot = '<a href="exec:dynamic $edagotd">Cook meal (0:30)</a>'
		'In the refrigerator there''s food, enough for <b><<eda>></b> servings. <<$edagot>>'
	end

	if edaD = 0 and eda = 0:'<b><font color="red">The refrigerator is empty, you have nothing to eat.</font></b>'
	if edahot > 0: act 'A cooked meal is on the table (0:30).': dynamic $edahotd

	if husband > 0 and husbandrink ! 10:
		if hour = 7 or hour = 17:'<a href="exec:gt ''husb'', ''start''">Your husband is eating at the table.</a>'
	end

	if pranik > 0:
		if pranik = 1:
			'You only have one more portion of tea biscuits.'
		else
			'You have enough tea biscuits for <b><<pranik>></b> more snacks.'
		end
		dynamic $pranik
	end

	dynamic $edaD
	dynamic $fatdel
	dynamic $driwater
	dynamic $lekarstvo
	dynamic $vitamin

	act 'Go into the main room': gt 'dachain', ''
	act 'Go to the Bathroom':  gt 'dachain', 'dachavann'
end

if $args[0] = 'dachavann':
	$loc_arg = 'dachavann'
	$locM_arg = 'dachavann'
	$menu_arg = 'dachavann'
	menu_off = 0
	$location_type = 'bathroom'
	killvar '$locclass'
	*clr & cla
	gs 'stat'
	'<center><b><font color="maroon">Cottage Bathroom</font></b></center>'
	if home_owned[3] = 2:
		'<center><img <<$set_imgh>> src="images/locations/suburban/cottage/dachavan2.jpg"></center>'
	else
		'<center><img <<$set_imgh>> src="images/locations/suburban/cottage/dachavan1.jpg"></center>'
	end
	gs 'din_van', 'private'
	act 'Go to the kitchen alcove': gt 'dachain', 'dachakit'
	act 'Go into the main room': gt 'dachain', ''
end

--- dachain ---------------------------------

