/////////////////////////////////////////////////////////////////////
//  ASH.S
/////////////////////////////////////////////////////////////////////

SETUP

	IF !mj_DEFEAT_LIGHTSTEALER
		IF !gt_PLACED_ASH
			PlaceC ASH pASH_START
			Add gt_PLACED_ASH
		ENDIF
	ELSE
		IF gt_PLACED_ASH
			KillC ASH
			Remove gt_PLACED_ASH
		ENDIF
	ENDIF

END

VIG TempSetup FALSE

	SetWeather 0 0 0 0 0 0 0 0

	AddBigFire 8718 28603

	CachePortrait ASH.BIN
	CachePortrait PC1.BIN
END

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

VIG TalkToAsh MSG-iASH

	// *** CONVERSATION WITH ASH ***
freecam
camcut pos01
setcammoveconstant 1
campan pos02
	UnDrawSwordRemember

	Widescreen TRUE
	
	Engage P ASH 300
	AddControl P LookAtTurn ASH
	LookAtTurnFollow ASH P

	IF !ce_ASH
		ChangeProfileToIdentified Scitizen_Ash
		Add co_ASH
		Add ce_ASH
		//"Ah, a stranger in search of a hole in which to lie...I'm Ash, by the way."
		Say as0001
	ELSE
		//"Back again eh? So weary of life so soon? What can I do for you?"
		Say as9001
	ENDIF

	UUComplete P

	ResetChoice
	WHILE !MenuExit
		ClearChoices

		IF co_THEGUILD
			//The Guild
			AddChoice 1 tx0097
		ENDIF

		IF POS-P-contract
			//Show Contract
			AddChoice 2 tx9362
		ENDIF

		AddChoice 0 tx0003

		GetChoice ASH

		SWITCH Choice
			CASE 1
				//The Guild

				Capture ASH cM_LOOK_AROUND_SCARED1

				//"Nothing! I don't know anything about any guild...nothing about Lord Crux neither!"
				Say as0014

				Add co_LORDCRUX

			CASE 2
				//Show Contract

				QLRemove ql024
				Add f_ASH_WARNED
				AwardEP xp_ASH_CONTRACT

				Capture ASH cM_TALK_SURPRISE1
				//"What's this? You are here to kill me?"
				Say as0005

				Capture P cM_TALK_DISAGREE1

				IF !mj_DEFEAT_LIGHTSTEALER && !f_CRUX_DEAD
					//"I am not, but it seems that someone else will be soon."
					Say Hx0283

					//"It all started two nights ago...out of the window...robed figures...Bloodkin prisoners..."
					Say as0006

					//"...I left the house...found a door to a crypt...a flight of worn steps."
					Say as0007

					//"...tunnels and burrows...a gallery that overlooked a hideous temple...Lord Crux himself!"
					Say as0008

					

					Capture P cM_GUARD_STAND1
					//"They must have seen you..."
					Say Hx0286

					Capture ASH cM_SHRUG1
					//"...what am I to do? Here...it's the key to the Crypt...I have a sister - I can stay with her...Oh my!"
					QuickSay as0009

					Wait 3000
					Capture ASH cM_TOSS_GENTLE
					Capture P cM_OBJ_ACCEPT_1H2
					UUComplete ASH
					AwardOb P ashs_key "Crypt-key"
					QLAdd ql023 qlt023 qlb023

					wait 2000
					ChangeProfileToIdentified Sassassin_Man
					ChangeProfileToIdentified Sassassin_Lady

					// *** ASSASSINS VS ASH ***

					Capture ASH cM_V6_LOOK_AROUND2_BETTER
					AddControl ASH DelayControl 2 0
					AddControl ASH MoveC pASH_EXIT run

					//breaking glass SFX
					PlaySFXPosid IG_135.WAV pASS_F_START

					IDoorOpen dash_1

					//start assassins moving in
					PlaceC FOS_ASSN_F pASS_F_START
					PlaceC FOS_ASSN_M pASS_M_START
					MoveC FOS_ASSN_M pASS_M_ATTACK
					MoveC FOS_ASSN_F pASS_F_ATTACK
					AddControl FOS_ASSN_F AttackDemo2
					UUSay

					//shadows appear and menace Ash
					Wait 800
					PlaceC ASH_SHAD_1 pSHAD1_START
					FX_GreenFire ASH_SHAD_1
					Wait 200
					PlaceC ASH_SHAD_2 pSHAD2_START
					FX_GreenFire ASH_SHAD_2
					Wait 400
					Engage ASH_SHAD_1 ASH 500
					Wait 200
					Engage ASH_SHAD_2 ASH 500

					//Ash runs for the back door
					Add gt_ASH_RUNNING

					//attack the player
					Wait 500
					AttackDemo2 FOS_ASSN_M
					AttackDemo2 ASH_SHAD_1
					AttackDemo2 ASH_SHAD_2

					// *** END OF ASSASSINS VS ASH ***
				ELSE
					//Ash runs for the back door
					MoveC ASH pASH_EXIT run
					AddControl P LookAtTurnFollow ASH
					UUComplete ASH

					LookAtTurn P pASH_EXIT
					RunS Ash_Scarpers
				ENDIF

				SetChoiceToExit

			CASE 0
				//Leave

				//"Take care now won't you?"
				Say as9002
		ENDSWITCH
	ENDWHILE
setcammovenormal
NormalCam
camcut p
	Widescreen FALSE

	// *** END OF CONVERSATION WITH ASH ***
	DrawSwordRemember
END

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

VIG Ash_Scarpers gt_ASH_RUNNING && CC-ASH

	IDoorOpen dash_2

	KillC ASH

	Remove gt_ASH_RUNNING

END

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