/////////////////////////////////////////////////////////////////////
// MIRES2.S		-	Mires Pit, entrance to Galdon Thor
/////////////////////////////////////////////////////////////////////

SETUP

	IF !gt_DONE_MIRES_PIT

		PlaceC LAEN pLAEN
		RemoveC P
		PlaceC P pP
		camcut P

		PlaceC MIRE_EVIL_01 p01
		PlaceC MIRE_EVIL_02 p02
		PlaceC MIRE_EVIL_03 p03
		PlaceC MIRE_EVIL_04 p04
		PlaceC MIRE_EVIL_05 p05
		PlaceC MIRE_EVIL_06 p06
		PlaceC MIRE_EVIL_07 p07
		PlaceC MIRE_EVIL_08 p08
		PlaceC MIRE_EVIL_09 p09
		PlaceC MIRE_EVIL_10 p10

		WanderNotFar MIRE_EVIL_06 2 10
		SwitchOnSightOfPlayer MIRE_EVIL_06 AttackDemo2
		WanderNotFar MIRE_EVIL_07 2 10
		SwitchOnSightOfPlayer MIRE_EVIL_07 AttackDemo2
		WanderNotFar MIRE_EVIL_08 2 10
		SwitchOnSightOfPlayer MIRE_EVIL_08 AttackDemo2
		WanderNotFar MIRE_EVIL_09 2 10
		SwitchOnSightOfPlayer MIRE_EVIL_09 AttackDemo2
		WanderNotFar MIRE_EVIL_10 2 10
		SwitchOnSightOfPlayer MIRE_EVIL_10 AttackDemo2

		Add gt_CUE_ARRIVAL_IN_MIRESPIT
		Add gt_DONE_MIRES_PIT
		Set gt_MIRESPIT_FIGHT_01 0
		Set gt_MIRESPIT_FIGHT_02 0
		Set gt_MIRESPIT_FIGHT_03 0
		Set gt_MIRESPIT_FIGHT_04 0
		Set gt_MIRESPIT_FIGHT_05 0
	ENDIF

END

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

VIG TempSetup FALSE

	Set	gd_WEATHER_TYPE	0
	Set gd_WIND_TYPE	1
    RunS CueWeather

	CachePortrait LAENCHNT.BIN
	CachePortrait PC4.BIN

	DisableTeleport MP_HEXSTONE

END

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

VIG RaalNoise1 FIVESEC && ONMAP-MIRE_EVIL_06 && !ISDEAD-MIRE_EVIL_06 && !INCOMBAT-MIRE_EVIL_06
	SWITCH RAND-4
		CASE 0
			SWITCH RAND-3
				CASE 0
					PlaySFXPerson Raal1.wav MIRE_EVIL_06
				CASE 1
//					PlaySFXPerson Raal2.wav MIRE_EVIL_06
				CASE 2
					PlaySFXPerson Raal9.wav MIRE_EVIL_06
			ENDSWITCH 
	ENDSWITCH
END

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

VIG RaalNoise2 FIVESEC && ONMAP-MIRE_EVIL_07 && !ISDEAD-MIRE_EVIL_07 && !INCOMBAT-MIRE_EVIL_07
	SWITCH RAND-4
		CASE 0
			SWITCH RAND-3
				CASE 0
					PlaySFXPerson Raal1.wav MIRE_EVIL_07
				CASE 1
//					PlaySFXPerson Raal2.wav MIRE_EVIL_07
				CASE 2
					PlaySFXPerson Raal9.wav MIRE_EVIL_07
			ENDSWITCH 
	ENDSWITCH
END

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

VIG RaalNoise3 FIVESEC && ONMAP-MIRE_EVIL_08 && !ISDEAD-MIRE_EVIL_08 && !INCOMBAT-MIRE_EVIL_08
	SWITCH RAND-4
		CASE 0
			SWITCH RAND-3
				CASE 0
					PlaySFXPerson Raal1.wav MIRE_EVIL_08
				CASE 1
//					PlaySFXPerson Raal2.wav MIRE_EVIL_08
				CASE 2
					PlaySFXPerson Raal9.wav MIRE_EVIL_08
			ENDSWITCH 
	ENDSWITCH
END

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

VIG ArrivalInMiresPit gt_CUE_ARRIVAL_IN_MIRESPIT

	Remove gt_CUE_ARRIVAL_IN_MIRESPIT

	Widescreen TRUE
	RunS QPalFadeRPG

	QuickSay da4001
	EngageAndFace LAEN P
	UUSay
	Say HX4001
	Say da4002
	Say Hx4002
	MoveC LAEN pL00
	Say da4003

	Playmusic music04.wav

	Widescreen FALSE

END

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

VIG Fight_01 ONESEC && gt_MIRESPIT_FIGHT_01=0 && INAREA-LAEN-F01
	MeleeAttack MIRE_EVIL_01
	MeleeAttack LAEN
	Set gt_MIRESPIT_FIGHT_01 1
END
/////////////////////////////////////////////////////////////////////
VIG Death_01 ONESEC && gt_MIRESPIT_FIGHT_01=1 && ISDEAD-MIRE_EVIL_01
	DelayControl LAEN 2 3
	AddControl LAEN MoveC pL01
	Set gt_MIRESPIT_FIGHT_01 2
END
/////////////////////////////////////////////////////////////////////
VIG Fight_02 ONESEC && gt_MIRESPIT_FIGHT_02=0 && INAREA-LAEN-F02
	MeleeAttack MIRE_EVIL_02
	MeleeAttack LAEN
	Set gt_MIRESPIT_FIGHT_02 1
END
/////////////////////////////////////////////////////////////////////
VIG Death_02 ONESEC && gt_MIRESPIT_FIGHT_02=1 && ISDEAD-MIRE_EVIL_02
	DelayControl LAEN 2 3
	AddControl LAEN MoveC pL02
	Set gt_MIRESPIT_FIGHT_02 2
END
/////////////////////////////////////////////////////////////////////
VIG Fight_03 ONESEC && gt_MIRESPIT_FIGHT_03=0 && INAREA-LAEN-F03
	MeleeAttack MIRE_EVIL_03
	MeleeAttack LAEN
	Set gt_MIRESPIT_FIGHT_03 1
END
/////////////////////////////////////////////////////////////////////
VIG Death_03 ONESEC && gt_MIRESPIT_FIGHT_03=1 && ISDEAD-MIRE_EVIL_03
	DelayControl LAEN 2 3
	AddControl LAEN MoveC pL03
	Set gt_MIRESPIT_FIGHT_03 2
END
/////////////////////////////////////////////////////////////////////
VIG Fight_04 ONESEC && gt_MIRESPIT_FIGHT_04=0 && INAREA-LAEN-F04
	MeleeAttack MIRE_EVIL_04
	MeleeAttack LAEN
	Set gt_MIRESPIT_FIGHT_04 1
END
/////////////////////////////////////////////////////////////////////
VIG Death_04 ONESEC && gt_MIRESPIT_FIGHT_04=1 && ISDEAD-MIRE_EVIL_04
	DelayControl LAEN 2 3
	AddControl LAEN MoveC pL04
	Set gt_MIRESPIT_FIGHT_04 2
END
/////////////////////////////////////////////////////////////////////
VIG Fight_05 ONESEC && gt_MIRESPIT_FIGHT_05=0 && INAREA-LAEN-F05
	MeleeAttack MIRE_EVIL_05
	MeleeAttack LAEN
	Set gt_MIRESPIT_FIGHT_05 1
END
/////////////////////////////////////////////////////////////////////
VIG Death_05 gt_MIRESPIT_FIGHT_05=1 && ISDEAD-MIRE_EVIL_05
	DelayControl LAEN 2 3
	AddControl LAEN MoveC pL05
	AddControl LAEN LookAtTurnFollow P
	Set gt_MIRESPIT_FIGHT_05 2
END

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

VIG ChatToLaen MSG-iLAEN

	QuickSay da4004

END

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

VIG UndeadNoises1 FIVESEC && ONMAP-MIRE_EVIL_01 && !ISDEAD-MIRE_EVIL_01 && !INCOMBAT-MIRE_EVIL_01
	SWITCH RAND-6
		CASE 0
			SWITCH RAND-6
				CASE 0
					PlaySFXPerson undead1.wav MIRE_EVIL_01
				CASE 1
//					PlaySFXPerson undead2.wav MIRE_EVIL_01
				CASE 2
					PlaySFXPerson undead3.wav MIRE_EVIL_01
				CASE 3
					PlaySFXPerson undead5.wav MIRE_EVIL_01
				CASE 4
					PlaySFXPerson undead6.wav MIRE_EVIL_01
				CASE 5
//					PlaySFXPerson undead7.wav MIRE_EVIL_01
			ENDSWITCH 
	ENDSWITCH
END

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

VIG UndeadNoises2 FIVESEC && ONMAP-MIRE_EVIL_02 && !ISDEAD-MIRE_EVIL_02 && !INCOMBAT-MIRE_EVIL_02
	SWITCH RAND-6
		CASE 0
			SWITCH RAND-6
				CASE 0
					PlaySFXPerson undead1.wav MIRE_EVIL_02
				CASE 1
//					PlaySFXPerson undead2.wav MIRE_EVIL_02
				CASE 2
					PlaySFXPerson undead3.wav MIRE_EVIL_02
				CASE 3
					PlaySFXPerson undead5.wav MIRE_EVIL_02
				CASE 4
					PlaySFXPerson undead6.wav MIRE_EVIL_02
				CASE 5
//					PlaySFXPerson undead7.wav MIRE_EVIL_02
			ENDSWITCH 
	ENDSWITCH
END

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

VIG UndeadNoises3 FIVESEC && ONMAP-MIRE_EVIL_03 && !ISDEAD-MIRE_EVIL_03 && !INCOMBAT-MIRE_EVIL_03
	SWITCH RAND-6
		CASE 0
			SWITCH RAND-6
				CASE 0
					PlaySFXPerson undead1.wav MIRE_EVIL_03
				CASE 1
//					PlaySFXPerson undead2.wav MIRE_EVIL_03
				CASE 2
					PlaySFXPerson undead3.wav MIRE_EVIL_03
				CASE 3
					PlaySFXPerson undead5.wav MIRE_EVIL_03
				CASE 4
					PlaySFXPerson undead6.wav MIRE_EVIL_03
				CASE 5
//					PlaySFXPerson undead7.wav MIRE_EVIL_03
			ENDSWITCH 
	ENDSWITCH
END

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

VIG UndeadNoises4 FIVESEC && ONMAP-MIRE_EVIL_04 && !ISDEAD-MIRE_EVIL_04 && !INCOMBAT-MIRE_EVIL_04
	SWITCH RAND-6
		CASE 0
			SWITCH RAND-6
				CASE 0
					PlaySFXPerson undead1.wav MIRE_EVIL_04
				CASE 1
//					PlaySFXPerson undead2.wav MIRE_EVIL_04
				CASE 2
					PlaySFXPerson undead3.wav MIRE_EVIL_04
				CASE 3
					PlaySFXPerson undead5.wav MIRE_EVIL_04
				CASE 4
					PlaySFXPerson undead6.wav MIRE_EVIL_04
				CASE 5
//					PlaySFXPerson undead7.wav MIRE_EVIL_04
			ENDSWITCH 
	ENDSWITCH
END

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

VIG UndeadNoises5 FIVESEC && ONMAP-MIRE_EVIL_05 && !ISDEAD-MIRE_EVIL_05 && !INCOMBAT-MIRE_EVIL_05
	SWITCH RAND-6
		CASE 0
			SWITCH RAND-6
				CASE 0
					PlaySFXPerson undead1.wav MIRE_EVIL_05
				CASE 1
//					PlaySFXPerson undead2.wav MIRE_EVIL_05
				CASE 2
					PlaySFXPerson undead3.wav MIRE_EVIL_05
				CASE 3
					PlaySFXPerson undead5.wav MIRE_EVIL_05
				CASE 4
					PlaySFXPerson undead6.wav MIRE_EVIL_05
				CASE 5
//					PlaySFXPerson undead7.wav MIRE_EVIL_05
			ENDSWITCH 
	ENDSWITCH
END

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