# gadfield

$metka = $ARGS[0]
$loc = 'gadfield'

if $ARGS[0] = 'field':
	$location_type = 'secluded'
	gs 'gadukino_event', 'sound'
	gs'stat'

	'<center><H4>Field</H4></center>'
	if month >= 4 and month <= 10:
		if hour >= 6 and hour < 22:
			'<center><img <<$set_imgh>> src="images/locations/gadukino/village/gadfield.jpg"></center>'
		else
			'<center><img <<$set_imgh>> src="images/locations/gadukino/village/gadfield_night.jpg"></center>'
		end
		if hour >= 9 and hour <= 17 and grigoryEV = 0: gs 'grigory', 'meet' & exit
	else
		if hour >= 8 and hour < 18:
			'<center><img <<$set_imgh>> src="images/locations/gadukino/village/gadfield_winter.jpg"></center>'
		else
			'<center><img <<$set_imgh>> src="images/locations/gadukino/village/gadfield_winter_night.jpg"></center>'
		end
	end

	
	'A field outside the village.'
	if hour >= 9 and hour <= 19 and week < 6:'Grandfather''s horse <a href="exec: gt ''gadfield'',''horse''">Desperado</a> is grazing the field.'
	if hour >= 9 and hour <= 19 and graze_cow = 0:'You see <a href="exec: gt ''gadfield'',''cow''">a herd of cows</a> in the middle of the field.'
	if hour >= 6 and hour <= 20 and graze_cow = 1:'You notice <a href="exec: gt ''gadfield'',''cow''">a herd of cows</a>.'
	if hour >= 7 and hour <= 20 and haying_time = 1:'You see a crowd of people working on the field.'

	if hour >= 7 and hour <= 20 and haying_time = 1:
		act 'Go to the hayfield':
			gs 'food', 'm_meal'&!use current one, *clr & cla will clear messages
			*clr & cla
			if npc_rel['A60'] >= 15:
				npc_rel['A60'] += 1
				'<center><img <<$set_imgh>> src="images/characters/village/mira/haying_time_mira.jpg"></center>'
				'Most of the village has shown up to help out with the hay. You and Mira also partake in the activities. You are really enjoying yourself, especially considering you spending time, sitting on the fresh cut hay, talking to Mira.'
			else
				fat -= 5
				stren_exp += 1
				agil_exp += 1
				vital_exp += 1
				pcs_sweat += 20
				'<center><img <<$set_imgh>> src="images/locations/gadukino/village/haying_time.jpg"></center>'
				'Almost all of the villagers have shown up to help out with the fresh cut hay. You decide to join them.'
			end
			minut += 360
			grandmahelp += 1
			haying_time = 0
			hndiwrk_exp += rand(0,2) 
			gs 'stat'

			act 'Further':gt'gadfield','field'
		end
	end

	act 'Go back to the road':minut += 10 & gt'gadroad'
end

if $ARGS[0] = 'horse':
	gs 'gadukino_event', 'sound'
	gs'stat'

	'<center><img <<$set_imgh>> src="images/locations/gadukino/village/horse.jpg"></center>'
	'Your grandfather''s horse Desperado.'

	if hour = 19:
		act 'Lead the horse home (1:00)':
			*clr & cla
			'<center><img <<$set_imgh>> src="images/locations/gadukino/village/horse_field.jpg"></center>'
			'You spot your grandfather''s horse wandering loose in the field and decide to help out by taking Desperado home. Reaching for the bridle, you start leading Desperado towards the village.'
			minut += 60
			grandmahelp += rand(0,1)
			hndiwrk_exp += rand(0,3) 
			gs 'stat'

			act 'Further':gt'Gadsarai'
		end
	end
	act 'Back':gt'gadfield','field'
end

if $ARGS[0] = 'cow':
	gs 'gadukino_event', 'sound'
	temp = rand(1,5)
	gs'stat'

	'<center><img <<$set_imgh>> src="images/locations/gadukino/village/cow.jpg"></center>'
	'The cow herd is standing in the middle of the field.'
	if mira = 1: MiraLoc = 41 & '<a href="exec: gt ''Miroslava'', ''Start''">Mira</a> is standing next to you.'

	if hour = 19 and graze_cow = 0:
		act 'Lead the cows home (1:00)':
			*clr & cla
			'<center><img <<$set_imgh>> src="images/locations/gadukino/village/cow_field.jpg"></center>'
			'Seeing the cow herd on the field, you decide to help your grandfather bring the cows home...'
			minut += 60
			grandmahelp += rand(0,1)
			hndiwrk_exp += rand(0,3) 
			gs 'stat'

			act 'Further':gt'Gadsarai'
		end
	end
	if graze_cow = 1:
		if hour < 10:
			act 'Wait until the herd is gathered':
				*clr & cla
				'<center><img <<$set_imgh>> src="images/locations/gadukino/village/graze_cow_wait.jpg"></center>'
				if graze_cow_exp = 0:'Some time flies by while waiting for the locals to finish their gathering.'
				if graze_cow_exp = 1:'Some time flies by while waiting for the locals and their children to finish their gathering.'
				if hour >= 9:minut += 20
				if hour < 9:minut += 60
				hndiwrk_exp += rand(0,4) 
				gs 'stat'

				act 'Further':gt'gadfield','cow'
			end
		end
		if hour >= 10 and hour < 13:
			act 'Herd cows with your grandfather (1:00)':
				*clr & cla
				'<center><img <<$set_imgh>> src="images/locations/gadukino/village/graze_cow'+rand(1,4)+'.jpg"></center>'
				'You manage to herd all the cows within the hour. Instead of letting your grandfather do all the work, you roll up the sleeves and do most of the work.'
				minut += 60
				if temper >= 25 and sunWeather = 1:pcs_hydra -= 12
				graze_cow_exp = 1
				grandmahelp += 1
				hndiwrk_exp += rand(0,3) 
				gs 'stat'

				act 'Further':gt'gadfield','cow'
			end
			if mira = 0:
				act 'Take a run on the field (1:00)':
					*clr & cla
					'<center><img <<$set_imgh>> src="images/locations/gadukino/village/graze_cow_run.jpg"></center>'
					'Since you have nothing to do, you run intervals across the field for an hour.'
					frost = 0
					minut += 60
					fat -= 5
					run_exp += 1
					pcs_sweat += 10
					pcs_mood += 5
					if temper >= 25 and sunWeather = 1:pcs_hydra -= 24
					gs 'stat'

					act 'Further':gt'gadfield','cow'
				end
			end
			if temper >= 15 and sunWeather = 1 and mira = 0:
				act 'Tan (1:00)':
					*clr & cla
					'<center><img <<$set_imgh>> src="images/locations/gadukino/village/graze_cow_sun.jpg"></center>'
					'It''s really warm outside so you decide to sunbathe for an hour.'
					minut += 60
					pcs_mood += 10
					pcs_tan += 1
					pcs_sweat += 10
					gs 'stat'

					act 'Further':gt'gadfield','cow'
				end
				if pcs_sleep < 40:
					act 'Take a nap (1:00)':
						*clr & cla
						'<center><img <<$set_imgh>> src="images/locations/gadukino/village/graze_cow_lying.jpg"></center>'
						'You lie down on the grass and doze off for an hour.'
						minut += 60
						pcs_mood += 10
						pcs_sleep+= 9
						if temper >= 25 and sunWeather = 1:pcs_hydra -= 12
						gs 'stat'

						act 'Further':gt'gadfield','cow'
					end
				end
				act 'Pick flowers (1:00)':
					*clr & cla
					'<center><img <<$set_imgh>> src="images/locations/gadukino/village/graze_cow_flowers.jpg"></center>'
					'You spend an hour wandering the field, picking flowers.'
					minut += 60
					pcs_mood += 20
					if temper >= 25 and sunWeather = 1:pcs_hydra -= 12
					gs 'stat'

					act 'Further':gt'gadfield','cow'
				end
				act 'Read a book (1:00)':
					*clr & cla
					'<center><img <<$set_imgh>> src="images/locations/gadukino/village/graze_cow_book'+rand(1,2)+'.jpg"></center>'
					minut += 60
					if temper >= 25 and sunWeather = 1:pcs_hydra -= 12
					if pcs_nerd > 0:
						lastread = totminut
						lastreadday = daystart
						pcs_nerd += 1
						blizoruk += 1
						pcs_mood = 100
						if pcs_stren > 1: stren_deg -= 1
						if pcs_vital > 5: vital_deg -= 1
						 'You start reading a book you brought with you. You are so engrossed in the story you forget about the time.'
					else
						blizoruk += 1
						pcs_mood += 10
						'While reading the book, time flies by cause you are really engaged in the books'' plot.'
					end
					gs 'stat'

					act 'Close the book':gt $loc, $metka
				end
			end
		end
		if hour >= 13 and hour < 16:
			*clr & cla
			'<center><img <<$set_imgh>> src="images/locations/gadukino/village/cow_go.jpg"></center>'
			'Looking at his watch, grandpa turns to you and says "The time is around lunchtime so it''s time to take the herd to the watering hole." You begin to gather the cows and lead them to the river.'
			if temper >= 25 and sunWeather = 1:pcs_hydra -= 12
			grandmahelp += 1
			minut += 60
			hndiwrk_exp += rand(0,3) 
			gs 'stat'

			act 'Further':gt'gadfield','cow2'
		end
	end
	if graze_cow = 0:act 'Back':gt'gadfield','field'
end

!MiaLoc tells us where Mira is Located
!----------------------------------------------
!MiraLoc = 0 (Mira at home)
!MiraLoc = 1 (Mira at river)
!MiraLoc = 2 (Mira at meadow)
!MiraLoc = 3 (Mira at forest)
!MiraLoc = 4 (Mira at field)
!MiraLoc = 5 (Mira with gop)
!---------------------------------------------

if graze_cow = 1 and npc_rel['A60'] >= 15 and mira = 0 and sunWeather = 1 and hour >= 10 and temp = 1 and Mira_no = 0 and(npc_QW['A63'] < 13 or npc_QW['A60'] >= 10 or mirasex > 1):
	*clr & cla
	'<center><img <<$set_imgh>> src="images/characters/village/mira/mira2.jpg"></center>'
	'While keeping an eye on the cow herd, you see Mira in the distance, approaching. You happily wave to her.'
	'" - Hi, <<$pcs_nickname>>. I wanted to visit you and brought water with me," she says nearing you. " - Have you missed me?"'
	minut += 5
	npc_rel['A60'] += 1
	mira = 1
	gs 'stat'

	act 'Further':pcs_hydra +=40 & gt'gadfield','cow'
end

if $ARGS[0] = 'cow2':
	gs 'gadukino_event', 'sound'
	gs'stat'

	'<center><H4>River</H4></center>'
	'<center><img <<$set_imgh>> src="images/locations/gadukino/village/cow_river.jpg"></center>'
	'The cow herd is standing by the river.'
	if mira = 1: MiraLoc = 42 & 'S<a href="exec: gt ''Miroslava'', ''Start''">Mira</a> is sitting next to you.'
	if temper >= 15 and sunWeather = 1:'- "You can go for a swim while there is time, <<$pcs_nickname>>. I`ll keep an eye on the herd," said you grandpa.'

	if graze_cow = 1:
		if hour < 16:
			act 'Herd cows with your grandfather (1:00)':
				*clr & cla
				'<center><img <<$set_imgh>> src="images/locations/gadukino/village/graze_cow'+rand(1,4)+'.jpg"></center>'
				'You manage to herd all the cows within the hour. Instead of letting your grandfather do all the work, you roll up the sleeves and do most of the work.'
				minut += 60
				if temper >= 25 and sunWeather = 1:pcs_hydra -= 12
				grandmahelp += 1
				graze_cow_exp = 1
				hndiwrk_exp += rand(0,3) 
				gs 'stat'

				act 'Further':gt'gadfield','cow2'
			end
			if temper >= 15 and sunWeather = 1 and mira = 0:
				act 'Swim (0:15)':
					*clr & cla
					'<center><img <<$set_imgh>> src="images/locations/gadukino/village/graze_cow_river.jpg"></center>'
					'You take a quick swim, cooling off your body.'
					minut += 15
					cumspclnt = 4 & gs 'cum_cleanup'
					pcs_sweat = 10 + rand(0,4)
					pcs_mood += 5
					pcs_willpwr += 5
					if pcs_stren < 30:stren_exp += 1
					gs 'stat'

					act 'Further':gt'gadfield','cow2'
				end
				act 'Tan (0:30)':
					*clr & cla
					'<center><img <<$set_imgh>> src="images/locations/gadukino/village/graze_cow_sun.jpg"></center>'
					'You lie down to sunbathe, while grandpa looks after the herd.'
					minut += 30
					pcs_sweat += 10
					pcs_mood += 5
					pcs_tan += 1
					gs 'stat'

					act 'Further':gt'gadfield','cow2'
				end
				act 'Read a book (1:00)':
					*clr & cla
					'<center><img <<$set_imgh>> src="images/locations/gadukino/village/graze_cow_book'+rand(1,2)+'.jpg"></center>'
					minut += 60
					if temper >= 25 and sunWeather = 1:pcs_hydra -= 12
					if pcs_nerd > 0:
						lastread = totminut
						lastreadday = daystart
						pcs_nerd += 1
						blizoruk += 1
						pcs_mood = 100
						if pcs_stren > 1: stren_deg -= 1
						if pcs_vital > 5: vital_deg -= 1
						'You start reading a book you brought with you. You are so engrossed in the story you forget about the time.'
					else
						blizoruk += 1
						pcs_mood += 10
						'While reading the book, time flies by cause you are really engaged in the books'' plot.'
					end
					gs 'stat'

					act 'Close the book':gt $loc, $metka
				end
			end
		end
		if hour >= 16 and hour < 19:
			*clr & cla
			'<center><img <<$set_imgh>> src="images/locations/gadukino/village/cow_go.jpg"></center>'
			'Looking at his watch, grandpa says that it''s time to drive the herd back on the field, but now closer to the forest. The two of you begin to gather the scattered herd and head toward the forest.'
			grandmahelp += 1
			if temper >= 25 and sunWeather = 1:pcs_hydra -= 12
			minut += 60
			hndiwrk_exp += rand(0,3) 
			gs 'stat'

			act 'Further':gt'gadfield','cow3'
		end
	end
end


if $ARGS[0] = 'cow3':
	gs 'gadukino_event', 'sound'
	gs'stat'

	'<center><H4>Field near the forest</H4></center>'
	'<center><img <<$set_imgh>> src="images/locations/gadukino/village/cow_forest.jpg"></center>'
	'The cow herd is standing on a field near the forest.'
	if mira = 1: MiraLoc = 43 & '<a href="exec: gt ''Miroslava'', ''Start''">Mira</a> is sitting next to you.'

	if graze_cow = 1:
		if hour < 19:
			act 'Herd cows with your grandfather (1:00)':
				*clr & cla
				'<center><img <<$set_imgh>> src="images/locations/gadukino/village/graze_cow'+rand(1,4)+'.jpg"></center>'
				'You manage to herd all the cows within the hour. Instead of letting your grandfather do all the work, you roll up the sleeves and do most of the work.'
				minut += 60
				if temper >= 25 and sunWeather = 1:pcs_hydra -= 12
				grandmahelp += 1
				graze_cow_exp = 1
				hndiwrk_exp += rand(0,3) 
				gs 'stat'

				act 'Further':gt'gadfield','cow3'
			end
			if mira = 0:
				act 'Take a run (1:00)':
					*clr & cla
					'<center><img <<$set_imgh>> src="images/locations/gadukino/village/graze_cow_run.jpg"></center>'
					'Since you have nothing to do, you run intervals across the field for an hour.'
					frost = 0
					minut += 60
					fat -= 5
					run_exp += 1
					pcs_sweat += 10
					pcs_mood += 5
					if temper >= 25 and sunWeather = 1:pcs_hydra -= 24
					gs 'stat'

					act 'Further':gt'gadfield','cow3'
				end
			end
			if temper >= 15 and sunWeather = 1 and mira = 0:
				act 'Pick flowers (1:00)':
					*clr & cla
					'<center><img <<$set_imgh>> src="images/locations/gadukino/village/graze_cow_flowers.jpg"></center>'
					'You spent an hour wandering around the field, picking flowers.'
					minut += 60
					pcs_mood += 20
					if temper >= 25 and sunWeather = 1:pcs_hydra -= 12
					gs 'stat'

					act 'Further':gt'gadfield','cow3'
				end
				act 'Tan (1:00)':
					*clr & cla
					'<center><img <<$set_imgh>> src="images/locations/gadukino/village/graze_cow_sun.jpg"></center>'
					'You sunbathe for an hour.'
					minut += 60
					pcs_mood += 10
					pcs_tan += 1
					pcs_sweat += 10
					gs 'stat'

					act 'Further':gt'gadfield','cow3'
				end
				if pcs_sleep < 40:
					act 'Take a nap on the grass (1:00)':
						*clr & cla
						'<center><img <<$set_imgh>> src="images/locations/gadukino/village/graze_cow_lying.jpg"></center>'
						'You lie down on the grass and doze off for an hour.'
						minut += 60
						pcs_mood += 10
						pcs_sleep+= 9
						if temper >= 25 and sunWeather = 1:pcs_hydra -= 12
						gs 'stat'

						act 'Further':gt'gadfield','cow3'
					end
				end
				act 'Read a book (1:00)':
					*clr & cla
					'<center><img <<$set_imgh>> src="images/locations/gadukino/village/graze_cow_book'+rand(1,2)+'.jpg"></center>'
					minut += 60
					if temper >= 25 and sunWeather = 1:pcs_hydra -= 12
					if pcs_nerd > 0:
						lastread = totminut
						lastreadday = daystart
						pcs_nerd += 1
						blizoruk += 1
						pcs_mood = 100
						if pcs_stren > 1: stren_deg -= 1
						if pcs_vital > 5: vital_deg -= 1
						'You start reading a book you brought with you. You are so engrossed in the story you forget about the time.'
					else
						blizoruk += 1
						pcs_mood += 10
						'While reading the book, time flies by cause you are really engaged in the books'' plot.'
					end
					gs 'stat'

					act 'Close the book':gt $loc, $metka
				end
			end
		end
		if hour >= 19:
			*clr & cla
			'<center><img <<$set_imgh>> src="images/locations/gadukino/village/cow_go_home.jpg"></center>'
			'Looking at his watch, grandpa says that it is late and time to drive the herd home. You hurry up and gather up the cows and rush them towards the village. You are barely keeping up with the herd.'
			if temper >= 25 and sunWeather = 1:pcs_hydra -= 12
			minut += 60
			mira = 0
			graze_cow = 0
			grandmahelp += 1
			hndiwrk_exp += rand(0,3) 
			gs 'stat'

			act 'Further':gt'gadukino'
		end
	end
end

--- gadfield ---------------------------------

