
// Boss spot ----------------------------------------------------------------

ACTOR BossSpot : SpecialSpot 56
{
	Game Heretic
	SpawnID 141
	+INVISIBLE
}

// Sorcerer (D'Sparil on his serpent) ---------------------------------------

ACTOR Sorcerer1 7
{
	Game Heretic
	SpawnID 142
	Health 2000
	Radius 28
	Height 100
	Mass 800
	Speed 16
	PainChance 56
	Monster
	+BOSS
	+DONTMORPH
	+NORADIUSDMG
	+NOTARGET
	+NOICEDEATH
	+FLOORCLIP
	+DONTGIB
	SeeSound "dsparilserpent/sight"
	AttackSound "dsparilserpent/attack"
	PainSound "dsparilserpent/pain"
	DeathSound "dsparilserpent/death"
	ActiveSound "dsparilserpent/active"
	Obituary "$OB_DSPARIL1"
	HitObituary "$OB_DSPARIL1HIT"

	action native A_Sor1Pain ();
	action native A_Sor1Chase ();
	action native A_Srcr1Attack ();
	action native A_SorcererRise ();

	States
	{
	Spawn:
		SRCR AB 10 A_Look
		Loop
	See:
		SRCR ABCD 5 A_Sor1Chase
		Loop
	Pain:
		SRCR Q 6 A_Sor1Pain
		Goto See
	Missile:
		SRCR Q 7 A_FaceTarget
		SRCR R 6 A_FaceTarget
		SRCR S 10 A_Srcr1Attack
		Goto See
	Missile2:
		SRCR S 10 A_FaceTarget
		SRCR Q 7 A_FaceTarget
		SRCR R 6 A_FaceTarget
		SRCR S 10 A_Srcr1Attack
		Goto See
	Death:
		SRCR E 7
		SRCR F 7 A_Scream
		SRCR G 7
		SRCR HIJK 6
		SRCR L 25 A_PlaySoundEx("dsparil/zap", "body")
		SRCR MN 5
		SRCR O 4
		SRCR L 20 A_PlaySoundEx("dsparil/zap", "body")
		SRCR MN 5
		SRCR O 4
		SRCR L 12
		SRCR P -1 A_SorcererRise
	}
}


// Sorcerer FX 1 ------------------------------------------------------------

ACTOR SorcererFX1
{
	Game Heretic
	SpawnID 144
	Radius 10
	Height 10
	Speed 20
	FastSpeed 28
	Damage 10
	DamageType Fire
	Projectile
	-ACTIVATEIMPACT
	-ACTIVATEPCROSS
	RenderStyle Add
	States
	{
	Spawn:
		FX14 ABC 6 BRIGHT
		Loop
	Death:
		FX14 DEFGH 5 BRIGHT
		Stop
	}
}
		

// Sorcerer 2 (D'Sparil without his serpent) --------------------------------

ACTOR Sorcerer2
{
	Game Heretic
	SpawnID 143
	Health 3500
	Radius 16
	Height 70
	Mass 300
	Speed 14
	Painchance 32
	Monster
	+DROPOFF
	+BOSS
	+DONTMORPH
	+FULLVOLACTIVE
	+NORADIUSDMG
	+NOTARGET
	+NOICEDEATH
	+FLOORCLIP
	+BOSSDEATH
	SeeSound "dsparil/sight"
	AttackSound "dsparil/attack"
	PainSound "dsparil/pain"
	ActiveSound "dsparil/active"
	Obituary "$OB_DSPARIL2"
	HitObituary "$OB_DSPARIL2HIT"

	action native A_Srcr2Decide ();
	action native A_Srcr2Attack ();
	action native A_Sor2DthInit ();
	action native A_Sor2DthLoop ();

	States
	{
	Spawn:
		SOR2 MN 10 A_Look
		Loop
	See:
		SOR2 MNOP 4 A_Chase
		Loop
	Rise:
		SOR2 AB 4
		SOR2 C 4 A_PlaySoundEx("dsparil/rise", "Body")
		SOR2 DEF 4
		SOR2 G 12 A_PlaySoundEx("dsparil/sight", "Body")
		Goto See
	Pain:
		SOR2 Q 3
		SOR2 Q 6 A_Pain
		Goto See
	Missile:
		SOR2 R 9 A_Srcr2Decide
		SOR2 S 9 A_FaceTarget
		SOR2 T 20 A_Srcr2Attack
		Goto See
	Teleport:
		SOR2 LKJIHG 6
		Goto See
	Death:
		SDTH A 8 A_Sor2DthInit
		SDTH B 8
		SDTH C 8 A_PlaySoundEx("dsparil/scream", "Body")
	DeathLoop:
		SDTH DE 7
		SDTH F 7 A_Sor2DthLoop
		SDTH G 6 A_PlaySoundEx("dsparil/explode", "Body")
		SDTH H 6
		SDTH I 18
		SDTH J 6 A_NoBlocking
		SDTH K 6 A_PlaySoundEx("dsparil/bones", "Body")
		SDTH LMN 6
		SDTH O -1 A_BossDeath
		Stop
	}
}



// Sorcerer 2 FX 1 ----------------------------------------------------------

ACTOR Sorcerer2FX1
{
	Game Heretic
	SpawnID 145
	Radius 10
	Height 6
	Speed 20
	FastSpeed 28
	Damage 1
	Projectile
	-ACTIVATEIMPACT
	-ACTIVATEPCROSS
	RenderStyle Add

	action native A_BlueSpark ();
	
	States
	{
	Spawn:
		FX16 ABC 3 BRIGHT A_BlueSpark
		Loop
	Death:
		FX16 G 5 BRIGHT A_Explode(random[S2FX1](80,111))
		FX16 HIJKL 5 BRIGHT
		Stop
	}
}

// Sorcerer 2 FX Spark ------------------------------------------------------

ACTOR Sorcerer2FXSpark
{
	Radius 20
	Height 16
	+NOBLOCKMAP
	+NOGRAVITY
	+NOTELEPORT
	+CANNOTPUSH
	RenderStyle Add
	States
	{
	Spawn:
		FX16 DEF 12 BRIGHT
		Stop
	}
}

// Sorcerer 2 FX 2 ----------------------------------------------------------

ACTOR Sorcerer2FX2
{
	Game Heretic
	SpawnID 146
	Radius 10
	Height 6
	Speed 6
	Damage 10
	Projectile
	-ACTIVATEIMPACT
	-ACTIVATEPCROSS
	RenderStyle Add

	action native A_GenWizard ();

	States
	{
	Spawn:
		FX11 A 35 BRIGHT
		FX11 A 5 BRIGHT A_GenWizard
		FX11 B 5 BRIGHT
		Goto Spawn+1
	Death:
		FX11 CDEFG 5 BRIGHT
		Stop

	}
}
// Sorcerer 2 Telefade ------------------------------------------------------

ACTOR Sorcerer2Telefade
{
	+NOBLOCKMAP
	States
	{
	Spawn:
		SOR2 GHIJKL 6
		Stop
	}
}

