
//===========================================================================
//
// Scientist
//
//===========================================================================
ACTOR Scientist //502//replaces 
{
	//$Category Doosk Monsters
	//$Sprite SCTAA0
	//$Title Scientist
	//$Color 6
	Game Doom
	SpawnID 111
	Health 77//300
	GibHealth 75
	PainChance 0
	+QUICKTORETALIATE

	+NOPAIN
	Speed 7
	Radius 20
	Height 56
	Mass 1000
	Monster
	ReactionTime 105
	+FLOORCLIP

	SeeSound "scientist/sight"
	AttackSound "scientist/fire"
	PainSound "scientist/pain"
	DeathSound "scientist/death"
	ActiveSound "scientist/active"
	Obituary "$SCIENT_DTH"
	Gravity 0.6

	Scale 0.3
	States
	{
	Spawn:
        SCTA A 0 A_StopSoundEx("soundslot5")
		SCTA A 10 A_Look
		Loop
	See:
        SCTA A 0 A_PlaySoundEx("scientist/loop","soundslot5",1)
        SCTA CCDDEFGHHIJJKLLMNOOPQQRRRSSTUU 1 A_Chase
		Loop

	Melee:
        SCTB A 0 A_StopSoundEx("soundslot5")
TNT1 A 0 A_PlaySound("scientist/pre_fire")
		SCTB AABCDDEFFGGHIJJKLLMMN 1 Fast A_FaceTarget
TNT1 A 0 A_PlaySound("scientist/fire")
		SCTB P 0 Fast A_CustomBulletAttack(1, 1, 1, 20,"BulletPuff",102)//Using this, so melee activates at 64px while making effect up to 102 px. Silly, but it works.
		SCTB OOP 1 Fast A_FaceTarget

		Goto See


	Pain:
		SCTC A 0 A_Pain
		SCTC ABCCDDEFGHHIJJKLLMNOOPQQRRRSS 1
		Goto See

	Death:
		TNT1 A 0 A_SpawnItemEx(DestroyableBodyThing,0,0,0,0,0,0,0,SXF_NOCHECKPOSITION|SXF_SETMASTER)
        TNT1 A 0 A_StopSoundEx("soundslot5")
		BPLZ A 0 A_ChangeFlag("noclip",true)
		SD2Z A 0 A_ScreamAndUnblock

//        TNT1 A 1 A_SpawnItemEx("Scientist_Death",0,0,0,0,0,0,0,0)
//		TNT1 A 1

TNT1 A 0 A_ChangeVelocity(0.0, 0.0, 6.0,CVF_RELATIVE)

SCTD ABCDDEFFGGHIJJKLLMNNOPQQRSS 1

		SCTD S -1 A_ChangeFlag("NoBlockmap",0)
		Stop
		
	Crush:
	XDeath:
        TNT1 A 0 A_StopSoundEx("soundslot5")
		TNT1 A 0 A_XScream
		TNT1 A 0 A_NoBlocking

//TNT1 A 0 A_PlaySound("monster/explodegore")
        TNT1 A 1 A_SpawnItemEx("Dusk_GenericMonsterGore",0,0,0,0,0,0,0,32)
//ABCCDDEFGHHIJJKLLMNOOPQQRRRSS
		TNT1 AAAA 35

//		TNT1 A -1 A_BossDeath

		Stop


	}
}




//Done this way because of messed up models death offset
//Currently, fixed. So it's no longer used.
actor Scientist_Death
{
	Game Doom
	+NOBLOCKMAP
	+NOCLIP

Gravity 0.75
	Scale 0.4
	States
	{
	Spawn:
SCTD A 1
TNT1 A 0 A_ChangeVelocity(0.0, 0.0, 7.0,CVF_RELATIVE)

SCTD BCDDEFFGGHIJJKLLMNNOPQQRSS 1

		SCTD S -1 A_ChangeFlag("NoBlockmap",0)
		Stop
	}
}


