ACTOR Labguy: Zombieman
{
	Game Doom
	Health 100
	Radius 16
	Height 44
    Speed 12
	FastSpeed 14
	PainChance 200
	MaxTargetRange 100
	+NOBLOCKMONST
	+DROPOFF
	Obituary "%o has been cut down by a zombie labworker."
	damagefactor "Taunt", 1.0
	DropItem "none"
	AttackSound "none"
	States
	{
    Spawn:
		TNT1 A 0
		SCZA B 1
		Goto Stand
	
	Stand:
		TNT1 A 0 A_CheckSight("Stand2")
		SCZA ABABABABAB 10 A_Look
		SCZA ABABABAB 10 A_Look
		Loop
		
	Stand2:
		SCZA AB 14 A_Look
		Goto Stand
		
	WalkAround:
		TNT1 A 0 A_TakeInventory("SKLabGuy", 1)
        TNT1 A 0 A_SpawnItemEx("FootStep", 0, 0, 10, 0, 0)
		SCZA A 2 A_Look
		SCZA A 2 A_Wander
        TNT1 A 0 A_Recoil(-1)
		SCZA B 2 A_Look
		SCZA B 2 A_Wander
	    TNT1 A 0 A_PlaySound("humans/step",3)
		SCZA D 2 A_Look
		SCZA D 2 A_Wander
	    TNT1 A 0 A_PlaySound("humans/step",4)
		SCZA C 2 A_Look
		SCZA C 2 A_Wander
		SCZA D 2 A_Look
		SCZA D 2 A_Wander
	    TNT1 A 0 A_PlaySound("humans/step",4)
		SCZA B 2 A_Look
		SCZA B 2 A_Wander
	    TNT1 A 0 A_PlaySound("humans/step",4)
        TNT1 A 0 A_Jump(32, "Stand")
		Loop
		
	
	SearchForPlayer:
	Idle:
		TNT1 A 0 A_JumpIfHealthLower(1, "Death")
	    TNT1 A 0 A_ClearTarget
	    TNT1 A 0 A_TakeInventory("EnemyMemory", 30)
		TNT1 A 0 A_GiveInventory("SKLabGuy", 1)
        SCZA A 10 A_Look
        SCZA B 10 A_Look
		TNT1 A 0 A_SetAngle(angle - 40)
		SCZA A 10 A_Look
        SCZA C 10 A_Look
		TNT1 A 0 A_SetAngle(angle + 40)
		SCZA A 10 A_Look
		SCZA D 10 A_Look
		TNT1 A 0 A_SetAngle(angle + 40)
		SCZA A 10 A_Look
		SCZA A 4 A_Look
		TNT1 A 0 A_Wander
		TNT1 A 0 A_Recoil(-1)
		SCZA B 4 A_Look
		TNT1 A 0 A_Wander
		TNT1 A 0 A_Recoil(-1)
		SCZA C 4 A_Look
		TNT1 A 0 A_Wander
		TNT1 A 0 A_Recoil(-1)
		SCZA D 4 A_Look
		TNT1 A 0 A_Wander
		TNT1 A 0 A_Recoil(-1)
		TNT1 A 0 A_Jump(128, "Idle")
		SCZA A 4 A_Look
		TNT1 A 0 A_Wander
		TNT1 A 0 A_Recoil(-1)
		SCZA B 4 A_Look
		TNT1 A 0 A_Wander
		TNT1 A 0 A_Recoil(-1)
		SCZA C 4 A_Look
		TNT1 A 0 A_Wander
		TNT1 A 0 A_Recoil(-1)
		SCZA D 4 A_Look
		TNT1 A 0 A_Wander
		TNT1 A 0 A_Recoil(-1)
		Loop
				
	FallBack:
		TNT1 A 0 A_CheckSight("Advance")
		TNT1 A 0 A_ChangeFLag("NODROPOFF", 1)
		SCZA D 2 A_FaceTarget
		SCZA D 2 A_Recoil(2)
		SCZA C 2 A_FaceTarget
		SCZA C 2 A_Recoil(2)
		SCZA B 2 A_FaceTarget
		SCZA B 2 A_Recoil(2)
		SCZA A 2 A_FaceTarget
		SCZA A 2 A_Recoil(2)
		SCZA D 2 A_FaceTarget
		SCZA D 2 A_Recoil(2)
		SCZA C 2 A_FaceTarget
		SCZA C 2 A_Recoil(2)
		SCZA B 2 A_FaceTarget
		SCZA B 2 A_Recoil(2)
		SCZA A 2 A_FaceTarget
		SCZA A 2 A_Recoil(2)
		GOto SeeContinue
	
	See:
		TNT1 A 0 A_JumpIfHealthLower(1, "Death")
		TNT1 A 0 A_ChangeFLag("NODROPOFF", 0)
		TNT1 A 0 A_TakeInventory("SKLabGuy", 1)
		TNT1 A 0 A_TakeInventory("EnemyMemory", 15)
		TNT1 A 0 A_CheckSight("SeeNeverSeen")
		Goto SeeContinue
	
	SeeContinue:
		TNT1 A 0 A_JumpIfHealthLower(1, "Death")
		//TNT1 A 0 A_JumpIfCloser(200, "FallBack")
	Advance:
		TNT1 A 0 A_ChangeFLag("NODROPOFF", 0)
        TNT1 A 0 A_SpawnItemEx("FootStep", 0, 0, 10, 0, 0)
		TNT1 A 0 A_JumpIfInventory("EnemyMemory", 15, "SearchForPlayer")
		TNT1 A 0 A_GiveInventory("EnemyMemory", 1)
		SCZA AA 2 A_Chase
		TNT1 A 0 A_Recoil(-1)
		TNT1 A 0 A_TakeInventory("SKLabGuy", 1)
		SCZA BB 2 A_Chase
		TNT1 A 0 A_PlaySound("humans/step",3)
		SCZA CC 2 A_Chase
		SCZA DD 2 A_Chase
		TNT1 A 0 A_PlaySound("humans/step",3)
		Loop
		
	SeeNeverSeen:
		//TNT1 A 0 A_JumpIfCloser(200, "FallBack")
		Advance:
		TNT1 A 0 A_ChangeFLag("NODROPOFF", 0)
        TNT1 A 0 A_SpawnItemEx("FootStep", 0, 0, 10, 0, 0)
		SCZA AA 2 A_Chase
		TNT1 A 0 A_Recoil(-1)
		TNT1 A 0 A_TakeInventory("SKLabGuy", 1)
		SCZA BB 2 A_Chase
		TNT1 A 0 A_PlaySound("humans/step",3)
		SCZA CC 2 A_Chase
		SCZA DD 2 A_Chase
		TNT1 A 0 A_PlaySound("humans/step",3)
		Loop
		
	Melee:
	Missile:
		SCZA E 1 A_FaceTarget
		TNT1 A 0 A_Recoil(-5)
		SCZA E 6 A_FaceTarget
		TNT1 A 0 A_PlaySound("skeleton/swing")
		TNT1 A 0 A_CustomMissile("ZombieAxeAttack",10,0,0,0)
		SCZA F 6 A_FaceTarget
		SCZA E 6
        Goto See

    

	Pain:
	Pain.Cut:
        TNT1 A 0 A_JumpIfInventory ("IsDown", 1, 7)
		TNT1 A 0 A_CustomMissile ("Brutal_FlyingXBlood", 35, 0, random (0, 360), 2, random (0, 160))
	    SCZA G 3
		SCZA G 3 A_Pain
		Goto See
        TNT1 AAAA 0
		FSD1 G 4
        TNT1 A 0 A_Pain
        FS11 SSST 10
        TNT1 A 0 A_TakeInventory("IsDown", 1)
        Goto See

	Pain.Melee:
        TNT1 A 0 A_JumpIfInventory ("IsDown", 1, 7)
		TNT1 A 0 A_JumpIfInventory ("SKLabguy", 1, "StealthKill")
		TNT1 A 0 A_CustomMissile ("Brutal_FlyingXBlood", 35, 0, random (0, 360), 2, random (0, 160))
	    SCZA G 3
		SCZA G 3 A_Pain
		Goto See
        TNT1 AAAA 0
		FSD1 G 4
        TNT1 A 0 A_Pain
        FS11 SSST 10
        TNT1 A 0 A_TakeInventory("IsDown", 1)
        Goto See


	Death.Melee:
        TNT1 A 0 A_JumpIfInventory ("IsDown", 1, "Death.Down")
		TNT1 A 0 A_JumpIfInventory ("SKLabguy", 1, "StealthKill")
	Death.Kick:
		TNT1 A 0 ThrustThingZ(0,30,0,1)
		TNT1 A 0 A_Scream
		TNT1 A 0 A_NoBlocking
        TNT1 A 0 A_FaceTarget
        TNT1 A 0 A_Recoil (8)
		FS11 GH 8
		TNT1 A 0 A_Custommissile("BloodyAxe", 32, 0, random (0, 360), 2, random (50, 130))
		TNT1 A 0 A_SpawnItem ("DeadFormerScientist")
		Stop

		 

   Death.Down:
		POSS I 0 A_Scream
		POSS J 0 A_NoBlocking
		FSMS L 1
		TNT1 A 0 A_Custommissile("BloodyAxe", 32, 0, random (0, 360), 2, random (50, 130))
        TNT1 A 0 A_SpawnItem ("DeadFormerScientist")
        Stop


	Death:
        TNT1 A 0 A_JumpIfInventory ("IsDown", 1, "Death.Down")
        TNT1 A 0
		TNT1 AA 0 A_CustomMissile ("Brutal_FlyingXBlood", 7, 0, random (0, 360), 2, random (0, 160))
        TNT1 A 0 A_Jump(96, "Death.Arm", "DeathNoGuts")
		TNT1 A 0 A_Jump(128, "DeathMirror")
		FSMS H 5
		FSMS I 5 A_Scream
		FSMS J 5 A_NoBlocking
		FSMS K 5
		TNT1 A 0 A_Custommissile("BloodyAxe", 32, 0, random (0, 360), 2, random (50, 130))
        TNT1 A 0 A_SpawnItem ("DeadFormerScientist")
		Stop
	
	DeathMirror:
	    FSMS M 5
		FSMS N 5 A_Scream
		FSMS O 5 A_NoBlocking
		FSMS P 5
		TNT1 A 0 A_Custommissile("BloodyAxe", 32, 0, random (0, 360), 2, random (50, 130))
		TNT1 A 0 A_SpawnItem ("DeadLabguyFSMSP")
		Stop
		
	DeathNoGuts:
		TNT1 A 0 A_CustomMissile ("MuchBlood", 30, 0, random (0, 360), 2, random (0, 160))
		TNT1 AA 0 A_CustomMissile ("XDeath1", 30, 0, random (0, 360), 2, random (0, 160))
		TNT1 AAA 0 A_CustomMissile ("Instestin", 28, 0, random (150, 210), 2, random (0, 40))
		SCZA H 5 A_Scream
		TNT1 A 0 A_NoBlocking
		TNT1 A 0 A_Custommissile("BloodyAxe", 32, 0, random (0, 360), 2, random (50, 130))
        TNT1 A 0 A_SpawnItem ("ZombieScientistDyingGuts", 2)
		Stop
		
     Death.Arm:
		TNT1 A 0 A_CustomMissile ("XDeathArm1", 35, 0, random (0, 360), 2, random (0, 160))
        TNT1 A 0 A_CustomMissile ("MuchBlood2", 35, 0, random (0, 360), 2, random (0, 160))
		TNT1 A 0 A_Custommissile("BloodyAxe", 32, 0, random (0, 360), 2, random (50, 130))
		FSD2 A 10 A_Scream
		TNT1 A 0 A_NoBlocking
        TNT1 A 0 A_SpawnItem ("DyingFormerScientistNoArm")
        Stop

    Death.fire:
	Death.Flames:
        TNT1 A 0 A_Scream
        TNT1 A 0 A_NoBlocking
		TNT1 A 0 A_Custommissile("BloodyAxe", 32, 0, random (0, 360), 2, random (50, 130))
        TNT1 A 0 A_SpawnItem("BurningZombie")
		Stop
 

	Death.Plasma: Death.Plasma2:
		PBR1 A 6 A_Scream
		TNT1 A 0 A_Custommissile("BloodyAxe", 32, 0, random (0, 360), 2, random (50, 130))
		TNT1 AAAAAAAAAAAAAAAAAA 0 A_CustomMissile ("Ashes1", 32, 0, random (0, 360), 2, random (0, 180))
		TNT1 AAAAAAAAAAAAAAAAAA 0 A_CustomMissile ("Ashes2", 32, 0, random (0, 360), 2, random (0, 180))
		TNT1 AAAA 0 A_CustomMissile ("BluePlasmaFireNonStatic", 32, 0, random (0, 360), 2, random (0, 180))
		PBR1 B 6 A_NoBlocking
		PBR1 CDEFGH 6 A_CustomMissile ("Blood", 10, 0, random (0, 360), 2, random (0, 160))
		PBR1 HHHHHHHHHHHHHHHHHHHHHH 8 A_CustomMissile ("PlasmaSmoke", 10, 0, random (0, 360), 2, random (0, 160))
		PBR1 H -1
		Stop
	
	XDeath:
  		TNT1 A 0 A_XScream
		TNT1 A 0 A_NoBlocking
        TNT1 A 0 A_CustomMissile ("SargeXDeath", 2, 0, random (0, 360), 2, random (0, 160))
		Stop

	Raise:
		POSS K 5
		POSS JIH 5
		Goto See
	
	}
}

ACTOR ZombieAxeAttack
{
	Radius 10
	Height 18
	Projectile 
	+RANDOMIZE
	DamageType Rip
    Damage 4
	+FORCEXYBILLBOARD
    +THRUGHOST
    +BLOODSPLATTER 
	RenderStyle Add
	Alpha 0.6
	HitObituary "$OB_IMPHIT"
    Obituary "$OB_IMPHIT"
	+DONTHURTSPECIES

	SeeSound "None"
	DeathSound "none"
	Decal "none"
    Speed 20
	States
	{
	Spawn:
		TNT1 A 4 BRIGHT
		Stop
	Death:
        TNT1 A 0 A_PlaySound("AxeHit")
		TNT1 A 0 BRIGHT
		Stop
	}
}





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







Actor DeadFormerScientist : DeadShotgunguy//1
{
	States
    {
    Spawn:
        FSMS L -1
        Stop
    }
}

Actor DyingFormerScientistNoArm: DeadFormerScientist
{
    Radius 12
    Height 32
    Health 50
    damagefactor "Head", 10.0
	States
    {
    Spawn:
	    TNT1 A 0
		TNT1 A 0 A_PlaySound("BURNZOM")
		FSD2 BEBEBEBEBEBE 10
		FSD2 C 6
		TNT1 A 0 A_ChangeFlag("SHOOTABLE", 0)
		TNT1 A 0 A_NoBlocking
		FSD3 D -1
        Stop
	
	Death:
		FSD2 C 6 A_ChangeFlag("SHOOTABLE", 0)
		TNT1 A 0 A_PlaySound("grunt/death")
		TNT1 A 0 A_NoBlocking
		FSD3 D -1
		Stop
		
	XDeath:
	Crush:
	    TNT1 A 0 A_SpawnItem("GibsZ")
  	    TNT1 A 0 A_CustomMissile ("XDeath1", 5, 0, random (0, 360), 2, random (0, 160))
		TNT1 A 0 A_CustomMissile ("XDeath2", 5, 0, random (0, 360), 2, random (0, 160))
		TNT1 AAAA 0 A_CustomMissile ("XDeath2", 32, 0, random (0, 360), 2, random (0, 160))
		TNT1 AAAAA 0 A_CustomMissile ("XDeath4", 32, 0, random (0, 360), 2, random (0, 160))
		TNT1 A 0 A_CustomMissile ("XDeath3", 5, 0, random (0, 360), 2, random (0, 160))
		TNT1 A 0 A_CustomMissile ("XDeath4", 5, 0, random (0, 360), 2, random (0, 160))
		Stop
    }
}


//FS14 G -1
actor DeadLabguyFS14G: DeadFormerScientist
{
    States
    {
    Spawn:
		FS14 G -1
        Stop    }}

actor DeadLabguyFSADE: DeadFormerScientist
{
    States
    {
    Spawn:
		FSAD E -1
        Stop    }}
		
actor DeadLabguySCZAL: DeadFormerScientist
{
    States
    {
    Spawn:
		SCZA L -1
        Stop    }}

actor DeadLabguyFSD1H: DeadFormerScientist
{
    States
    {
    Spawn:
		FSD1 H -1
        Stop    }}


actor DeadLabguySCZ4E: DeadFormerScientist
{
    States
    {
    Spawn:
		SCZ4 E -1
        Stop    }}

actor DeadLabguyFSMSP: DeadFormerScientist
{
    States
    {
    Spawn:
		FSMS P -1
        Stop    }}	


Actor LabGuyHead
{
bouncefactor 0.25
speed 7
seesound ""
	+DOOMBOUNCE
	+MISSILE
    +MOVEWITHSECTOR
    +CLIENTSIDEONLY
    +NOBLOCKMAP
    +NOTELEPORT
	+THRUACTORS

states
	{
	Spawn:
	TNT1 A 0
	FSHD BC 4
	loop
	Death:
      FSDH A 1
	  FSHD A-1
      stop
	}}
	
Actor BloodyAxe
{
bouncefactor 0.1
speed 5
seesound ""
	+DOOMBOUNCE
	+MISSILE
    +MOVEWITHSECTOR
    +CLIENTSIDEONLY
    +NOBLOCKMAP
    +NOTELEPORT
	+THRUACTORS
	-SOLID
states
	{
	Spawn:
	AXE1 A 6
	loop
	Death:
	 AXE1 A 1
	 TNT1 A 0 A_SpawnItem("BrutalAxe")
     stop
	}}
	
Actor BloodyAxe
{
bouncefactor 0.1
speed 5
seesound ""
	+DOOMBOUNCE
	+MISSILE
    +MOVEWITHSECTOR
    +NOBLOCKMAP
    +NOTELEPORT
	+THRUACTORS
	-SOLID
states
	{
	Spawn:
	AXE1 A 6
	loop
	Death:
	 AXE1 A -1
	 //TNT1 A 0 A_SpawnItem("BrutalAxe")
     stop
	}}
	
ACTOR RipLabguy
{
    Radius 1
    Height 1
    Scale 0.8
	Speed 0
	Mass 1
	Decal BloodSuper
	BounceFactor 0.5
	+DOOMBOUNCE
	+MISSILE
    +NOBLOCKMAP
    +NOTELEPORT
    +MOVEWITHSECTOR
    +NOGRAVITY
    +NOCLIP
    +DONTSPLASH
    States
    {
    Spawn:
 TNT1 AAA 0 A_CustomMissile ("Brutal_FlyingXBlood", 40, 0, random (0, 360), 2, random (0, 160))
		 TNT1 A 0 A_CustomMissile ("XDeathHalfLabguy", 32, 0, random (0, 360), 2, random (0, 160))
		 TNT1 AAA 0 A_CustomMissile ("Instestin2", 32, 0, random (0, 360), 2, random (0, 160))
	Death:
	    TNT1 A 0
        Stop
    }
}

ACTOR XDeathHalfLabguy
{
    Radius 8
    Height 8
    Scale 1.0
	Speed 6
	Mass 4
	Decal BrutalBloodSplat
	BounceFactor 0.4
	+DOOMBOUNCE
	+MISSILE
    +MOVEWITHSECTOR
    +CLIENTSIDEONLY
    +NOBLOCKMAP
    +NOTELEPORT
    States
    {
    Spawn:
        TNT1 A 0 A_SpawnItem("brutal_BloodSpot",0,0,0,1)
		SCZ4 F 12
		Loop
    Death:
        TNT1 A 0 A_SpawnItem("brutal_BloodSpot",0,0,0,1)
        SCZ4 F 1 A_SpawnItem("Gib_HalfLabGuy",0,0,0,1)
        TNT1 A 0
        Stop
    }}
actor Gib_HalfLabGuy: BigGibBase
{
    States
    {
    Spawn:
SCZ4 F 1900 A_SpawnItem("Brutal_BloodSpot",0,0,0,1)
       Loop    }}
	
Actor DeadLabguy_Half
{Mass 300 Health 200 States{Spawn:
        FSD1 H -1
        Stop	
        Death:
		TNT1 A 0 A_SpawnItem("GibsZ")
  	    
		 TNT1 AAA 0 A_CustomMissile ("XDeath1", 5, 0, random (0, 360), 2, random (0, 160))
		 TNT1 AA 0 A_CustomMissile ("XDeath1", 5, 0, random (0, 360), 2, random (0, 160))
		 TNT1 A 0 A_CustomMissile ("XDeath3", 5, 0, random (0, 360), 2, random (0, 160))
		 TNT1 AAA 0 A_CustomMissile ("XDeath4", 5, 0, random (0, 360), 2, random (0, 160))
		Stop
        Death.Cut:
        Death.Cutless:
        Goto Death}}

ACTOR ZombieScientistDyingGuts//: DyingZombiemanNoArm
{
	States
	{
	    Death.fire:
	Death.Flames:
        TNT1 A 0 A_PlaySound("BLANKSND")
	TNT1 AA 0 A_SpawnItem ("CrueltyBonus5Health")
        TNT1 A 0 A_Scream
        TNT1 A 0 A_NoBlocking
        TNT1 A 0 A_SpawnItem("BurningZombie")
      Stop
	  
	 
	  

	Spawn:
    FSD5 E 1
	TNT1 A 0 A_PlaySound ("BURNZOM")
	    TNT1 A 0
	    TNT1 A 0 A_SpawnItem ("GrowingBloodPool")

		FSD5 FFFFF 2 A_CustomMissile ("Brutal_LiquidBlood", 20, 0, random(0, 360), 2, random (0, 45))
		
		FSD5 EEEEE 2 A_CustomMissile ("Brutal_LiquidBlood", 20, 0, random(0, 360), 2, random (0, 45))

		FSD5 FFFFF 2 A_CustomMissile ("Brutal_LiquidBlood", 20, 0, random(0, 360), 2, random (0, 45))
		
		FSD5 EEEEE 2 A_CustomMissile ("Brutal_LiquidBlood", 20, 0, random(0, 360), 2, random (0, 45))

		FSD5 FFFFF 2 A_CustomMissile ("Brutal_LiquidBlood", 20, 0, random(0, 360), 2, random (0, 45))
		
		FSD5 EEEEE 2 A_CustomMissile ("Brutal_LiquidBlood", 20, 0, random(0, 360), 2, random (0, 45))

		FSD5 FFFFF 2 A_CustomMissile ("Brutal_LiquidBlood", 20, 0, random(0, 360), 2, random (0, 45))
		
		FSD5 EEEEE 2 A_CustomMissile ("Brutal_LiquidBlood", 20, 0, random(0, 360), 2, random (0, 45))

		FSD5 FFFFF 2 A_CustomMissile ("Brutal_LiquidBlood", 20, 0, random(0, 360), 2, random (0, 45))
		
		FSD5 EEEEE 2 A_CustomMissile ("Brutal_LiquidBlood", 20, 0, random(0, 360), 2, random (0, 45))

		FSD5 FFFFF 2 A_CustomMissile ("Brutal_LiquidBlood", 20, 0, random(0, 360), 2, random (0, 45))
		
		FSD5 EEEEE 2 A_CustomMissile ("Brutal_LiquidBlood", 20, 0, random(0, 360), 2, random (0, 45))

		FSD5 E 10
		TNT1 A 0 A_SpawnItem ("BloodDying", 0, 20)

		FSD5 FFFFF 2 A_CustomMissile ("Brutal_LiquidBlood", 20, 0, random(0, 360), 2, random (0, 45))
		
		FSD5 EEEEE 2 A_CustomMissile ("Brutal_LiquidBlood", 20, 0, random(0, 360), 2, random (0, 45))
		Goto Death

	Death:
        TNT1 A 0 A_PlaySound("BLANKSND")
	    TNT1 A 0 A_PlaySound("grunt/death")
	    FSD5 G 8 A_NoBlocking
		SCZA L -1
		Stop

	Death.Melee:
        TNT1 A 0 A_PlaySound("BLANKSND")
        TNT1 A 0 A_CustomMissile ("MuchBlood2", 35, 0, random (0, 360), 2, random (0, 160))
		TNT1 A 0 A_Scream
		TNT1 A 0 ThrustThingZ(0,30,0,1)
		TNT1 A 0 A_NoBlocking
         FS11 GH 15
         TNT1 A 0 A_SpawnItem ("DeadFormerScientist")
		 Stop
	}
}
