/////////////////////////////////////////////////////////////////////
// REVCAMP.S
/////////////////////////////////////////////////////////////////////

SETUP

	//Clear after the anvil retrived and the player has been to the hex once
	//IF mj_BEEN_TO_HEX
	IF mj_DEFEAT_GARGOS_1
		IF gt_PLACED_REV_CAMP_DENIZENS
			Remove gt_PLACED_REV_CAMP_DENIZENS
			RemoveC GARGOS
			RemoveC TALOS
			KillC CAMP_REV_1
			KillC CAMP_REV_2
			KillC CAMP_REV_3
			KillC CAMP_REV_4
			KillC CAMP_REV_5
			KillC CAMP_REV_6
			KillC CAMP_REV_7
			KillC CAMP_REV_8
			KillC CAMP_REV_9
			KillC CAMP_REV_10
			KillC CAMP_REV_11
			KillC CAMP_REV_12
			KillC PIT_BEAST_1
			KillC PIT_BEAST_2
			KillC PIT_BEAST_3
			KillC PIT_BEAST_4
			KillC PIT_BEAST_5
		ENDIF
	ELSE
		IF !gt_PLACED_REV_CAMP_DENIZENS
			Add gt_PLACED_REV_CAMP_DENIZENS
			PlaceC GARGOS pGARGOS_START
			PlaceC TALOS pTALOS_START
			PlaceC CAMP_REV_1 pREVP1
			PlaceC CAMP_REV_2 pREVP2
			PlaceC CAMP_REV_3 pREVP3
			PlaceC CAMP_REV_4 pREVP4
			PlaceC CAMP_REV_5 pREVP5
			PlaceC CAMP_REV_6 pREVP6
			PlaceC CAMP_REV_7 pREVP7
			PlaceC CAMP_REV_8 pREVP8
			PlaceC CAMP_REV_9 pREVP9
			PlaceC CAMP_REV_10 pREVP10
			PlaceC CAMP_REV_11 pREVP11
			PlaceC CAMP_REV_12 pREVP12
			PlaceC PIT_BEAST_1 pPIT1
			PlaceC PIT_BEAST_2 pPIT2
			PlaceC PIT_BEAST_3 pPIT3
			PlaceC PIT_BEAST_4 pPIT4
			PlaceC PIT_BEAST_5 pPIT5
			WanderInRectangle PIT_BEAST_1 pPITC1 pPITC2
			WanderInRectangle PIT_BEAST_2 pPITC1 pPITC2
			WanderInRectangle PIT_BEAST_3 pPITC1 pPITC2
			WanderInRectangle PIT_BEAST_4 pPITC1 pPITC2
			WanderInRectangle PIT_BEAST_5 pPITC1 pPITC2
			//*** revenant guard patrols
			RunS SouthGatePatrols
			RunS NorthGatePatrols
			MoveC CAMP_REV_8 pREV8
			AddControl CAMP_REV_8 MoveC pREVP8
			SequenceLoops CAMP_REV_8
			SwitchOnSightOfPlayer CAMP_REV_8 AttackDemo2
			MoveC CAMP_REV_9 pREV9
			AddControl CAMP_REV_9 MoveC pREVP9
			SequenceLoops CAMP_REV_9
			SwitchOnSightOfPlayer CAMP_REV_9 AttackDemo2
			MoveC CAMP_REV_10 pREV10
			AddControl CAMP_REV_10 MoveC pREVP10
			SequenceLoops CAMP_REV_10
			SwitchOnSightOfPlayer CAMP_REV_10 AttackDemo2
			MoveC CAMP_REV_11 pREV11
			AddControl CAMP_REV_11 MoveC pREVP11
			SequenceLoops CAMP_REV_11
			SwitchOnSightOfPlayer CAMP_REV_11 AttackDemo2
			MoveC CAMP_REV_12 pREV12
			AddControl CAMP_REV_12 MoveC pREVP12
			SequenceLoops CAMP_REV_12
			//*** end of revenant guard patrols
		ENDIF
	ENDIF

END

VIG TempSetup FALSE

	Set	gd_WEATHER_TYPE	0
	Set gd_WIND_TYPE	1
    RunS CueWeather

	IF gt_PLACED_REV_CAMP_DENIZENS
		AddBigFire 15339 20201
		AddBigFire  9178 17172
		AddBigFire  9445 13320
		AddBigFire  9699 23549
		AddBigFire 21000 23560
		AddBigFire 11768 22786
		AddBigFire 12785 12034
		AddBigFire 18696 13321
		AddBigFire 23003 19207
		AddBigFire 20971 20225
		AddBigFire 12779 21514
		AddBigFire 20461 18455
		AddBigFire 10767 21256
		AddBigFire 11270 14837
		AttachLoopSFXArea ig_253.wav 50 fire
	ENDIF

	CachePortrait GARGSHMN.BIN
	CachePortrait TALOS.BIN

END

/////////////////////////////////////////////////////////////////////

VIG PitBeastNoises ONESEC

	SWITCH RAND-20
		CASE 0
			IF !ISDEAD-PIT_BEAST_1
				SWITCH RAND-3
					CASE 0
						PlaySFXPerson PitBeast1REV.wav PIT_BEAST_1
					CASE 1
						PlaySFXPerson PitBeast2REV.wav PIT_BEAST_1
					CASE 2
						PlaySFXPerson PitBeast3REV.wav PIT_BEAST_1
				ENDSWITCH
			ENDIF
		CASE 1
			IF !ISDEAD-PIT_BEAST_2
				SWITCH RAND-3
					CASE 0
						PlaySFXPerson PitBeast1REV.wav PIT_BEAST_2
					CASE 1
						PlaySFXPerson PitBeast2REV.wav PIT_BEAST_2
					CASE 2
						PlaySFXPerson PitBeast3REV.wav PIT_BEAST_2
				ENDSWITCH
			ENDIF
		CASE 2
			IF !ISDEAD-PIT_BEAST_3
				SWITCH RAND-3
					CASE 0
						PlaySFXPerson PitBeast1REV.wav PIT_BEAST_3
					CASE 1
						PlaySFXPerson PitBeast2REV.wav PIT_BEAST_3
					CASE 2
						PlaySFXPerson PitBeast3REV.wav PIT_BEAST_3
				ENDSWITCH
			ENDIF
		CASE 3
			IF !ISDEAD-PIT_BEAST_4
				SWITCH RAND-3
					CASE 0
						PlaySFXPerson PitBeast1REV.wav PIT_BEAST_4
					CASE 1
						PlaySFXPerson PitBeast2REV.wav PIT_BEAST_4
					CASE 2
						PlaySFXPerson PitBeast3REV.wav PIT_BEAST_4
				ENDSWITCH
			ENDIF
		CASE 4
			IF !ISDEAD-PIT_BEAST_5
				SWITCH RAND-3
					CASE 0
						PlaySFXPerson PitBeast1REV.wav PIT_BEAST_5
					CASE 1
						PlaySFXPerson PitBeast2REV.wav PIT_BEAST_5
					CASE 2
						PlaySFXPerson PitBeast3REV.wav PIT_BEAST_5
				ENDSWITCH
			ENDIF
		CASE 5
			//no sound
		CASE 6
			//no sound
		CASE 7
			//no sound
		CASE 8
			//no sound
		CASE 9
			//no sound
		CASE 10
			//no sound
		CASE 11
			//no sound
		CASE 12
			//no sound
		CASE 13
			//no sound
		CASE 14
			//no sound
		CASE 15
			//no sound
		CASE 16
			//no sound
		CASE 17
			//no sound
		CASE 18
			//no sound
		CASE 19
			//no sound
	ENDSWITCH

END

/////////////////////////////////////////////////////////////////////

VIG SouthGateAlert ONESEC && !gt_SouthGateScramble && INAREA-P-REV_CAMP_GATE1

	Add gt_SouthGateScramble

	GiveSightOfPlayerTo CAMP_REV_1
	GiveSightOfPlayerTo CAMP_REV_2
	GiveSightOfPlayerTo CAMP_REV_3
	GiveSightOfPlayerTo CAMP_REV_4
	GiveSightOfPlayerTo CAMP_REV_11
	GiveSightOfPlayerTo CAMP_REV_12

	//call in all gate guards

	Engage CAMP_REV_1 P 1500
	AddControl CAMP_REV_1 AttackDemo2
	Engage CAMP_REV_2 P 1500
	AddControl CAMP_REV_2 AttackDemo2
	Engage CAMP_REV_3 P 1500
	AddControl CAMP_REV_3 AttackDemo2
	Engage CAMP_REV_4 P 1500
	AddControl CAMP_REV_4 AttackDemo2

	//call in guard from outside

	Engage CAMP_REV_11 P 1500
	AddControl CAMP_REV_11 AttackDemo2

	//call in east fence guard

	Engage CAMP_REV_12 P 1500
	AddControl CAMP_REV_12 AttackDemo2
END

/////////////////////////////////////////////////////////////////////

VIG SouthGatePatrols ONESEC && gt_SouthGateScramble && !INAREA-P-REV_CAMP_AREA

	Remove gt_SouthGateScramble

	MoveC CAMP_REV_1 pREV1
	AddControl CAMP_REV_1 MoveC pREVP1
	SequenceLoops CAMP_REV_1
	SwitchOnSightOfPlayer CAMP_REV_1 AttackDemo

	MoveC CAMP_REV_2 pREV2
	AddControl CAMP_REV_2 MoveC pREVP2
	SequenceLoops CAMP_REV_2
	SwitchOnSightOfPlayer CAMP_REV_2 AttackDemo

	MoveC CAMP_REV_3 pREV3
	AddControl CAMP_REV_3 MoveC pREVP3
	SequenceLoops CAMP_REV_3
	SwitchOnSightOfPlayer CAMP_REV_3 AttackDemo

	MoveC CAMP_REV_4 pREV4
	AddControl CAMP_REV_4 MoveC pREVP4
	SequenceLoops CAMP_REV_4
	SwitchOnSightOfPlayer CAMP_REV_4 AttackDemo

END

/////////////////////////////////////////////////////////////////////

VIG NorthGateAlert ONESEC && !gt_NorthGateScramble && INAREA-P-REV_CAMP_GATE2

	Add gt_NorthGateScramble

	GiveSightOfPlayerTo CAMP_REV_5
	GiveSightOfPlayerTo CAMP_REV_6
	GiveSightOfPlayerTo CAMP_REV_7
	GiveSightOfPlayerTo CAMP_REV_9
	GiveSightOfPlayerTo CAMP_REV_12

	//call in all gate guards

	Engage CAMP_REV_5 P 1500
	AddControl CAMP_REV_5 AttackDemo2
	Engage CAMP_REV_6 P 1500
	AddControl CAMP_REV_6 AttackDemo2
	Engage CAMP_REV_7 P 1500
	AddControl CAMP_REV_7 AttackDemo2

	//call in guard from outside

	Engage CAMP_REV_9 P 1500
	AddControl CAMP_REV_9 AttackDemo2

	//call in east fence guard

	Engage CAMP_REV_12 P 1500
	AddControl CAMP_REV_12 AttackDemo2
END

/////////////////////////////////////////////////////////////////////

VIG NorthGatePatrols ONESEC && gt_NorthGateScramble && !INAREA-P-REV_CAMP_AREA

	Remove gt_NorthGateScramble

	MoveC CAMP_REV_5 pREV5
	AddControl CAMP_REV_5 MoveC pREVP5
	SequenceLoops CAMP_REV_5
	SwitchOnSightOfPlayer CAMP_REV_5 AttackDemo

	MoveC CAMP_REV_6 pREV6
	AddControl CAMP_REV_6 MoveC pREVP6
	SequenceLoops CAMP_REV_6
	SwitchOnSightOfPlayer CAMP_REV_6 AttackDemo

	MoveC CAMP_REV_7 pREV7
	AddControl CAMP_REV_7 MoveC pREVP7
	SequenceLoops CAMP_REV_7
	SwitchOnSightOfPlayer CAMP_REV_7 AttackDemo
END

/////////////////////////////////////////////////////////////////////

VIG SeeGargos ONESEC && !gt_SEEN_GARGOS_CAMP
// && INAREA-P-REV_CAMP_ENTRANCE

	Add gt_SEEN_GARGOS_CAMP

	Widescreen TRUE
camcut p 20
	// *** START SPYING ON REVENANT CAMP ***


	// * CLIMB LEDGE *

	MoveCDir	P	pP_ROCKY_LEDGE 
	UUComplete  P 
	Capture		P	cM_LIE_ON_BELLY2_DOWN
setcammoveconstant 6
campan pos03

	MoveC		GARGOS		pGARGOS_PACE1 
	UUComplete  GARGOS 

	MoveCDir	GARGOS		pGARGOS_PACE2

	MoveCDir	TALOS		pTALOS_TALK_GARGOS 
	UUComplete  TALOS 

	Face		TALOS		GARGOS 
	UUComplete	TALOS
	UUComplete  GARGOS 

	// * CONVERSATION BETWEEN GARGOS AND TALOS *

	Capture TALOS cM_TALOS_KNEEL1_KNEEL
	//"My Lord."
	Say	Ta0001 

	Capture GARGOS cM_GARGOS_LOOK_AT_TALOS1
	//"What news of the search, Talos?"
	Say	os0001 GARGSHMN.BIN
	ChangeProfileToIdentified Esoldier_Talos
	//"The camp is secure...The Raal...say it is here."
	Say	Ta0002 
	//"Are you certain...?"
	Say	os0004 GARGSHMN.BIN
	//"Yes..."
	Say	Ta0005
	//"Excellent...we will recover the artefact...Go...Prepare."
	Say	os0005 GARGSHMN.BIN

	Capture TALOS cM_TALOS_KNEEL3
	UUcomplete TALOS

	//"My Lord."
	Say	Ta0006

	MoveC	TALOS		pTALOS_REGIONS_GROUP 
	Wait		3500

	MoveC	GARGOS pGARGOS_PACE1

	//"I must feed..."
	Say	os0006 GARGSHMN.BIN

	Capture P cM_V5_STAND1
//setcammoveconstant 6
setcammoveconstant 10
campan p

	UUCameraComplete

	// *** END SPYING ON REVENANT CAMP ***

	RemoveC GARGOS
	RemoveC TALOS

	Widescreen FALSE
	SetCamMoveNormal
END

/////////////////////////////////////////////////////////////////////
