/////////////////////////////////////////////////////////////////////
// MSEWER.S
/////////////////////////////////////////////////////////////////////

SETUP

	IF !gt_PLACED_SEWER_SPIDER
		PlaceC ER_SPIDER_2 pSEWER_SPIDER
		AggressiveSpider ER_SPIDER_2
		Add gt_PLACED_SEWER_SPIDER
	ENDIF

	IF !gg_PLACED_DEAD_CAVE_BRIG
		Add gg_PLACED_DEAD_CAVE_BRIG
		PlaceC DEAD_CAVE_BRIG pDEAD_BRIG
		Add gt_CUE_DEAD_BRIGAND
	ENDIF

	IF mj_BARTS_ASSAULT
		IF gt_P_V_BART
			RemoveC BARTH
		ELSE
			IF !gt_PLACED_BART_IN_SEWERS
				Add gt_PLACED_BART_IN_SEWERS
				PlaceC BARTH pBART_IN_ROOM
				AwardOb BARTH bart_scroll "gthor-tele-scroll"
				Capture BARTH cM_GUARD_STAND1

				IDoorClosed dinn_sewer
				IDoorClosed dmel_sewer
				IDoorClosed dbart1_sewer
				IDoorClosed barts_room
				IDoorClosed dbart2
				IDoorClosed dsewer

			ENDIF
		ENDIF
	ENDIF

END

VIG TempSetup FALSE

	SetWeather 0 0 0 0 0 0 0 0

	IF gt_P_V_BART
		SwapModel BARTH Barthelago5
	ENDIF

	CachePortrait BARTH.BIN
	CachePortrait BARTH5.BIN
	CachePortrait JALASTOR.BIN
	CachePortrait PC4.BIN

END

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

VIG DeadBrigandDies gt_CUE_DEAD_BRIGAND

	SetHP DEAD_CAVE_BRIG 1
	NormalDamageNA DEAD_CAVE_BRIG 5
	Remove gt_CUE_DEAD_BRIGAND

END

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

VIG ConfrontBartInSecretRoom mj_BARTS_ASSAULT && !gt_P_V_BART && INAREA-P-NEAR_BARTS_ROOM

	Widescreen TRUE
camcut pos01

	EngageAndFace P BARTH

	Say bas401 BARTH.BIN
	Say hxs401
	Say bas402 BARTH.BIN
	Say bas403 BARTH.BIN

	// upgrade Bart to Bart-5 model
	FX_BurnPerson BARTH
	Wait 250
	SwapModel BARTH Barthelago5
	//SetIDandPortrait BARTH ba BARTH5.BIN
	ChangeProfileToNotDestiny mcitizen_bart
	Wait 1250

	Say bas404 BARTH5.BIN
	Wait 1000

	FX_GreenFire BARTH
	RemoveC BARTH

	ResetStats JALASTOR
	PlaceC JALASTOR pSEEKER
	FX_GreenFire JALASTOR

	DelayControl JALASTOR 2 0
	AddControl JALASTOR Engage P 450
	AddControl JALASTOR AttackDemo2 
	ChangeProfileToIdentified Tdemon_Jalastor

	Add gt_P_V_BART
camcut p

	QLAdd ql402 qlt402 qlb402

	Widescreen FALSE

END

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

VIG DR_HexSeeker MSG-DR_JALASTOR

	IF !gt_DR_JALASTOR

		Widescreen TRUE

		Add gt_DR_JALASTOR

		Say js0001 JALASTOR.BIN

		IF POS-P-stake
			EngageAndFace P JALASTOR
			AddControl P Capture cM_STAKE_1
			Add f_JALASTOR_DEAD
			wait 1000
			FX_HexStake JALASTOR
			AwardEP xp_JALASTOR_DEAD
			UUComplete P

			DeleteObjectsInBackpackWithID P stake 1
			Wait 1000

		ELSE
			Say js0002 JALASTOR.BIN
		ENDIF

		Widescreen FALSE

	ELSE
		Runs DR_GENERIC_FAIL
	ENDIF

END

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