//===========================================================================
//
// Spider boss
//
//===========================================================================
ACTOR Mastermind Replaces SpiderMastermind
{
	Game Doom
	SpawnID 7
	Health 3000
	Radius 90
	Height 100
	Mass 1000
	Speed 12
	PainChance 40
	Monster
	MinMissileChance 160
	+BOSS
	+MISSILEMORE
	+FLOORCLIP
	+NORADIUSDMG
	+DONTMORPH
	+BOSSDEATH
	SeeSound "spider/sight"
	AttackSound "spider/attack"
	PainSound "spider/pain"
	DeathSound "spider/death"
	ActiveSound "spider/active"
	Obituary "$OB_SPIDER"
	States
	{
	Spawn:
		SPID AB 10 A_Look
		Loop
	See:
		SPID A 3 A_Metal
		SPID ABB 3 A_Chase
		SPID C 3 A_Metal
		SPID CDD 3 A_Chase
		SPID E 3 A_Metal
		SPID EFF 3 A_Chase
		Loop
	Missile:
		SPID A 20 BRIGHT A_FaceTarget  
		TNT1 A 0 A_PlaySound("ENEMYGUN", 1)
		TNT1 A 0 A_PlaySound("enemysg", 4)
		TNT1 A 0 A_CustomMissile("EnemyBullet", 45, 0, random(-8,8), 1, random(-1,1))
		SPID H 2 BRIGHT
		SPID G 2
		SPID H 0 BRIGHT A_SpidRefire
		Goto Missile+1
	Pain:
		SPID I 3
		SPID I 3 A_Pain
		Goto See
	Death:
		SPID I 1 A_Scream
		SPID I 1 A_NoBlocking
		SPID IIIII 13 A_SpawnItemEx("Explosion", random(-64,64), random(-64,64), random(32,120))
		SPID JK 6
		TNT1 A 0 A_SpawnItemEx("Explosion", random(-64,64), random(-64,64), random(32,120))
		SPID LMN 6
		TNT1 AAAAA 0 A_SpawnItemEx("Explosion", random(-64,64), random(-64,64), random(32,120))
		TNT1 AAAAAAAAAAAAAAAAA 0 A_CustomMissile("FlyingBloodParticleHuge", 50,  0, random(0, 360), 2, random(30, 65))
		TNT1 AAA 0 A_CustomMissile("XDeath1b", 80,  0, random(0, 360), 2, random(10, 45))
		TNT1 AAAA 0 A_CustomMissile("XDeath2", 80,  0, random(0, 360), 2, random(10, 45))
		TNT1 AAA 0 A_CustomMissile("XDeath3", 80,  0, random(0, 360), 2, random(10, 45))
		SPID OPQR 10 
		TNT1 A 0 A_CustomMissile("XDeath1", 10,  0, random(0, 360), 2, random(10, 45))
		SPID S 30
		SPID S -1 A_BossDeath    
		Stop
	Crush:
		TNT1 AAAAAAAAAA 0 A_CustomMissile("FlyingBloodParticleCrushed", 0,  0, random(0, 360), 2, random(0, 90))
		TNT1 AA 0 A_CustomMissile("XDeath2", 50,  0, random(0, 360), 2, random(10, 45))
		TNT1 AA 0 A_CustomMissile("XDeath3", 50,  0, random(0, 360), 2, random(10, 45))
		CRSH F 1
		CRSH F -1
		Stop
	}
}
