# gadsarai

if $ARGS[0] = '':
	$loc_arg = ''
	$loc = 'gadsarai'
	$menu_loc = 'gadsarai'
	$menu_arg = ''
	menu_off = 0
	$location_type = 'secluded'

	'<center><h4>Grandparents'' Barn</h4></center>'
	if month >= 4 and month <= 10:
		if hour >= 6 and hour < 22:
			'<center><img <<$set_imgh>> src="images/locations/gadukino/village/sarai.jpg"></center>'
		else
			'<center><img <<$set_imgh>> src="images/locations/gadukino/village/sarai_night.jpg"></center>'
		end
	else
		if hour >= 8 and hour < 18:
			'<center><img <<$set_imgh>> src="images/locations/gadukino/village/sarai_winter.jpg"></center>'
		else
			'<center><img <<$set_imgh>> src="images/locations/gadukino/village/sarai_winter_night.jpg"></center>'
		end
	end
	'Your grandparents old barn that could hold some useful items if you spend some time searching.'
	'The right side of the barn is piled high with various boxes, barrels, and chests of items.'
	'You can store some extra mushrooms and berries here if you don''t want to carry them around all the time.'
	'The left side of the barn has the stalls for your grandparents horse, cow, and boar.'

	clr
	gs 'stat'

	act 'Go back to the yard':minut += 1 & gt 'gaddvor'

	if grandpaQW['chore_fetch_firewood'] = 1:
		act 'Gather firewood for Grandpa (0:10)':
			*clr & cla
			if month >= 4 and month <= 10:
				'<center><img <<$set_imgh>> src="images/locations/gadukino/village/firewood.jpg"></center>'
			else
				'<center><img <<$set_imgh>> src="images/locations/gadukino/village/firewood_winter.jpg"></center>'
			end
			'You decide to grab the firewood that your grandfather asked for, loading up as much as you can carry.'
			grandpaQW['chore_fetch_firewood'] = 2
			minut += 10
			gs'stat'

			act 'Finish':gt 'gadsarai'
			act 'Return back to your grandfather': minut += 2 & gt 'gadhouse', 'grandpa'
		end
	end
	gs 'bicycle', 'gadsarai'
	if (month < 4 or month > 10) or (hour < 9 or hour > 20) or (grandpaQW['chore_feed_horse'] = 1 or grandpaQW['chore_brush_horse'] = 1 or grandpaQW['chore_lead_horse_to_field'] = 1 or grandpaQW['chore_bathe_horse'] = 1):
		act 'Enter the horses stall': gt 'gadsarai', 'horse'
	end
	if (month < 4 or month > 10) or (hour < 9 or hour > 20) or (grandpaQW['chore_feed_cow'] = 1 or grandmaQW['chore_milk_cow'] or grandpaQW['chore_lead_cow_to_field'] = 1 or grandpaQW['chore_herd_cattle'] = 1):
		act 'Enter the cows stall': gt 'gadsarai', 'cow'
	end
	act 'Enter the boars stall': gt 'gadsarai', 'boar'
	act 'Search around in the barn (0:15)': gt 'gadsarai', 'search'
	if vcard > 0: act 'View your vintage porn cards': $card_loc = 'gadsarai' & card_deck = 0 & gt 'card'
	if card > 0: act 'View your new porn cards': $card_loc = 'gadsarai' & card_deck = 1 & gt 'card'
	if pcs_horny >= 50:	act 'Masturbate':gt 'selfplay', 'start'
!!	Serpent is not ready yet, so remarking out til then.
!!	if findneck = 1: act 'You hear a scraping noice above you.':gt 'serpent'
end

if $ARGS[0] = 'search':
	if npc_qw['A221'] > 0 and grigory_barn ! daystart and hour > 8 and hour < 12: gt 'grigory', 'barn'
	*clr & cla
	minut += 15
	gs 'stat'
	if BikeLoc = 0 and rand(0,10) >= 6:
		*clr & cla
		BikeLoc = 1
		observ_exp += 3
		gs 'stat'
		'<center><img <<$set_imgh>> src="images/locations/gadukino/village/findbike.jpg"></center>'
		*nl
		'In the far corner of the barn you manage to find an old bicycle. It''s in surprisingly good condition. You pull it out of the barn and clean it up.'
	elseif findbag = 0 and bag = 0 and rand(0,10) >= 7:
		*clr & cla
		findbag = 1
		if findbag = 1: bag = 1
		observ_exp += 3
		gs 'stat'
		'<center><img <<$set_imgh>> src="images/pc/purses/cheap/5.jpg"></center>'
		*nl
		'In a far corner of the barn you find a hessian sack filled with mostly junk, but at the bottom you find a good quality messenger bag.'
		'You can use this cool looking bag as a handbag.'
		cheap_purses[5] = 1
		$currentpursetype = 'cheap'
		currentpursenumber = 5
	elseif vcard = 0 and vcard_trash = 0 and rand(0,10) >= 8:
		*clr & cla
		vcard = 1
		observ_exp += 3
		gs 'stat'
		'<center><img <<$set_imgh>> src="images/locations/gadukino/village/vcards.jpg"></center>'
		*nl
		'"Hmm, what''s this?" You''ve found an unopened deck of vintage adult playing cards, still in its original cellophone wrapper.'
	elseif findbraclet = 0 and rand(0,10) >= 9:
		*clr & cla
		findbraclet = 1
		observ_exp += 3
		gs 'stat'
		'<center><img <<$set_imgh>> src="images/locations/gadukino/village/bracelet.jpg"></center>'
		*nl
		'While looking through the barn you spot a glint of metal under a pile of wood. Upon closer inspection you see a bracelet made of silver and crafted into the likeness of a snake. Strange, but cool that you would find something this valuable in the barn.'
	elseif findbraclet > 0 and findneck = 0 and rand(0,10) >= 10:
		*clr & cla
		findneck = 1
		observ_exp += 3
		gs 'stat'
		'<center><img <<$set_imgh>> src="images/locations/gadukino/village/necklace.jpg"></center>'
		*nl
		if altQS = 1:
			'While looking through the barn your foot goes through a rotten floorboard. You suddenly feel the presence of something magical under the floor. You get on your belly and look through the hole in the floor. You find a small box made of a black wood. You pick up the box and see the box is covered in a strange writing and glyphs that look like serpents. The feeling of power is coming from within the box. You lift the lid of the box and see a black metal necklace that looks like a coiled snake with ruby eyes. You feel the power coming from the necklace, but it doesn''t feel like any power you have ever felt.'
		else
			'While looking through the barn your foot goes through a rotten floorboard and gets stuck. As you work your foot free, you glimpse something underneath the floor - a box or something. You get on your belly and look through the hole in the floor. You find a small box made of a black wood. You pick up the box and see the box is covered in a strange writing and glyphs that look like serpents. The exotic look of the box gives you gooseflesh and you find yourself holding your breath as you prepare to open the box. You lift the lid of the box and see a black metal necklace that looks like a coiled snake with ruby eyes. You let your breath out slowly as you tilt the necklace from side to side, watching the light sparkle as it is reflected by the facets on the deep red rubies. You cannot begin to guess what this necklace must be worth.'
		end
	else
		observ_exp += rand(0,1)
		gs 'stat'
		'<center><img <<$set_imgh>> src="images/locations/gadukino/village/junk_barn.jpg"></center>'
		*nl
		'In the barn you find many mouldy magazines, rusty tools and equipment, toys and many dusty, yellowed books. The entire barn reeks of mould and decay.'
	end
	act 'Finish':gt 'gadsarai'
end

if $ARGS[0] = 'horse':
	*clr & cla
	minut += 1
	gs 'stat'

	'<center><h4>Grandparents'' Barn</h4></center>'
	'<center><img <<$set_imgh>> src="images/locations/gadukino/village/horse.jpg"></center>'
	'Grandfather''s trusted workhorse, Desperado.'

	act 'Leave':minut += 1 & gt 'gadsarai'

	if grandpaQW['chore_feed_horse'] = 1:
		act 'Feed the horse (0:30)':
			*clr & cla
			minut += 30
			grandpaQW['chore_feed_horse'] = 2
			hndiwrk_exp += rand(1,3)
			gs 'stat'

			'<center><img <<$set_imgh>> src="images/locations/gadukino/village/feed_horse.jpg"></center>'
			'You grab a sack of grain and fill Desperado''s feed bucket. You hang the bucket from his stall and gently pat his nose as he begins to eat.'
			'You watch him eat for a little while before moving on.'

			act 'Finish':gt 'gadsarai','horse'
			act 'Return back to your grandfather': minut += 3 & gt 'gadhouse', 'grandpa'
		end
	end
	if grandpaQW['chore_lead_horse_to_field'] = 1:
		act 'Lead the horse to the field (1:00)':
			*clr & cla
			minut += 60
			grandpaQW['chore_lead_horse_to_field'] = 2
			hndiwrk_exp += rand(1,3)
			gs 'stat'

			'<center><img <<$set_imgh>> src="images/locations/gadukino/village/horse_field.jpg"></center>'
			'You take Desperado by the bridle and lead him to the field. There, you let him free in the paddock area, and watch him run about for a bit before moving on.'

			act 'Continue':gt'gadfield','field'
			act 'Return back to your grandfather (0:30)': minut += 30 & gt 'gadhouse', 'grandpa'
		end
	end
	if grandpaQW['chore_bathe_horse'] = 1:
		act 'Lead the horse to the river (0:30)':
			*clr & cla
			minut += 30
			grandpaQW['chore_bathe_horse_prog'] = 1
			hndiwrk_exp += rand(1,3)
			gs 'stat'

			'<center><img <<$set_imgh>> src="images/locations/gadukino/village/horse_field.jpg"></center>'
			'You take Desperado by the bridle and lead him to the river.'

			act 'Continue':gt'gadriver', 'gadbitch'
		end
	end
	if grandpaQW['chore_bathe_horse'] = 2:
		act 'Return back to your grandfather': minut += 3 & gt 'gadhouse', 'grandpa'
	end
	if grandpaQW['chore_brush_horse'] = 1:
		act 'Groom the horse (1:00)':
			*clr & cla
			minut += 60
			grandpaQW['chore_brush_horse'] = 2
			hndiwrk_exp += rand(1,3)
			gs 'stat'

			'<center><img <<$set_imgh>> src="images/locations/gadukino/village/comb_horse.jpg"></center>'
			'You spend about an hour cleaning and brushing Desperado, scrubbing his coat and brushing his mane and tail. You are satisfied with the result - he is looking as clean and healthy as ever.'

			act 'Finish':gt 'gadsarai','horse'
			act 'Return back to your grandfather': minut += 3 & gt 'gadhouse', 'grandpa'
		end
	end
end

if $ARGS[0] = 'cow':
	*clr & cla
	minut += 1
	gs 'stat'

	'<center><h4>Grandparents'' Barn</h4></center>'
	'<center><img <<$set_imgh>> src="images/locations/gadukino/village/cow.jpg"></center>'
	*nl
	'Grandma''s favorite animal, the cow, Dawn.'

	act 'Leave':minut += 1 & gt 'gadsarai'

	if grandmaQW['chore_milk_cow'] = 1:
		act 'Milk the cow (0:30)':
			*clr & cla
			minut += 30
			grandmaQW['chore_milk_cow'] = 2
			hndiwrk_exp += rand(1,3)
			gs 'stat'

			'<center><img <<$set_imgh>> src="images/locations/gadukino/village/milk_cow.jpg"></center>'
			'You start milking Dawn, improving for each time you do it.'

			act 'Finish':gt 'gadsarai','cow'
			act 'Return back to your grandmother': minut += 3 & gt 'gadhouse', 'grandma'
		end
	end
	if grandpaQW['chore_feed_cow'] = 1:
		act 'Feed the cow (0:30)':
			*clr & cla
			minut += 30
			grandpaQW['chore_feed_cow'] = 2
			hndiwrk_exp += rand(1,3)
			gs 'stat'

			'<center><img <<$set_imgh>> src="images/locations/gadukino/village/feed_cow.jpg"></center>'
			'Dawn is obviously excited about feeding time, shaking her head and doing little cow tippy-taps with her feet. You dump a sizable amount of hay in her trough and watch as she digs in.'

			act 'Finish':gt 'gadsarai','cow'
			act 'Return back to your grandfather': minut += 3 & gt 'gadhouse', 'grandpa'
		end
	end
	if grandpaQW['chore_lead_cow_to_field'] = 1 or grandpaQW['chore_herd_cattle'] = 1:
		act 'Lead the cow to the field (1:00)':
			*clr & cla
			minut += 60
			hndiwrk_exp += rand(1,3)
			gs 'stat'

			'<center><img <<$set_imgh>> src="images/locations/gadukino/village/cow_field.jpg"></center>'
			if grandpaQW['chore_lead_cow_to_field'] = 1:
				'You lead Dawn to the field, where you let the shepherds take over.'
				grandpaQW['chore_lead_cow_to_field'] = 2
			end
			if grandpaQW['chore_herd_cattle'] = 1:'You lead Dawn to the field, where you grandfather awaits you. It''s his turn to keep an eye on the cows.'

			act 'Continue':gt'gadfield','cow'
			if grandpaQW['chore_lead_cow_to_field'] = 2: act 'Return back to your grandfather (0:30)': minut += 30 & gt 'gadhouse', 'grandpa'
		end
	end
end

if $ARGS[0] = 'boar':
	*clr & cla
	minut += 1
	gs 'stat'

	'<center><h4>Grandparents'' Barn</h4></center>'
	'<center><img <<$set_imgh>> src="images/locations/gadukino/village/boar.jpg"></center>'
	'One of your grandparents'' dearest possessions, the boar, Nickle.'

	act 'Leave':minut += 1 & gt 'gadsarai'

	if grandpaQW['chore_feed_boar'] = 1:
		act 'Feed the hog (0:30)':
			*clr & cla
			minut += 30
			grandpaQW['chore_feed_boar'] = 2
			hndiwrk_exp += rand(1,3)
			gs 'stat'

			'<center><img <<$set_imgh>> src="images/locations/gadukino/village/feed_boar.jpg"></center>'
			'You grab the feed bag and fill Nickle''s trough. You stand there and watch for a few minutes as he eats like a... well, like a pig.'

			act 'Finish':gt 'gadsarai','boar'
			act 'Return back to your grandfather': minut += 3 & gt 'gadhouse', 'grandpa'
		end
	end
end

--- gadsarai ---------------------------------

