ACTOR VanillaZombieMan: RifleZombie
{
	Health 40
	Height 44
	Speed 4
	PainChance 200
	Monster
	+FLOORCLIP
	SeeSound "grunt/sight"
	AttackSound "grunt/attack"
	PainSound "grunt/pain"
	DeathSound "grunt/death"
	ActiveSound "grunt/active"
	Obituary "$OB_ZOMBIE"
	DropItem "RifleSpawner"
	DamageFactor "Avoid", 0 DamageFactor "Taunt", 0
	States
	{
	Spawn:
		POSS AAAA 5 A_Look
		TNT1 A 0 A_SpawnItem ("HeadshotTarget20", 0, 44,0)
		TNT1 A 0 A_SpawnItem ("LegTarget10", 0, 0,0)
		Loop
	See:
		TNT1 A 0
		TNT1 A 0 A_SpawnItem ("HeadshotTarget4", 0, 44,0)
		TNT1 A 0 A_SpawnItem ("LegTarget4", 10, 0,0)
		POSS A 2 A_Chase
		POSS A 2 A_Chase("","")
		TNT1 A 0 A_SpawnItem ("HeadshotTarget4", 0, 44,0)
		TNT1 A 0 A_SpawnItem ("LegTarget4", 10, 0,0)
		POSS A 2 A_Chase
		POSS A 2 A_Chase("","")
		TNT1 A 0 A_SpawnItem ("HeadshotTarget4", 0, 44,0)
		TNT1 A 0 A_SpawnItem ("LegTarget4", 10, 0,0)
		
		POSS B 2 A_Chase
		POSS B 2 A_Chase("","")
		TNT1 A 0 A_SpawnItem ("HeadshotTarget4", 0, 44,0)
		TNT1 A 0 A_SpawnItem ("LegTarget4", 10, 0,0)
		POSS B 2 A_Chase
		POSS B 2 A_Chase("","")
		TNT1 A 0 A_SpawnItem ("HeadshotTarget4", 0, 44,0)
		TNT1 A 0 A_SpawnItem ("LegTarget4", 10, 0,0)
		
		POSS C 2 A_Chase
		POSS C 2 A_Chase("","")
		TNT1 A 0 A_SpawnItem ("HeadshotTarget4", 0, 44,0)
		TNT1 A 0 A_SpawnItem ("LegTarget4", 10, 0,0)
		POSS C 2 A_Chase
		POSS C 2 A_Chase("","")
		TNT1 A 0 A_SpawnItem ("HeadshotTarget4", 0, 44,0)
		TNT1 A 0 A_SpawnItem ("LegTarget4", 10, 0,0)
		
		POSS D 2 A_Chase
		POSS D 2 A_Chase("","")
		TNT1 A 0 A_SpawnItem ("HeadshotTarget4", 0, 44,0)
		TNT1 A 0 A_SpawnItem ("LegTarget4", 10, 0,0)
		POSS D 2 A_Chase
		POSS D 2 A_Chase("","")
		TNT1 A 0 A_SpawnItem ("HeadshotTarget4", 0, 44,0)
		TNT1 A 0 A_SpawnItem ("LegTarget4", 10, 0,0)
		Loop
	Missile:
		TNT1 A 0
		TNT1 A 0 A_SpawnItem ("HeadshotTarget10", 0, 44,0)
		TNT1 A 0 A_SpawnItem ("LegTarget10", 0, 0,0)
		POSS E 10 A_FaceTarget
		TNT1 A 0 A_SpawnItem ("HeadshotTarget8", 0, 44,0)
		TNT1 A 0 A_SpawnItem ("LegTarget8", 0, 0,0)
		
		
        TNT1 A 0 A_PlaySound("weapons/rifle")
		TNT1 A 0 A_SpawnItem ("RifleCaseSpawn", 0, 30,0)
		POSS F 8 BRIGHT A_PosAttack
		TNT1 A 0 A_SpawnItem ("HeadshotTarget8", 0, 44,0)
		TNT1 A 0 A_SpawnItem ("LegTarget8", 0, 0,0)
		POSS E 8
		Goto See
	Pain:
		POSS G 3
		TNT1 A 0 A_SpawnItem ("HeadshotTarget4", 0, 44,0)
		TNT1 A 0 A_SpawnItem ("LegTarget4", 0, 0,0)
		POSS G 3 A_Pain
		Goto See
	Pain.Taunt:
		TNT1 A 0
		TNT1 A 0 A_JumpIfInventory("Enraged", 1, "Missile")
		POSS B 0 A_Pain
		TNT1 A 0 A_ChangeFlag("FASTER", 1)
		TNT1 A 0 A_ChangeFlag("MISSILEMORE", 1)
		TNT1 A 0 A_ChangeFlag("MISSILEEVENMORE", 1)
		TNT1 A 0 A_PlaySound("grunt/sight")
		POSS B 1 A_FaceTarget
		POSS B 10
		TNT1 A 0 A_GiveInventory("Enraged", 1)
		TNT1 A 0 A_PlaySound("grunt/sight", 1)
		Goto Missile

	Pain.Avoid:
	    TNT1 A 0
	    TNT1 A 0 A_Jump(255, "AvoidLeft", "AvoidRight")
        Goto AvoidLeft


	Pain.KillMe:
        TNT1 A 0
        Goto Missile
	//Emergency manuever in case the monster gets killed by an "alerter" actor	
    Death.KillMe:
    Death.Taunt:
    Death.Avoid:
	    TNT1 A 0
		TNT1 A 0 A_ChangeFlag("SOLID", 0)
        TNT1 A 0 A_SpawnItem("ZombieMan")
		TNT1 A 0
        Stop



 Pain.Melee:
		TNT1 A 0
		TNT1 A 0 A_JumpIfInventory ("SKZombieman", 1, "GotoStealthKill")
        TNT1 A 0 A_JumpIfInventory ("IsDown", 1, 8)
		TNT1 A 0 A_SpawnItem ("HeadshotTarget4", 0, 44,0)
	    POSS G 3
		TNT1 A 0 A_SpawnItem ("HeadshotTarget4", 0, 44,0)
		POSS G 3 A_Pain
		Goto See
        TNT1 AAAA 0
        TNT1 A 0 A_Pain
        ID11 FRRRQ 10
		TNT1 A 0 A_TakeInventory("SKZombieman", 1)
        TNT1 A 0 A_TakeInventory("IsDown", 1)
        Goto See
		
		GotoStealthKill:
		TNT1 A 1
		TNT1 A 0 A_Explode(100, 1, 1)
		TNT1 A 1
		Goto See
	
	Pain.ExtremePunches:
	Pain.ExplosiveImpact:
	Pain.Explosive:
	     TNT1 A 0
		 TNT1 A 0 A_ChangeFLag("NODROPOFF", 0)
	     TNT1 A 0 A_Pain
		 TNT1 A 0 A_JumpIfInventory ("IsDown", 1, "Pain")
		 TNT1 A 0 A_TakeInventory("SKZombieman", 1)
         TNT1 A 0 A_GiveInventory("IsDown", 1)
         TNT1 A 0 ThrustThingZ(0,40,0,1)
         POS4 UVWXY 5
		 Goto FallingAfterImpact
			
    Pain.Kick:
         TNT1 A 0
		 TNT1 A 0 A_ChangeFLag("NODROPOFF", 0)
		 TNT1 A 0 A_ChangeFlag("NOPAIN", 1)
         POS4 U 0 A_Pain
		 TNT1 A 0 A_ChangeFlag("NOPAIN", 0)
		 TNT1 A 0 A_ChangeFlag("FORCEXYBILLBOARD", 1)
		 TNT1 A 0 A_JumpIfInventory ("IsDown", 1, "Pain")
		 TNT1 A 0 A_TakeInventory("SKZombieman", 1)
         TNT1 A 0 ThrustThingZ(0,30,0,1)
		 POS4 U 1 A_facetarget
         POS4 U 3 ThrustThing(angle*256/360+128, 10, 0, 0)
		 TNT1 A 0 A_GiveInventory("IsDown", 1)
		 
         POS4 UVWXY 3
		 Goto FallingAfterImpact
		
	FallingAfterImpact:
		ID11 F 1 A_GiveInventory ("FallingHeight", 1)
		ID11 F 1 A_CheckFloor ("GetUp")
		NULL A 0 A_JumpIf (momz == 0, "GetUp")
		Loop
		
	GetUp:
		TNT1 A 0
		TNT1 A 0 A_SpawnItem("LargeMassWaterImpact")
		TNT1 A 0 A_JumpIfInventory ("FallingHeight", 5, "FallingDie")
		TNT1 A 0 A_TakeInventory("FallingHeight", 100)
		TNT1 A 0 A_Stop
		TNT1 A 0 A_ChangeFlag("SOLID", 0)
		TNT1 A 0 A_ChangeFlag("GHOST", 1)
		ID11 RRRRRRRRRR 5 A_JumpIf(momz < 0, "FallingAfterImpact")
        TNT1 A 0 A_TakeInventory("IsDown", 1)
		ID11 Q 10
		TNT1 A 0 A_ChangeFlag("FORCEXYBILLBOARD", 0)
		TNT1 A 0 A_ChangeFlag("SOLID", 1)
        Goto See	
	}
}




ACTOR VanillaShotgunguy: Shotgunguy1
{
	Game Doom
	Health 50
	Height 44
	Mass 100
	Speed 4
	PainChance 170
	Monster
	+FLOORCLIP
	SeeSound "shotguy/sight"
	AttackSound "none"
	PainSound "shotguy/pain"
	DeathSound "shotguy/death"
	ActiveSound "shotguy/active"
	Obituary "$OB_SHOTGUY"
	DropItem "Shotgun"
	DamageFactor "Avoid", 0 DamageFactor "Taunt", 0
	States
	{
	Spawn:
		SPOS AAAA 5 A_Look
		TNT1 A 0 A_SpawnItem ("HeadshotTarget20", 5, 44,0)
		TNT1 A 0 A_SpawnItem ("LegTarget10", 0, 0,0)
		Loop
	See:
		SPOS A 2 A_Chase
		SPOS A 2 A_Chase("","")
		TNT1 A 0 A_SpawnItem ("HeadshotTarget4", 5, 44,0)
		TNT1 A 0 A_SpawnItem ("LegTarget4", 10, 0,0)
		SPOS A 2 A_Chase
		SPOS A 2 A_Chase("","")
		TNT1 A 0 A_SpawnItem ("HeadshotTarget4", 5, 44,0)
		TNT1 A 0 A_SpawnItem ("LegTarget4", 10, 0,0)
		
		SPOS B 2 A_Chase
		SPOS B 2 A_Chase("","")
		TNT1 A 0 A_SpawnItem ("HeadshotTarget4", 5, 44,0)
		TNT1 A 0 A_SpawnItem ("LegTarget4", 10, 0,0)
		SPOS B 2 A_Chase
		SPOS B 2 A_Chase("","")
		TNT1 A 0 A_SpawnItem ("HeadshotTarget4", 5, 44,0)
		TNT1 A 0 A_SpawnItem ("LegTarget4", 10, 0,0)
		
		SPOS C 2 A_Chase
		SPOS C 2 A_Chase("","")
		TNT1 A 0 A_SpawnItem ("HeadshotTarget4", 5, 44,0)
		TNT1 A 0 A_SpawnItem ("LegTarget4", 10, 0,0)
		SPOS C 2 A_Chase
		SPOS C 2 A_Chase("","")
		TNT1 A 0 A_SpawnItem ("HeadshotTarget4", 5, 44,0)
		TNT1 A 0 A_SpawnItem ("LegTarget4", 10, 0,0)
		
		SPOS D 2 A_Chase
		SPOS D 2 A_Chase("","")
		TNT1 A 0 A_SpawnItem ("HeadshotTarget4", 5, 44,0)
		TNT1 A 0 A_SpawnItem ("LegTarget4", 10, 0,0)
		SPOS D 2 A_Chase
		SPOS D 2 A_Chase("","")
		TNT1 A 0 A_SpawnItem ("HeadshotTarget4", 5, 44,0)
		TNT1 A 0 A_SpawnItem ("LegTarget4", 10, 0,0)
		Loop
	Missile:
		TNT1 A 0
		TNT1 A 0 A_SpawnItem ("HeadshotTarget10", 5, 44,0)
		TNT1 A 0 A_SpawnItem ("LegTarget10", 10, 0,0)
		SPOS E 10 A_FaceTarget
		TNT1 A 0 A_SpawnItem ("HeadshotTarget10", 5, 44,0)
		TNT1 A 0 A_SpawnItem ("LegTarget10", 10, 0,0)
		TNT1 A 0 A_SposAttack
		
		SPOS F 4 BRIGHT
		SPSR C 5
		TNT1 A 0 A_SpawnItem("HeadshotTarget10", 0, 40,0)
		TNT1 A 0 A_SpawnItem ("LegTargetBase", 10)
		SPOS E 3 A_FaceTarget
		TNT1 A 0 A_SpawnItem("HeadshotTarget10", 0, 40,0)
		TNT1 A 0 A_SpawnItem ("LegTargetBase", 10)
		SPSR A 5
		TNT1 A 0 A_SpawnItem("HeadshotTarget10", 0, 40,0)
		TNT1 A 0 A_SpawnItem ("LegTargetBase", 10)
		SPSR B 5 A_SpawnItem ("ShotCaseSpawn", 0, 30,0)
		TNT1 A 0 A_SpawnItem("HeadshotTarget10", 0, 40,0)
		TNT1 A 0 A_SpawnItem ("LegTargetBase", 10)
		SPSR A 5
		Goto See
	Pain.Avoid: 
	  TNT1 A 0
	  TNT1 A 0 A_Jump(255, "AvoidLeft", "AvoidRight")
	  Goto AvoidLeft
	  
	  AvoidLeft:
	    SPOS A 1 A_FaceTarget
	    TNT1 A 0 ThrustThing(angle*256/360+192, 15, 0, 0)
        ZRO4 ABCDEFGH 2 A_FaceTarget
        Goto Missile
	AvoidRight:
	    SPOS A 1 A_FaceTarget
	    TNT1 A 0 ThrustThing(angle*256/360+64, 15, 0, 0)
        ZRO3 ABCDEFGH 2 A_FaceTarget
        Goto Missile
	
	Pain:
        TNT1 A 0 A_JumpIfInventory ("IsDown", 1, 9)
		TNT1 A 0 A_TakeInventory("SKShotgunGuy", 1)
		TNT1 A 0 A_SpawnItem("HeadshotTarget4", 0, 40,0)
		TNT1 A 0 A_SpawnItem ("LegTargetBase", 10)
		SPOS G 5
		TNT1 A 0 A_SpawnItem("HeadshotTarget4", 0, 40,0)
		TNT1 A 0 A_SpawnItem ("LegTargetBase", 10)
		SPOS G 5 A_Pain
		Goto SeeContinue
        TNT1 AAAAA 0
        TNT1 A 0 A_Pain
        ID11 H 6
        Goto GetUp
		
	Pain.Melee:
	    TNT1 A 0
		TNT1 A 0 A_JumpIfInventory ("SKShotgunGuy", 1, "GotoStealthKill")
        TNT1 A 0 A_JumpIfInventory ("IsDown", 1, 6)
		TNT1 A 0 A_SpawnItem("HeadshotTarget4", 0, 40,0)
		SPOS G 3
		TNT1 A 0 A_SpawnItem("HeadshotTarget4", 0, 40,0)
		SPOS G 3 A_Pain
		Goto SeeContinue
        TNT1 AAAAA 0
        TNT1 A 0 A_Pain
        ID11 H 8
		ID11 S 35
        TNT1 A 0 A_TakeInventory("IsDown", 1)
		ID11 T 10
        Goto SeeContinue


	Pain.ExplosiveImpact:
	Pain.ExtremePunches:
	Pain.Explosive:
	TNT1 A 0 A_ChangeFLag("NODROPOFF", 0)
	         TNT1 A 0
	         TNT1 A 0 A_Pain
		 TNT1 A 0 A_JumpIfInventory ("IsDown", 1, "Pain")
		 		    TNT1 A 0 A_TakeInventory("SKShotgunGuy", 1)
         TNT1 A 0 A_GiveInventory("IsDown", 1)
        TNT1 A 0 ThrustThingZ(0,40,0,1)
         SPO4 UUVWXY 4
		Goto FallingAfterImpact
		

    Pain.Kick:
         TNT1 A 0
		 TNT1 A 0 A_ChangeFLag("NODROPOFF", 0)
		 TNT1 A 0 A_JumpIfInventory ("IsDown", 1, "Pain")
         ID11 G 1 A_Pain
		 TNT1 A 0 A_GiveInventory("IsDown", 1)
		 TNT1 A 0 A_TakeInventory("SKShotgunGuy", 1)
        TNT1 A 0 ThrustThingZ(0,30,0,1)
		TNT1 A 0 A_ChangeFlag("NOPAIN", 1)
		//ID11 E 1 A_Chase ("","")
		SPO4 U 1 A_facetarget
        SPO4 U 3 ThrustThing(angle*256/360+128, 10, 0, 0)
        SPO4 UVWXY 3
		TNT1 A 0 A_ChangeFlag("NOPAIN", 0)
		Goto FallingAfterImpact
		
		FallingAfterImpact:
		ID11 H 1 A_GiveInventory ("FallingHeight", 1)
		ID11 H 1 A_CheckFloor ("GetUp")
		NULL A 0 A_JumpIf (momz == 0, "GetUp")
		Loop
		
	GetUp:
		TNT1 A 0
		TNT1 A 0 A_GiveInventory("IsDown", 1)
		TNT1 A 0 A_SpawnItem("LargeMassWaterImpact")
		TNT1 A 0 A_ChangeFlag("FORCEXYBILLBOARD", 1)
		TNT1 A 0 A_ChangeFlag("NOPAIN", 0)
		TNT1 A 0 A_ChangeFlag("SOLID", 0)
		TNT1 A 0 A_ChangeFLag("GHOST", 1)
		TNT1 A 0 A_JumpIfInventory ("FallingHeight", 4, "FallingDie")
		ID11 SSSSSSSSS 5 A_JumpIf(momz < 0, "FallingAfterImpact")
		TNT1 A 0 A_TakeInventory("FallingHeight", 100)
        
		ID11 T 10
		TNT1 A 0 A_ChangeFlag("FORCEXYBILLBOARD", 0)
		TNT1 A 0 A_TakeInventory("IsDown", 1)
		TNT1 A 0 A_ChangeFlag("SOLID", 1)
       Goto SeeContinue
		
	}
}


ACTOR VanillaChaingunguy: ChaingunGuy1
{
	Game Doom
	Health 80
	Height 44
	Mass 100
	Speed 8
	PainChance 170
	Monster
	+FLOORCLIP
	SeeSound "chainguy/sight"
	PainSound "chainguy/pain"
	DeathSound "chainguy/death"
	ActiveSound "chainguy/active"
	AttackSound "chainguy/attack"
	Obituary "$OB_CHAINGUY"
	DamageFactor "Avoid", 0 DamageFactor "Taunt", 0
	States
	{
	Spawn:
		MPOS AAAA 5 A_Look
		MPOS A 0 A_SpawnItem("HeadshotTarget20", 0, 42,0)
		Loop
	See:
		TNT1 A 0
		TNT1 A 0 A_TakeInventory("IsFiring", 1)
		MPOS AA 3 A_Chase
		MPOS A 0 A_SpawnItem("HeadshotTarget10", 0, 44,0)
		MPOS BB 3 A_Chase
		MPOS A 0 A_SpawnItem("HeadshotTarget10", 0, 44,0)
		MPOS CC 3 A_Chase
		MPOS A 0 A_SpawnItem("HeadshotTarget10", 0, 44,0)
		MPOS DD 3 A_Chase
		MPOS A 0 A_SpawnItem("HeadshotTarget10", 0, 44,0)
		Loop
	Missile:
		TNT1 A 0
		TNT1 A 0 A_GiveInventory("IsFiring", 1)
		MPOS E 10 A_FaceTarget
		MPOS A 0 A_SpawnItem("HeadshotTarget10", 0, 44,0)
		
		MPOS F 2 BRIGHT A_CposAttack
		TNT1 A 0 A_SpawnItem ("RifleCaseSpawn", 0, 30,0)
		TNT1 AA 0 A_CustomMissile("OrangeLensFlareAltFast", 34, 10, 15, 0)
		MPOS E 2 A_FaceTarget
		
		MPOS A 0 A_SpawnItem("HeadshotTarget10", 0, 44,0)
		MPOS F 1 A_CposRefire
		Goto Missile+3
	}
}




ACTOR VanillaImp: Imp
{
	Game Doom
	Health 100
	Height 48
	Mass 100
	Speed 4
	PainChance 200
	Monster
	+FLOORCLIP
	SeeSound "imp/sight"
	PainSound "imp/pain"
	DeathSound "imp/death"
	ActiveSound "imp/active"
	HitObituary "$OB_IMPHIT"
	Obituary "$OB_IMP"
	DamageFactor "Avoid", 0 DamageFactor "Taunt", 0
	States
	{
	Spawn:
		TROO AAAAA 5 A_Look
		TNT1 A 0 A_SpawnItem ("HeadshotTarget20", 0, 48,0)
		Loop
	See:
		TNT1 A 0
		TNT1 A 0 A_SpawnItem ("HeadshotTarget4", 0, 48,0)
		TNT1 A 0 A_SpawnItem ("LegTarget4", 10, 0,0)
		TROO A 2 A_Chase
		TROO A 1 A_Chase("","")
		TNT1 A 0 A_SpawnItem ("HeadshotTarget4", 0, 48,0)
		TNT1 A 0 A_SpawnItem ("LegTarget4", 10, 0,0)
		
		TROO A 2 A_Chase
		TROO A 1 A_Chase("","")
		TNT1 A 0 A_SpawnItem ("HeadshotTarget4", 0, 48,0)
		TNT1 A 0 A_SpawnItem ("LegTarget4", 10, 0,0)
		
		TROO B 2 A_Chase
		TROO B 1 A_Chase("","")
		TNT1 A 0 A_SpawnItem ("HeadshotTarget4", 0, 48,0)
		TNT1 A 0 A_SpawnItem ("LegTarget4", 10, 0,0)
		
		TROO B 2 A_Chase
		TROO B 1 A_Chase("","")
		TNT1 A 0 A_SpawnItem ("HeadshotTarget4", 0, 48,0)
		TNT1 A 0 A_SpawnItem ("LegTarget4", 10, 0,0)
		
		TROO C 2 A_Chase
		TROO C 1 A_Chase("","")
		TNT1 A 0 A_SpawnItem ("HeadshotTarget4", 0, 48,0)
		TNT1 A 0 A_SpawnItem ("LegTarget4", 10, 0,0)
		
		TROO C 2 A_Chase
		TROO C 1 A_Chase("","")
		TNT1 A 0 A_SpawnItem ("HeadshotTarget4", 0, 48,0)
		TNT1 A 0 A_SpawnItem ("LegTarget4", 10, 0,0)
		
		TROO D 2 A_Chase
		TROO D 1 A_Chase("","")
		TNT1 A 0 A_SpawnItem ("HeadshotTarget4", 0, 48,0)
		TNT1 A 0 A_SpawnItem ("LegTarget4", 10, 0,0)
		Loop
	Melee:
	Missile:
		TNT1 A 0
		TNT1 A 0 A_SpawnItem ("HeadshotTarget20", 0, 48,0)
		TNT1 A 0 A_SpawnItem ("LegTarget20", 10, 0,0)
		TROO EF 8 A_FaceTarget
		TROO G 6 A_TroopAttack 
		Goto See
	Pain:
		TROO H 2
		TNT1 A 0 A_SpawnItem ("HeadshotTarget4", 0, 48,0)
		TNT1 A 0 A_SpawnItem ("LegTarget4", 10, 0,0)
		TROO H 2 A_Pain
		Goto See
	Pain.Melee:
		TNT1 D 0
		TROO A 2
		TNT1 A 0 A_JumpIfInventory ("SKImp", 1, "GotoStealthKill")
		TROO A 2 A_Pain
		Goto See

Pain.IsDown:
	    ID11 B 1
	    ID11 B 5 A_Pain
		Goto GetUp
	    

    Pain.KillMe:
    Pain.Taunt:
        TNT1 A 0
        Goto Missile
    Death.KillMe:
    Death.Taunt:
    Death.Avoid:
	    TNT1 A 0 A_ChangeFlag("SOLID", 0)
        TNT1 A 0 A_SpawnItem("Imp")
        Stop

    Pain.head:
	Pain.minorhead:
		TNT1 D 0 A_SpawnItem("HeadshotTarget10", 0, 48,0)
		TNT1 A 0 A_TakeInventory("SKImp", 1)
		TROO H 6
		TROO H 6 A_Pain
		Goto See

Pain.ExplosiveImpact:
	Pain.Explosive:
	Pain.ExtremePunches:
	         TNT1 A 0
	         TNT1 A 0 A_Pain
		 TNT1 A 0 A_JumpIfInventory ("IsDown", 1, "Pain")
		 		    TNT1 A 0 A_TakeInventory("SKImp", 1)
         TNT1 A 0 A_GiveInventory("IsDown", 1)
        TNT1 A 0 ThrustThingZ(0,40,0,1)
         IZD4 KL 8
		Goto FallingAfterImpact
		

    Pain.Kick:
         TNT1 A 0
         IZD4 K 1 A_Pain
		// TNT1 A 0 A_JumpIfInventory ("IsDown", 1, "Pain")
		  //TNT1 A 0 A_TakeInventory("SKZombieman", 1)
         TNT1 A 0 A_GiveInventory("IsDown", 1)
        TNT1 A 0 ThrustThingZ(0,20,0,1)
		//ID11 E 1 A_Chase ("","")
		IZD4 K 1 A_facetarget
        IZD4 K 6 ThrustThing(angle*256/360+128, 5, 0, 0)
         IZD4 L 8
		Goto FallingAfterImpact
		
	FallingAfterImpact:
		IZD4 L 1 A_GiveInventory ("FallingHeight", 1)
		TNT1 A 0 A_JumpIf(waterlevel == 2, "Swim")
		TNT1 A 0 A_JumpIf(waterlevel == 3, "Swim")
		IZD4 L 1 A_CheckFloor ("GetUp")
		TNT1 A 0 A_ChangeFlag("NOPAIN", 0)
		NULL A 0 A_JumpIf (momz == 0, "GetUp")
		Loop
		
	GetUp:
		TNT1 A 0
		TNT1 A 0 A_SpawnItem("LargeMassWaterImpact")
		TNT1 A 0 A_SpawnItem("SmallUnderwaterExplosion")
		TNT1 A 0 A_JumpIf(waterlevel == 2, "Swim")
		TNT1 A 0 A_JumpIf(waterlevel == 3, "Swim")
		TNT1 A 0 A_ChangeFlag("GHOST", 1)
		TNT1 A 0 A_ChangeFlag("NOPAIN", 0)
		TNT1 A 0 A_ChangeFlag("SOLID", 0)
		TNT1 A 0 A_ChangeFlag("FORCEXYBILLBOARD", 1)
		TNT1 A 0 A_GiveInventory("ISDOWN", 1)
		TNT1 A 0 A_JumpIfInventory ("FallingHeight", 6, "FallingDie")
		IZD4 MMMMMMMM 5 A_JumpIf(momz < 0, "FallingAfterImpact")
		TNT1 A 0 A_ChangeFlag("SOLID", 1)
		TNT1 A 0 A_TakeInventory("ISDOWN", 1)
		TNT1 A 0 A_ChangeFlag("FORCEXYBILLBOARD", 0)
		TNT1 A 0 A_TakeInventory("FallingHeight", 100)
         TNT1 A 0 A_TakeInventory("IsDown", 1)
		IZD4 NO 7
         Goto See	
	}
}









ACTOR VanillaDemon: BullDemon
{
	Game Doom
	Health 200
	PainChance 180
	Speed 5
	Height 56
	Mass 400
	Monster
	+FLOORCLIP
	SeeSound "demon/sight"
	AttackSound "demon/melee"
	PainSound "demon/pain"
	DeathSound "demon/death"
	ActiveSound "demon/active"
	Obituary "$OB_DEMONHIT"
	DamageFactor "Avoid", 0 DamageFactor "Taunt", 0
	States
	{
	Spawn:
		SARG AB 10 A_Look
		Loop
	See:
		SARG AAAABBBBCCCCDDDD 1 A_Chase
		Loop
	Melee:
		SARG EF 8 A_FaceTarget
		SARG G 8 A_SargAttack
		Goto See
	Pain:
		SARG H 2
		SARG H 2 A_Pain
		Goto See
	Pain.Shotgun:
         TNT1 A 0 A_Pain
         TNT1 A 0
        //TNT1 A 0 ThrustThingZ(0,30,0,1)
        TNT1 A 0 A_FaceTarget
        TNT1 A 0 A_Recoil (2)
         SARG H 2
		 //DEMP A 4
		 SARG H 2
         Goto See	

    Pain.Kick:
         TNT1 A 0 A_Pain
         TNT1 A 0
        //TNT1 A 0 ThrustThingZ(0,30,0,1)
        TNT1 A 0 A_FaceTarget
        TNT1 A 0 A_Recoil (9)
         SARG H 4
		 //DEMP B 6
		 SARG H 4
         Goto See

	Pain.KillMe:
    Pain.Taunt:
        TNT1 A 0
        Goto See
    Death.KillMe:
    Death.Taunt:
	    TNT1 A 0 A_ChangeFlag("SOLID", 0)
        TNT1 A 0 A_SpawnItem("VanillaDemon")
        Stop	
	}
}




ACTOR VanillaSpectre: VanillaDemon
{
	Renderstyle "Fuzzy"
}

ACTOR VanillaBaronOfHell: BaronofHell2
{
	Game Doom
	Health 1000
	Height 64
	Mass 1000
	Speed 8
	PainChance 50
	Monster
	+FLOORCLIP
	+BOSSDEATH
	SeeSound "baron/sight"
	PainSound "baron/pain"
	DeathSound "baron/death"
	ActiveSound "baron/active"
	Obituary "$OB_BARON"
	HitObituary "$OB_BARONHIT"
	DamageFactor "Avoid", 0 DamageFactor "Taunt", 0
	States
	{
	Spawn:
		BOSS A 10 A_Look 
		Loop
	See:
		BOSS AABBCCDD 3 A_Chase
		Loop
	Melee:
	Missile:
		BOSS EF 8 A_FaceTarget
		BOSS G 8 A_BruisAttack
		Goto See
	
	
	Pain:
TNT1 A 0 A_JumpIfInventory("Curbstomp_Marine", 1, "CurbstompMarine")
		BOSS H  3
		BOSS H  3 A_Pain
		Goto See2
	
	Pain.Explosive:
	TNT1 A 0
	TNT1 A 0 ThrustThingZ(0,40,0,1)
	Goto Pain
	
	Pain.Kick:
		TNT1 A 0 A_FaceTarget
		TNT1 A 0 ThrustThingZ(0,30,0,1)
		TNT1 A 0 A_Recoil(8)
		Goto Pain
		
	Pain.LowKick:
	    TNT1 A 0
		TNT1 A 0 A_ChangeFlag("MISSILEMORE", 1)
		TNT1 A 0 A_ChangeFlag("MISSILEEVENMORE", 1)
        TNT1 A 0 A_JumpIfInventory("Curbstomp_Marine", 1, "CurbstompMarine")
		TNT1 A 0 A_JumpIfInventory("StopKickingMyBallsMotherFucker", 1, "Missile")
		TNT1 A 0 A_GiveInventory("StopKickingMyBallsMotherFucker", 1)
		TNT1 A 0 ThrustThingZ(0,15,0,1)
		TNT1 A 0 A_ChangeFlag("NOPAIN", 1)
		BNRJ ABCD 5
		TNT1 A 0 A_Pain
		BNRJ ABCD 5
		TNT1 A 0 A_Pain
		BNRJ ABCD 5
		TNT1 A 0 A_Pain
		BNRJ ABCD 5
		Goto Missile
		
		
    Pain.KillMe:
    Pain.Taunt:
        TNT1 A 0
        Goto Missile
	}
}


ACTOR VanillaHellKnight : HellKnight2
{
	Game Doom
	Health 500
	-BOSSDEATH
	SeeSound "knight/sight"
	ActiveSound "knight/active"
	PainSound "knight/pain"
	DeathSound "knight/death"
	HitObituary "$OB_KNIGHTHIT"
	Obituary "$OB_KNIGHT"
	DamageFactor "Avoid", 0 DamageFactor "Taunt", 0
	Height 64
	States
	{
	Spawn:
		BOS2 A 10 A_Look 
		Loop
	See:
		BOS2 AABBCCDD 3 A_Chase
		Loop
	Melee:
	Missile:
		BOS2 EF 8 A_FaceTarget
		BOS2 G 8 A_BruisAttack
		Goto See
	
	Pain:
	    TNT1 A 0 A_TakeInventory("StopKickingMyBallsMotherFucker", 1)
		BOS2 H 3
		BOS2 H 3 A_Pain
		Goto See
	
	Pain.Explosive:
	TNT1 A 0
	TNT1 A 0 ThrustThingZ(0,40,0,1)
	Goto Pain
	
	Pain.Kick:
		TNT1 A 0 A_FaceTarget
		TNT1 A 0 ThrustThingZ(0,30,0,1)
		TNT1 A 0 A_Recoil(8)
		Goto Pain
		
	Pain.LowKick:
	    TNT1 A 0
		TNT1 A 0 A_ChangeFlag("MISSILEMORE", 1)
		TNT1 A 0 A_ChangeFlag("MISSILEEVENMORE", 1)
        TNT1 A 0 A_JumpIfInventory("Curbstomp_Marine", 1, "CurbstompMarine")
		TNT1 A 0 A_JumpIfInventory("StopKickingMyBallsMotherFucker", 1, "MissileInRage")
		TNT1 A 0 A_GiveInventory("StopKickingMyBallsMotherFucker", 1)
		TNT1 A 0 ThrustThingZ(0,5,0,1)
		TNT1 A 0 A_ChangeFlag("NOPAIN", 1)
		KNRJ ABCD 5
		TNT1 A 0 A_Pain
		KNRJ ABCD 5
		TNT1 A 0 A_Pain
		KNRJ ABCD 5
		TNT1 A 0 A_Pain
		KNRJ ABCD 5
		TNT1 A 0 A_Pain
		KNRJ ABCD 5
		Goto Missile	
	}
}


ACTOR VanillaCacoDemon: CacoDemon_
{
	Game Doom
	Health 400
	Height 56
	Mass 400
	Speed 8
	PainChance 128
	Monster
	+FLOAT +NOGRAVITY
	SeeSound "caco/sight"
	PainSound "caco/pain"
	DeathSound "caco/death"
	ActiveSound "caco/active"
	Obituary "$OB_CACO"
	HitObituary "$OB_CACOHIT"
	DamageFactor "Avoid", 0 DamageFactor "Taunt", 0
	States
	{
	Spawn:
		HEAD A 10 A_Look
		Loop
	See:
		HEAD A 3 A_Chase
		Loop
	Missile:
		HEAD B 5 A_FaceTarget
		HEAD C 5 A_FaceTarget
		HEAD D 5 BRIGHT A_HeadAttack
		Goto See
	Pain:
	Pain.Kick:
		HEAD E 3
		HEAD E 3 A_Pain
		HEAD F 6
		Goto See
	}
}



ACTOR VanillaRevenant: Revenant1
{
	Game Doom
	Health 300
	Height 56
	Mass 500
	Speed 10
	PainChance 100
	Monster
	MeleeThreshold 196
	+MISSILEMORE 
	+FLOORCLIP
	SeeSound "skeleton/sight"
	PainSound "skeleton/pain"
	DeathSound "skeleton/death"
	ActiveSound "skeleton/active"
	MeleeSound "skeleton/melee"
	HitObituary "$OB_UNDEADHIT"
	Obituary "$OB_UNDEAD"
	States
	{
	Spawn:
		SKEL B 10 A_Look
		Loop
	See:
		SKEL AABBCCDDEEFF 2 A_Chase
		Loop
	Melee:
		SKEL G 1 A_FaceTarget
		SKEL G 6 A_SkelWhoosh
		SKEL H 6 A_FaceTarget
		SKEL I 6 A_SkelFist
		Goto See
	Missile:
		SKEL J 0 BRIGHT A_FaceTarget 
		SKEL J 10 BRIGHT A_FaceTarget
		SKEL K 10 A_SkelMissile
		SKEL K 10 A_FaceTarget
		Goto See
	Pain:
		SKEL L 5
		SKEL L 5 A_Pain
		Goto See
	}
}



ACTOR VanillaFatso: Mancubus
{
	Game Doom
	SpawnID 112
	Health 600
	Height 64
	Mass 1000
	Speed 8
	PainChance 80
	Monster
	+FLOORCLIP
	+BOSSDEATH
	SeeSound "fatso/sight"
	PainSound "fatso/pain"
	DeathSound "fatso/death"
	ActiveSound "fatso/active"
	Obituary "$OB_FATSO"
	States
	{
	Spawn:
		FATT A 15 A_Look
		Loop
	See:
		FATT AABBCCDDEEFF 4 A_Chase
		Loop
	Missile:
		FATT G 20 A_FatRaise
		FATT H 10 BRIGHT A_FatAttack1
		FATT IG 5
		FATT H 10 BRIGHT A_FatAttack2
		FATT IG 5
		FATT H 10 BRIGHT A_FatAttack3
		FATT IG 5
		Goto See
	Pain:
		FATT J 3
		FATT J 3 A_Pain
		Goto See
		
	Pain.Explosive:
	Pain.SSG:
		TNT1 A 0 A_FaceTarget
		TNT1 A 0 A_ChangeFlag("NOPAIN", 1)
		FAT4 A 4 ThrustThingZ(0,30,0,1)
		FAT4 B 4 A_Pain
		FAT4 CDDDD 4
		FAT4 C 4 A_Stop
		FAT4 BA 4
		TNT1 A 0 A_ChangeFlag("NOPAIN", 0)
		Goto See	

	Pain.Kick:
        TNT1 A 0 A_FaceTarget
        TNT1 A 0 A_Recoil(2)
		FATT J 9 A_Pain  
		FATT J 8
		Goto See	
	}
}



ACTOR VanillaArchvile: TehArchvile
{
	Game Doom
	Health 700
	Height 56
	Mass 500
	Speed 15
	PainChance 10
	Monster
	MaxTargetRange 896
	+QUICKTORETALIATE 
	+FLOORCLIP 
	+NOTARGET
	SeeSound "vile/sight"
	PainSound "vile/pain"
	DeathSound "vile/death"
	ActiveSound "vile/active"
	MeleeSound "vile/stop"
	Obituary "$OB_VILE"
	States
	{
	Spawn:
		VILE A 10 A_Look
		Loop
	See:
		VILE AABBCCDDEEFF 2 A_VileChase
		Loop
	Missile:
		VILE G 0 BRIGHT A_VileStart
		VILE G 10 BRIGHT A_FaceTarget 
		VILE H 8 BRIGHT A_VileTarget
		VILE IJKLMN 8 BRIGHT A_FaceTarget 
		VILE O 8 BRIGHT A_VileAttack
		VILE P 20 BRIGHT
		Goto See
	Heal:
		VILE "[\]" 10 BRIGHT
		Goto See
	Pain:
		VILE Q 5   
		VILE Q 5 A_Pain
		Goto See
	Pain.Kick:
        TNT1 A 0 A_FaceTarget
        TNT1 A 0 A_Recoil(8)
		DIAB Q 10 A_Pain  
		DIAB Q 10
		Goto See	
	Pain.KillMe:
    Pain.Taunt:
        TNT1 A 0
        Goto Missile	
	}
}


ACTOR VanillaSpiderMastermind: TheSpiderMastermind
{
	Game Doom
	SpawnID 7
	Health 3000
	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"
	Bloodtype "Brutal_Blood"
	damagefactor "Explosive", 1.0
	States
	{
	Spawn:
		SPID A 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  
		SPID G 4 BRIGHT A_SPosAttackUseAtkSound
		SPID H 4 BRIGHT A_SposAttackUseAtkSound
		SPID H 1 BRIGHT A_SpidRefire
		Goto Missile+1
	Pain:
		SPID I 3
		SPID I 3 A_Pain
		Goto See
	}
}



ACTOR VanillaCyberdemon: TheCyberdemon
{
	Game Doom
	Health 4000
	Height 110
	Mass 1000
	Speed 16
	PainChance 20
	Monster
	MinMissileChance 160
	+BOSS 
	+MISSILEMORE
	+FLOORCLIP
	+NORADIUSDMG
	+DONTMORPH
	+BOSSDEATH
	SeeSound "cyber/sight"
	PainSound "cyber/pain"
	DeathSound "cyber/death"
	ActiveSound "cyber/active"
	Obituary "$OB_CYBORG"
	damagefactor "Explosive", 1.0
	DamageFactor "Avoid", 0 DamageFactor "Taunt", 0
	States
	{
	Spawn:
		CYBR A 10 A_Look
		Loop
	See:
		CYBR A 3 A_Hoof
		CYBR ABBCC 3 A_Chase
		CYBR D 3 A_Metal
		CYBR D 3 A_Chase
		Loop
	Missile:
		CYBR E 6 A_FaceTarget
		CYBR F 12 BRIGHT A_CustomMissile("VanillaCyberRocket",60,-25,0,0)
		CYBR E 12 A_FaceTarget
		CYBR F 12 BRIGHT A_CustomMissile("VanillaCyberRocket",60,-25,0,0)
		CYBR E 12 A_FaceTarget
		CYBR F 12 BRIGHT A_CustomMissile("VanillaCyberRocket",60,-25,0,0)
		Goto See
	Pain:
		CYBR G 10 A_Pain
		Goto See
	}
}