# swamp_yard

if $ARGS[0] = 'start' or $ARGS[0] = '':
	$loc = 'swamp_yard'
	$metka = ''
	$menu_loc = 'swamp_yard'
	$menu_arg = ''
	menu_off = 0
	$location_type = 'secluded'

	gs 'gadukino_event', 'sound'
	gs 'stat'

	!the chance of encountering hunters

	if week = 6 or week = 7:huntersrand = RAND(1,3)
	if week < 6:huntersrand = RAND(1,5)

	if huntersrand = 1:hunters = 1
	!the chance of hitting GG, if she`s a slut
	huntslutsexrand = rand(1,3)
	! to remember were cowards or not
	!if lost_girl = 0:lost_girl += rand(40,60)
	if StoryLine = 1 and lost_girl = 0 and forest_lostday > 0: lost_girl=daystart+2

	swiss_army_random_number = rand(1,10)
	
	'<center><B>The yard in front of the hut</B></center>'
	if month >= 5 and month <= 9:
		if hour >= 6 and hour < 22:
			'<center><img <<$set_imgh>> src="images/locations/gadukino/hunters/swamp_yard.jpg"></center>'
		else
			'<center><img <<$set_imgh>> src="images/locations/gadukino/hunters/swamp_yard_night.jpg"></center>'
		end
	else
		if hour >= 8 and hour < 18:
			'<center><img <<$set_imgh>> src="images/locations/gadukino/hunters/swamp_yard_winter.jpg"></center>'
		else
			'<center><img <<$set_imgh>> src="images/locations/gadukino/hunters/swamp_yard_winter_night.jpg"></center>'
		end
	end

	'The yard in front of the hut.'
	'Behind the hut there is a <a href="exec: gt ''swampspring'' ">spring</a>, if you continue a little further down there is a small <a href="exec: gt ''backwater'' ">creek</a> with relatively clean water.'
	if findvel = 3:'On the side of the hut is an old <a href="exec:gt ''bicycle'',''swamp''">bike</a>.'
	if hunters_off = 0 and hunters_sleep = 0 and huntersKnow = 0:'You spot some unfamiliar people standing in front of the hut.'
	if hunters_off = 0 and hunters_sleep = 0 and huntersKnow = 1:'You notice the <a href="exec: gt ''hunters'', ''check_opinion'' ">hunters</a> standing in the front yard.'
	if hunters_off = 1 and huntersKnow = 1:'Hunters are probably off hunting. Maybe you can find stuff to do around in the meantime?'
	if hunters_sleep = 1 and huntersKnow = 1:'Hunters are in the hut sleeping. Maybe you should go to sleep too'
	
	if huntersknow = 1:
		act 'Go into the hut':
			minut += 2
			gt 'swamphouse'
		end	
	end	
	act 'Approach the firepit': gt 'swamp_yard', 'campfire'
	act 'Look around the nearby woods': minut += 10 & gt 'swamp_yard', 'nearby_woods'

	!Conditional acts
	if dirty_swamp_yard > 5:  act 'Clean up the trash outside': gs 'hunter_favors', 'yard_cleanup'
	if hunter_collective_opinion < 10: act '<b>Escape to the swamp</b>': gs 'swamp_yard', 'swamp_escape'

	if hunterhelp = 1: gs 'swamp_yard', 'rescued_from_swamp'	

	if hunterhelp = 2 and huntersKnow = 0:
		gs 'hunter_interactions', 'meet_hunters_after_rescue'
	elseif huntersKnow = 0:
		act 'Approach the men': gt 'hunter_interactions', 'meet_hunters'
	end

	gs 'hunter_ambient', 'schedule'

	if hour >= 8 and hour < 20: gs 'swamp_yard', 'daytime_flavor_events'
	if hour >= 20 and hour < 24: gs 'swamp_yard', 'nighttime_flavor_events'
end	

!Code blocks for leaf events (events not calling other  events)
if $ARGS[0] = 'swamp_escape':
	!add chance to swamped by illume
	if hunters = 1:
		
		if hour >= 6 and hour < 21:
			minut += 5
			if rand(1,10)>9:
				gt 'swamp'
			else
				gt 'gadforestswamp','2'
			end		
		else
			*clr & cla
			gs 'stat'
			'<center><img <<$set_imgh>> src="images/locations/gadukino/hunters/igorhanter.jpg"></center>'
			'As you start moving into the swamp Igor calls after you.'
			
			!TODO: Different line depending on opinion and slut
			'"<<$pcs_nickname>>, where are you going? You will get stuck in there!'
			
			act 'Turn back':gt 'swamp_yard'
			act 'Ignore him and keep going':
				minut += 5

				!TODO: Add skill clothing and temp check here instead of praying to RNGesus
				if rand(1,10)>8:
					gt 'swamp'
				else
					gt 'gadforestswamp','2'
				end
			end
		end
	else
		minut += 5

		!TODO: Here too, also see how to avoid duplicating. Maybe create a child event node?
		if (hour >= 6 and hour < 21) or rand(1,10)>7:
			gt 'swamp'
		else
			gt 'gadforestswamp','2'
		end
	end

	gt 'gadforestswamp','2'
end

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

	if $clothingworntype ! 'nude':
		'<center><img <<$set_imgh>> src="images/locations/gadukino/hunters/hanterhelp.jpg"></center>'
	else
		'<center><img <<$set_imgh>> src="images/locations/gadukino/hunters/hanterhelp1.jpg"></center>'
	end
	
	if $clothingworntype = 'nude':
		if huntersKnow = 0:
			if pcs_apprnc >= 100:
			'"Are you... a mermaid?" You hear one of the men blurt out before blushing'
			else 
			'What the hell happened to you? Are you alright?'
			end
		end	
		if huntersKnow = 1 and huntersKnowSlut = 0:'"<<$pcs_nickname>>, what happened to you? Where are your clothes?" Andrei said concernedly.'
		if huntersKnow = 1 and huntersKnowSlut = 1:'Well isn''t this our favorite damsel in distress. And she''s even naked and ready for us so we can jump straight to the happy ending! Andrei grinned.'
	end
	
	if huntersKnow = 0:
		'The hunters help you to a dry place. For some time you just sit there, staring blankly ahead, trying to catch your breath. After a while feeling better you decide to find out where you are and who it was that saved you.'
		act 'Look':hunterhelp = 2 & gt 'swamp_yard'
	else
		'The hunters help you to a dry place. For some time you just sit there, staring blankly ahead, trying to catch your breath. After a short rest you go out to the yard.'
		act 'Further':hunterhelp = 0 & gt 'swamp_yard'
	end
end

!TODO: Move these to the interactions or favors files
!TODO: Redo the events here after working on the other locations
if $ARGS[0] = 'confronted_after_drunken_gangbang':
	if huntdanceslut = 1:
		cla
		*clr
		minut+=5
		gs 'stat'

		'<center><img <<$set_imgh>> src="images/locations/gadukino/hunters/andreihanter.jpg"></center>'
		'As soon as you walk into the yard, you immediately walk up to Andrei.'
		'"I need to talk to you, <<$pcs_nickname>>," he said. "Can you recall what happened last night?"'
		'"Well... uh... Yes, I think I can..." you reply, blushing, staring down at the ground.'
		'"I used to say that you look just like your mother," said Andrei looking at you. "After your little show yesterday, as it turns out, the resemblance doesn''t stop at just the looks."'
		'Andrei paused looking at you while you try to collect your thoughts to understand what he''s trying to imply.'
		'"To be frank, you''re as slutty as your mother was in her youth, the apple doesn''t fall far away from the tree as they say..." he chuckles. "Take it as a compliment."'
		'You look at Andrei, completely stunned by what you just heard.'
		'"And what are sluts best at?" he continues. "That''s right, to pleasure men. Don''t you agree?"'

		if pcs_dom > 0 and alko < 8:act'Refuse':huntdanceslut = 3 & gt 'hunters', 'start'
		act'Agree':huntdanceslut = 2 & gt 'hunters', 'start'
	end
end	 

!Assorted sex scenes specifically for the yard
if $ARGS[0] = 'skirt_breeze':
	if CloSkirtShortness > 1 and $pantyworntype = 'none': 
		*clr & cla
		hunter_sexual_comfort += 2
		
		'<center><img <<$set_imgh>> src="images/locations/gadukino/hunters/no_tanga.jpg"></center>'
		'You walk across the yard, when suddenly the wind lifts your skirt.'
		'"I forgot to put on panties...," you realize this seeing your bare pussy.'
		'You nervously started looking around if anyone caught a glimpse of your little wardrobe malfunction...'
		'You hoped that the men missed the opportunity seeing you exposed, however, Igor''s face had turned red and you see Andrei grinning, you realize quite quickly that your little show did not pass unappreciated.'
		gs 'arousal', 'flashlite', 1
		gs 'arousal', 'end'
		gs 'stat'
		
		act 'Further':gt 'swamp_yard'
	end
end


!Code blocks for branch events (events calling other  events)
if $ARGS[0] = 'campfire':
		!TODO: Add mechanic so that fire slowly goes through wood and extinguishes when there is no more left
		cla
		*clr
		menu_off = 1
		minut += 1
		gs 'stat'

		act 'Move away': gt 'swamp_yard', 'start'
		act 'Sit by the fire': gt 'swamp_yard', 'fireside'

		if campfire = 1:
			if hour >= 8 and hour < 20:
				'<center><img <<$set_imgh>> src="images/locations/gadukino/hunters/campfire_day.jpg"></center>'
			else
				'<center><img <<$set_imgh>> src="images/locations/gadukino/hunters/campfire_night.jpg"></center>'
			end
			
			'A nice, warm campfire you can sit and relax by. You can use it to cook something or heat up some water to bathe.'
			'You can also put it out with the bucket if there is enough water in it'
			
			if bucket >= 3:
				act 'Put out the fire':
					cla & *clr
					'<center><img <<$set_imgh>> src="images/locations/gadukino/hunters/campfire_put_out.jpg"></center>'
					'You pour some water to extinguish the campfire'
					
					campfire = 0
					minut += 5
					bucket -= 3

					act 'Further': gt 'swamp_yard', 'campfire'
				end
			end

			if bucket > 0 and boletus > 0 and mushroom_soup = 0:
				act 'Cook some mushroom soup (0:30)': gs 'hunter_favors', 'mushroom_soup'
			end
		
			if bucket > 0 and raw_meat > 0 and meat_stew = 0:
				act 'Cook some meat stew (1:00)': gs 'hunter_favors', 'meat_stew'
			end
		
			if bucket >= 5 and hotwater = 0:
				act 'Heat up water (0:30)':
					cla
					*clr
					minut += 30
					bucket -= 5
					hotwater = 1

					water_heated += 1
					gs 'stat'
		
					'<center><img <<$set_imgh>> src="images/locations/gadukino/hunters/hotwater.jpg"></center>'
					*nl
					
					if water_heated > 5 and (inhibition < 85 or hunter_sexual_comfort > 25):
						'"It is too tedious to keep heatiing up water", you think to yourself.'
					else
						'With the now heated water, you can bathe yourself in the tub.'
					end

					act 'Continue': gt 'swamp_yard', 'campfire'
				end
			end	
			
		else:
			if hour >= 8 and hour < 20:
				'<center><img <<$set_imgh>> src="images/locations/gadukino/hunters/campfire_out_day.jpg"></center>'
			else
				'<center><img <<$set_imgh>> src="images/locations/gadukino/hunters/campfire_out_night.jpg"></center>'
			end	
			'You can use this firepit to light a fire, if you have some firewood available.'

			!TODO: Tie fire lighting to bushcraft, make hunters do it on their schedule or with Sveta asking
			if firewood >= 10:
				act 'Light fire':
					cla & *clr
					
					if $clothingworntype ! 'nude':
						'<center><img <<$set_imgh>> src="images/locations/gadukino/hunters/campfire_light.jpg"></center>'
					else
						'<center><img <<$set_imgh>> src="images/locations/gadukino/hunters/campfire_light_nude.jpg"></center>'
					end
					
					'You use some chopped wood, dry branches and twigs to light a campfire in the firepit'

					firewood -= 10
					campfire = 1
					minut += 15

					act 'Further': gt 'swamp_yard', 'campfire'
				end
			elseif firewood > 1:
				*nl
				'There is some wood and twigs by the pit but not enough to light a new fire'
			else
				'You do not see any firewood nearby. You will probably need to collect some branches, chop some or ask a hunter to do so.'		
			end	
		end

end	

if $ARGS[0] = 'fireside':
	cla & *clr

	act 'Get up':
		gt 'swamp_yard', 'start'
	end

	if hunter_breakfast = 1 or hunter_lunch = 1:
		'<center><img <<$set_imgh>> src="images/locations/gadukino/hunters/hanters1.jpg"></center>'
		'Hunters are also sitting around the campfire, talking and joking about all kinds of stuff before heading out hunting'
		act 'Chat (1:00)':
			gt 'hunter_interaction', 'chat_with_hunters'
		end
		
		!TODO: Flesh out the learning content here
		act 'Ask for some tips on how to survive in the woods (1:00)':
			hunter_lessons += 1
			*clr & cla
		
			if hunter_collective_opinion > 25:
				hunter_collective_opinion -= 1
				pcs_bushcraft += 1
				gs 'stat'

				minut += 60

				*nl
				'Hunters talk to you about some of their experiences when they first started out'
			else
				if hunter_lessons > 10 AND hunter_sexual_comfort > 25:
					!TODO: Prototype implementation for the creekside event, to be revamped
					'Sergei tells you to go by the creek for the next lesson about how to scope the area for a hunt.'
					hunter_lessons -= 8
					act 'Further': gt 'hunter_favors', 'creekside_gangbang_request'
				else		
					minut += 20
					'The hunters do not even bother to answer you. You simply sit in awkward silence for twenty minutes before getting to to other business'
				end		
			end

			act 'Further': gt 'swamp_yard', 'campfire'
		end
	end		

	if hunters_drink = 1:
		'<center><img <<$set_imgh>> src="images/locations/gadukino/hunters/fireside_drink.jpg"></center>'
		'Hunters are drinking and chatting loudly. You can join them for a chat, or maybe a drink or two if you would like'		
		act 'Chat (1:00)':
			gt 'hunter_interactions', 'chat_with_hunters'
		end

		act 'Have a drink': 
		 	gs 'hunter_interactions', 'drink_with_hunters'
		end
	end

	act 'Eat a meal':	
		cla & *clr
		act 'Stop eating': gt 'swamp_yard', 'fireside'
		act 'Eat jerky and trail mix':
			!gs 'food', 'snack'
			*clr
			'<center><img <<$set_imgh>> src="images/locations/gadukino/hunters/jerky_mix.jpg"></center>'
		
			'You munch on some dried meat and trail mix. Not a full hot meal by any means but it''s better than nothing'
			pcs_hydra -= 15

			if pcs_energy >= 85:
					fat += 1
					pcs_energy += 20
			else
				pcs_energy += 30
			end

			gs 'stat'
		end
		if meat_stew > 0:
			act 'Eat meat stew':
				gs 'food', 'm_meal'
				*clr
				meat_stew -= 1
				'<center><img <<$set_imgh>> src="images/locations/gadukino/hunters/soup.jpg"></center>'
				*nl

				if pcs_energy >= 100:
					fat += 5
					'After having a healthy serving of meat stew, you feel stuffed.'
				elseif pcs_energy >= 80:
					fat += 3
					pcs_energy += 40
					'You force yourself to have another sip of the meat stew.'
				else
					fat += 1
					pcs_energy += 30
					'You''re enjoing some warm meat stew. Just what you needed.'
				end
				if pcs_hydra >= 100:
					pcs_hydra += 10
				else
					pcs_hydra += 20
				end
				*nl
				if meat_stew > 0:
					'There''s <<meat_stew>> '+iif(meat_stew > 1, 'servings','serving')+' of stew left in the pot'
				else
					'You have finished the last of the stew, the pot is empty.'
				end
				gs 'stat'
			end	
		end	
		if mushroom_soup > 0:
			act 'Eat mushroom soup':
				gs 'food', 'm_meal'
				*clr
				mushroom_soup -= 1
				'<center><img <<$set_imgh>> src="images/locations/gadukino/hunters/soup.jpg"></center>'
				*nl

				if pcs_energy >= 100:
					fat += 3
					'After having a healthy serving of mushroom soup, you feel stuffed.'
				elseif pcs_energy >= 80:
					fat += 1
					pcs_energy += 30
					'You force yourself to have another sip of the mushroom soup.'
				else
					pcs_energy += 20
					'You''re enjoing some warm mushroom soup. Just what you needed.'
				end
				if pcs_hydra >= 100:
					pcs_hydra += 20
				else
					pcs_hydra += 40
				end
				*nl
				if mushroom_soup > 0:
					'There''s <<mushroom_soup>> '+iif(mushroom_soup > 1, 'servings','serving')+' of soup left in the pot'
				else
					'You have finished the last of the soup, the pot is empty.'
				end
				gs 'stat'
			end
		end
		if bilberry > 0:
			act 'Eat berries':
				*clr
				minut += 20
				pcs_energy += 10
				pcs_hydra += 10
				bilberry -= 1
				pcs_willpwr += 5
				pcs_health += 5
				pcs_mood += 10
				gs 'stat'
				'<center><img src="images/locations/gadukino/forest/bilberry.jpg"></center>'
				'You ate a few berries.'
			end
		end
	end	
end

!Auxilliary locations
if $ARGS[0] = 'nearby_woods':
	gt 'swamp_woods'
end	

if $ARGS[0] = 'daytime_flavor_events': 
	if rand(1,50) = 1: 
		gs 'swamp_yard', 'skirt_breeze'
	elseif rand(1,20) = 1:
		gs 'hunter_favors', 'housekeeping_request'
	elseif rand(1,25) = 1: 
		gs 'hunter_ambient' , 'yard_convo'
	elseif rand(1, hunter_sexual_comfort / 4 + 2) = 1:
		gs 'hunter_interactions', 'naked_encounter'
	elseif rand(1,15) = 1:
		gs 'hunter_ambient', 'bring_food'
	end	
end

if $ARGS[0] = 'nighttime_flavor_events':
	!TODO: Add stuff here
end
--- swamp_yard ---------------------------------

