/////////////////////////////////////////////////////////////////////
// MANORINT.S - Lord Crux's Manor interior
/////////////////////////////////////////////////////////////////////

SETUP

	IF !gt_PLACED_MANORINT_CHARS
		Add gt_PLACED_MANORINT_CHARS

		PlaceC LORDCRUX pCRUX

		IF !mj_BLOODMASTER_BANE
			PlaceC LAEN pLAEN_1
			Add gt_CUE_CHANT_HIDING
		ENDIF

		PlaceC MANOR_ASS_1 pASS_1
		PlaceC MANOR_ASS_2 pASS_2
		PlaceC MANOR_ASS_3 pASS_3
		PlaceC MANOR_ASS_4 pASS_4
		PlaceC MANOR_ASS_5 pASS_5
		PlaceC MANOR_ASS_6 pASS_6
		PlaceC MANOR_PIG_7 pG_7
		PlaceC MANOR_PIG_8 pG_8
		PlaceC MANOR_PIG_9 pG_9
		PlaceC MANOR_PIG_10 pG_10

	ENDIF

	IF gt_GUILD_RING_OK
		RunS GuardsFriendly
	ELSE
		Add gt_MANOR_GUARDS_HOSTILE_NOW
	ENDIF

	Add gt_JAKE_GONE
	QLRemove ql022

END

VIG TempSetup FALSE

	SetWeather 0 0 0 0 0 0 0 0

	IF !f_CRUX_DEAD

		AddBigFire 21750 27739
		AddBigFire 22276 27922
		AddBigFire 21124 23703
		AddBigFire 9492 22006

		AttachLoopSFXArea ig_253.wav 50 fire

		FX_Torch 12107 22527 1024
		FX_Torch 11996 22480 1024
		FX_Torch 11989 22576 1024

	ENDIF

	CachePortrait LAENCHNT.BIN
	CachePortrait LORDCRUX.BIN

END

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

VIG ChantHidesHimself gt_CUE_CHANT_HIDING

	Widescreen TRUE

	Freecam
	camcut van01
	Remove gt_CUE_CHANT_HIDING

	MoveC P pP_CHANT_VAN
	UUComplete P

	IF gt_GUILD_RING_OK
		AwardEP xp_GUILD_RING
	ENDIF

	Face LAEN P

	IF gt_GUILD_RING_OK
		//"With your disguise...see what you can find out yourself."
		Say dacm11
	ELSE
		//"...It will be dangerous for you here."
//		Say dacm10 // dropped since its slightly misleading
	ENDIF

	EngagePoint LAEN pWANDER_1 1000

	//"I shall be as a shadow..."
	QuickSay dacm12
	wait 500
	FX_Invisible LAEN
	UUSay
	wait 2000

	RemoveC LAEN
	normalcam
	camcut P

	Widescreen FALSE
END

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

VIG GuardsFriendly FALSE

	DelayControl MANOR_ASS_6 1 2
	AddControl MANOR_ASS_6 MoveC pWANDER_1
	AddControl MANOR_ASS_6 MoveC pWANDER_2
	AddControl MANOR_ASS_6 MoveC pWANDER_3
	AddControl MANOR_ASS_6 MoveC pWANDER_4
	SequenceRandomlySelects MANOR_ASS_6
	SwitchOnSightOfPlayer	MANOR_ASS_6 LookAtTurnFollow P

END

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

VIG GuardsHostile FIVESEC && gt_MANOR_GUARDS_HOSTILE_NOW

	Remove gt_MANOR_GUARDS_HOSTILE_NOW
	Remove gt_GUILD_RING_OK

	//AttackDemo2 MANOR_ASS_1
	//AttackDemo2 MANOR_ASS_2
	//AttackDemo2 MANOR_ASS_3
	AttackDemo2 MANOR_ASS_4
	AttackDemo2 MANOR_ASS_5

	DelayControl MANOR_ASS_6 1 2
	AddControl MANOR_ASS_6 MoveC pWANDER_1
	AddControl MANOR_ASS_6 MoveC pWANDER_2
	AddControl MANOR_ASS_6 MoveC pWANDER_3
	AddControl MANOR_ASS_6 MoveC pWANDER_4
	SequenceRandomlySelects MANOR_ASS_6
	SwitchOnSightOfPlayer MANOR_ASS_6 AttackDemo2

	AttackDemo2 MANOR_PIG_7
	AttackDemo2 MANOR_PIG_8
	AttackDemo2 MANOR_PIG_9
	AttackDemo2 MANOR_PIG_10

END

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

VIG GuardsAttacked FIVESEC && gt_GUILD_RING_OK && (DAMAGED-MANOR_PIG_7 || DAMAGED-MANOR_PIG_8 || DAMAGED-MANOR_PIG_9 || DAMAGED-MANOR_PIG_10)

	RunS GuardsHostile

END

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

VIG AssassinsAttacked FIVESEC && gt_GUILD_RING_OK && (DAMAGED-MANOR_ASS_1 || DAMAGED-MANOR_ASS_2 || DAMAGED-MANOR_ASS_3 || DAMAGED-MANOR_ASS_4 || DAMAGED-MANOR_ASS_5 || DAMAGED-MANOR_ASS_6)

	RunS GuardsHostile

END

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

VIG OverhearMeeting HALFSEC && (gt_GUILD_RING_OK || !INCOMBAT-P) && !gt_HEAR_CRUX_LIGHTSTEALER && !gt_HEAR_CRUX_GARGOS && !gt_HEAR_CRUX_BART && !gt_HEAR_CRUX_MESSENGER && INAREA-P-NEAR_MEETING

	MoveC P pLISTEN

	SWITCH RAND-4
		CASE 0
			//"The raiding...is not going smoothly. Lightstealer...has demanded more..."
			QuickSay lc0005
			Add gt_HEAR_CRUX_LIGHTSTEALER
		CASE 1
			//"I have received word from Gargos...the search...goes well..."
			QuickSay lc0003
			Add gt_HEAR_CRUX_GARGOS
		CASE 2
			//"...Barthelago has warned us...a new warlock..."
			QuickSay lc0004
			Add gt_HEAR_CRUX_BART
		CASE 3
			//"...Messenger...moving it north...within...two days..."
			QuickSay lc0002
			Add gt_HEAR_CRUX_MESSENGER
	ENDSWITCH

	AwardEP xp_OVERHEAR_CRUX

END

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

VIG ListenAtDoor TENSEC && !f_CRUX_DEAD && (gt_GUILD_RING_OK || !INCOMBAT-P) && INAREA-P-NEAR_MEETING 

	SWITCH RAND-4
		CASE 0
			IF !gt_HEAR_CRUX_LIGHTSTEALER && !SPEAKING
				//"The raiding...is not going smoothly. Lightstealer...has demanded more..."
				QuickSay lc0005
				Add gt_HEAR_CRUX_LIGHTSTEALER
				AwardEP xp_OVERHEAR_CRUX
			ENDIF
		CASE 1
			IF !gt_HEAR_CRUX_GARGOS && !SPEAKING
				//"I have received word from Gargos...the search...goes well..."
				QuickSay lc0003
				Add gt_HEAR_CRUX_GARGOS
				AwardEP xp_OVERHEAR_CRUX
			ENDIF
		CASE 2
			IF !gt_HEAR_CRUX_BART && !SPEAKING
				//"...Barthelago has warned us...a new warlock..."
				QuickSay lc0004
				Add gt_HEAR_CRUX_BART
				AwardEP xp_OVERHEAR_CRUX
			ENDIF
		CASE 3
			IF !gt_HEAR_CRUX_MESSENGER && !SPEAKING
				//"...Messenger...moving it north...within...two days..."
				QuickSay lc0002
				Add gt_HEAR_CRUX_MESSENGER
				AwardEP xp_OVERHEAR_CRUX
			ENDIF
	ENDSWITCH
END

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

VIG ConfrontCrux !f_CRUX_DEAD && !gt_FIGHTING_CRUX && (DAMAGED-LORDCRUX || ((MSG-od_dMEETING || gt_KNOCK_TEST) && (gt_HEAR_CRUX_LIGHTSTEALER || gt_HEAR_CRUX_GARGOS || gt_HEAR_CRUX_BART || gt_HEAR_CRUX_MESSENGER)))

	FreezeC MANOR_ASS_4
	FreezeC MANOR_ASS_5
	FreezeC MANOR_ASS_6
	FreezeC MANOR_PIG_7
	FreezeC MANOR_PIG_8
	FreezeC MANOR_PIG_9
	FreezeC MANOR_PIG_10

	// *** ATTACK CRUX ***

	Widescreen TRUE

	freecam
	camcut cam01
	IF !DAMAGED-LORDCRUX
		MoveC P pDOOR
	ENDIF
	RDoorOpen dMEETING
	UUDoorStill dMEETING

	LookAtTurnFollow MANOR_ASS_1 P
	Wait 150
	LookAtTurnFollow LORDCRUX P
	Wait 250
	LookAtTurnFollow MANOR_ASS_2 P
	Wait 150
	LookAtTurnFollow MANOR_ASS_3 P

	UUComplete P

	Wait 1000

	//"The warlock is here! Kill him!"
	Say lc0006

	campan cam02

	RunS GuardsHostile
	AttackDemo2 MANOR_ASS_1
	AttackDemo2 MANOR_ASS_2
	AttackDemo2 MANOR_ASS_3

	UUComplete P

	Wait 1500

	IF !mj_BLOODMASTER_BANE

		campan cam04
		PlaceC LAEN pLAEN_2
		SamplesOff
		FX_Visible LAEN
		SamplesOn
		Engage LAEN LORDCRUX 1250
		AddControl LAEN	LookAt LORDCRUX

		Wait 500
		LookAtTurnFollow MANOR_ASS_1 LAEN
		Wait 150
		LookAtTurnFollow MANOR_ASS_2 LAEN
		Wait 250
		LookAtTurnFollow MANOR_ASS_3 LAEN
		Wait 150
		LookAtTurnFollow LORDCRUX LAEN

		//"Your time is at an end, Crux. This is for all my people...And for Jake."
		Say dacm13
		ChangeProfileToIdentified Sassassin_Crux

		UUComplete LAEN
		MeleeAttack LAEN
		Wait 150
		
	ENDIF

	GiveSightOfPlayerTo	MANOR_ASS_1
	MeleeAttack			MANOR_ASS_1
	Wait 250

	GiveSightOfPlayerTo	MANOR_ASS_2
	MeleeAttack			MANOR_ASS_2
	Wait 150

	GiveSightOfPlayerTo	MANOR_ASS_3
	MeleeAttack			MANOR_ASS_3
	Wait 250

	camcut P

	MeleeAttack LORDCRUX

	UnFreezeC MANOR_ASS_4
	UnFreezeC MANOR_ASS_5
	UnFreezeC MANOR_ASS_6
	UnFreezeC MANOR_PIG_7
	UnFreezeC MANOR_PIG_8
	UnFreezeC MANOR_PIG_9
	UnFreezeC MANOR_PIG_10

	Widescreen FALSE
	normalcam

	Add gt_FIGHTING_CRUX

END
	
/////////////////////////////////////////////////////////////////////

VIG CruxDead ONESEC && gt_FIGHTING_CRUX && ISDEAD-LORDCRUX && ISDEAD-MANOR_ASS_1 && ISDEAD-MANOR_ASS_2 && ISDEAD-MANOR_ASS_3

	Remove gt_FIGHTING_CRUX
	Add f_CRUX_DEAD

	Widescreen TRUE

	QLRemove ql015
	AwardEP xp_AVENGE_JAKE

	RunS CruxDeadRunAway

	IF !mj_BLOODMASTER_BANE

		EngageAndFace LAEN P
		UUComplete LAEN

		//"We have done a good thing here, blood of Andrus."
		Say dacm16

		ResetChoice
		WHILE !MenuExit
			ClearChoices

			IF co_LORDBANE
				AddChoice 1 txpw04
			ENDIF

			IF co_BLOODMASTER
				AddChoice 2 txpw08
			ENDIF

			//The Guild
			AddChoice 3 tx0097

			//Barthelago
			AddChoice 4 tx0007

			IF co_LIGHTSTEALER
				AddChoice 5 txpw07
			ENDIF

			//Leave
			AddChoice 0 tx0003

			GetChoice LAEN

			SWITCH Choice
				CASE 1
					//Lord Bane

					//"...king of our people..."
					Say dacm17

				CASE 2
					//Blood Master

					//"...forged by Alvaris...to slay the undead..."
					Say dacm18

				CASE 3
					//The Guild

					//"...the Guild and Lightstealer are puppets of a darker power."
					Say dacm19

				CASE 4
					//Barthelago

					//"...he was a spy for the guild..."
					Say dacm20

				CASE 5
					//Lightstealer

					//"...king of the vampires..."
					Say dacm21
			ENDSWITCH
		ENDWHILE


		//"I will look around here and see what I can find. Feel free to explore the rest of the house."
		Say dacm15

		//"I will meet up with you once I have all the answers I came here for. Thank you for your aid, blood of Andrus."
		Say dacm22

		EngagePoint LAEN pWANDER_1 500
		Wait 5000
		//FX_Invisible LAEN
		//Wait 2500

		RemoveC LAEN

	ENDIF

	Widescreen FALSE

END

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

VIG LordCruxDR  MSG-DR_LORDCRUX

	IF !gt_PLAYED_DR_DRUX

		Widescreen TRUE

		Add gt_PLAYED_DR_DRUX

		Say lc0007

		ResetChoice
		WHILE !MenuExit
			ClearChoices

			IF  gt_HEAR_CRUX_LIGHTSTEALER
				// Lightstealer
				AddChoice 1 txpw07
			ENDIF
			IF  gt_HEAR_CRUX_GARGOS
				// Gargos
				AddChoice 2 txcm02
			ENDIF
			IF  gt_HEAR_CRUX_BART
				// Barthelago
				AddChoice 3 tx0007
			ENDIF
			IF  gt_HEAR_CRUX_MESSENGER
				// Messenger
				AddChoice 4 txcm04
			ENDIF
			// The Guild
			AddChoice 5 tx0097
			// The Heart of Kinkathra
			AddChoice 6 txlb08
			// Leave
			AddChoice 0 tx0003

			GetChoice LORDCRUX

			SWITCH CHOICE
				CASE 1
					// *** Lightstealer ***
					Say lc0008
					Add co_BLOODMASTER
				CASE 2
					// *** Gargos ***
					Say lc0009
					Add co_GARGOS
				CASE 3
					// *** Barthelago ***
					Say lc0010
				CASE 4
					// *** Messenger ***
					Say lc0011
					Add co_MESSENGER
				CASE 5
					// *** The Guild ***
					Say lc0012
				CASE 6
					// *** The Heart of Kinkathra ***
					Say lc0013
				CASE 0
					// *** Leave ***
   					//Say ah031a
					Say lc0014
			ENDSWITCH
		ENDWHILE
		AwardEP xp_DR_CRUX

		Widescreen FALSE

	ELSE
		RunS GenericDR
	ENDIF
END

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

VIG CruxDeadRunAway FALSE

	SetWalkType MANOR_ASS_1 run
	SetWalkType MANOR_ASS_2 run
	SetWalkType MANOR_ASS_3 run
	SetWalkType MANOR_ASS_4 run
	SetWalkType MANOR_ASS_5 run
	SetWalkType MANOR_ASS_6 run
	SetWalkType MANOR_PIG_7 run
	SetWalkType MANOR_PIG_8 run
	SetWalkType MANOR_PIG_9 run
	SetWalkType MANOR_PIG_10 run

	Wander MANOR_ASS_1
	Wander MANOR_ASS_2
	Wander MANOR_ASS_3
	Wander MANOR_ASS_4
	Wander MANOR_ASS_5
	Wander MANOR_ASS_6
	Wander MANOR_PIG_7
	Wander MANOR_PIG_8
	Wander MANOR_PIG_9
	Wander MANOR_PIG_10

	SwitchOnSightOfPlayer MANOR_ASS_1 RunAwayFrom P
	SwitchOnSightOfPlayer MANOR_ASS_2 RunAwayFrom P
	SwitchOnSightOfPlayer MANOR_ASS_3 RunAwayFrom P
	SwitchOnSightOfPlayer MANOR_ASS_4 RunAwayFrom P
	SwitchOnSightOfPlayer MANOR_ASS_5 RunAwayFrom P
	SwitchOnSightOfPlayer MANOR_ASS_6 RunAwayFrom P
	SwitchOnSightOfPlayer MANOR_PIG_7 RunAwayFrom P
	SwitchOnSightOfPlayer MANOR_PIG_8 RunAwayFrom P
	SwitchOnSightOfPlayer MANOR_PIG_9 RunAwayFrom P
	SwitchOnSightOfPlayer MANOR_PIG_10 RunAwayFrom P

END

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