//===========================================================================
//
// Imp
//
//===========================================================================
//ACTOR Imp: SwitchableDecoration Replaces DoomImp
ACTOR Imp Replaces DoomImp
{
	Game Doom
    Scale 1.04
	SpawnID 5
	Health 80
	Radius 16
	Height 58
	Mass 100
    GibHealth 35
	damagefactor "Shotgun", 1.5
	DamageFactor "Head", 1.3
	PainChance 255 damagefactor "HangingHook", 0 PainChance "Stealth", 255
	PainChance "Head", 255    PainChance "Taunt", 255    PainChance "Kick", 255	PainChance "Melee", 255
	PainChance "Fatality", 255	PainChance "HelperMarineFatality", 255 Painchance "Slide", 256
	damagefactor "TeleportRemover", 0.0	damagefactor "GibRemoving", 0.0
	PainChance "ExplosiveImpact", 255 damagefactor "FallInLava", 500.0
	damagefactor "Avoid", 0.0 DamageFactor "Fatality", 5.0 	DamageFactor "PussyGrab", 50.0	damagefactor "Trample", 1.5
	damagefactor "KillMeBot", 0.0	damagefactor "SSG", 50.0	damagefactor "Crush", 10.0
	DamageFactor "CauseSplash", 0.0 DamageFactor "CauseObjectsToSplashSlime", 0.0 DamageFactor "CauseObjectsToSplashNukage", 0.0
	DamageFactor "CauseObjectsToSplashBlood", 0.0 DamageFactor "CauseObjectsToSplashLava", 0.0
	DamageFactor "ExtremePunches", 2.0
	PainChance "LowKick", 255
	Species "Imps"
	DeathHeight 4
	BurnHeight 0
	damagefactor "Blood", 0.0 damagefactor "BlueBlood", 0.0 damagefactor "GreenBlood", 0.0
    BloodType "Brutal_Blood", "SawBlood", "SawBlood"
	SeeSound "imp/sight"
	PainSound "imp/pain"
	DeathSound "imp/death"
	ActiveSound "imp/active"
    damagefactor "SSG", 5.0
	damagefactor "explosiveimpact", 1.5
	MaxStepHeight 24
	MaxDropOffHeight 32
	Monster
	+FLOORCLIP
	+MISSILEMORE
	+SLIDESONWALLS
	+RANDOMIZE
	+MTHRUSPECIES
	PainChance "Trample", 255
    Speed 6
	FastSpeed 12
	Tag "Imp"
	States
	{
	Raise:
		TROO ML 8
		TROO KJI 6
		Goto See
	
	ReplaceVanilla:
		TNT1 A 0 A_ChangeFlag("THRUACTORS", 1)
		TNT1 A 0 A_ChangeFlag("COUNTKILL", 0)
		TNT1 A 0 A_SpawnItemEx ("VanillaImp",0,0,0,0,0,0,0,SXF_NOCHECKPOSITION | SXF_TRANSFERAMBUSHFLAG ,0)
		Stop
    Spawn:
		TROS A 1
		TNT1 A 0 ACS_NamedExecuteAlways("BDCHeckClassicMonsters", 0, 0, 0, 0)//Check if Vanilla Mode is activated
		TNT1 A 0 //ACS_NamedExecuteAlways("CeilingClimbingImps", 0)//Check for CVARs
		TNT1 A 0 A_GiveInventory("SKImp", 1)
		TNT1 A 0 A_JumpIf(waterlevel == 2, "Swim")
		TNT1 A 0 A_JumpIf(waterlevel == 3, "Swim")
        TNT1 A 0 A_JumpIfInventory("Fatality_Marine", 1, "FatalityMarine")
		Goto Stand
		
	Stand:	
        TROO A 0
		TNT1 A 0 A_SpawnItem("HeadshotTarget10", 18, 48, 0)
		TNT1 A 0 A_CheckSight("Stand2")
		//TNT1 A 0 A_SpawnItem ("LegTarget100", 10)
		TROS AB 6 A_Look
		Loop
	Stand2:
		TROS AB 10 A_Look
		TNT1 A 0 A_CheckSight("Stand2")
		Goto Stand
		
	Idle:
	LookingForPlayer:
	    TNT1 A 0 A_GiveInventory("SKImp", 1)
	    TNT1 A 0 A_SpawnItem ("HeadshotTarget10", 18, 48,0)
		TROS A 10 A_Look
        TNT1 A 0 A_SpawnItem ("HeadshotTarget10", 18, 48,0)
		TROS B 10 A_Look
		TNT1 A 0 A_SpawnItem ("HeadshotTarget10", 18, 48,0)
		TROS A 10 A_Look
		TNT1 A 0 A_SetAngle(angle - 40)
		TNT1 A 0 A_SpawnItem ("HeadshotTarget10", 18, 48,0)
		TROS A 10 A_Look
        TNT1 A 0 A_SpawnItem ("HeadshotTarget10", 18, 48,0)
		TROS B 10 A_Look
		TNT1 A 0 A_SpawnItem ("HeadshotTarget10", 18, 48,0)
		TROS A 10 A_Look
		TNT1 A 0 A_SetAngle(angle + 40)
        TNT1 A 0 A_SpawnItem ("HeadshotTarget10", 18, 48,0)
		TROS B 10 A_Look
		TNT1 A 0 A_SpawnItem ("HeadshotTarget10", 18, 48,0)
		TROS A 10 A_Look
        TNT1 A 0 A_SpawnItem ("HeadshotTarget10", 18, 48,0)
		TROS B 10 A_Look
		
	LookingForPlayer2:	
		TROO DD 0 A_Wander
		TROO A 2 A_Look
		TROO DD 0 A_Wander
		TROO A 2 A_Look
		TNT1 A 0 A_SpawnItem("HeadshotTarget6", 18, 48, 0)
		
		TROO DD 0 A_Wander
		TROO B 3 A_Look
		TROO DD 0 A_Wander
		TROO B 3 A_Look
		TNT1 A 0 A_SpawnItem("HeadshotTarget6", 18, 48, 0)
		
		TROO CC 0 A_Wander
		TROO C 3 A_Look
		TROO CC 0 A_Wander
		TROO C 3 A_Look
		TNT1 A 0 A_SpawnItem("HeadshotTarget6", 18, 48, 0)
		
		TROO DD 0 A_Wander
		TROO D 3 A_Look
		TROO DD 0 A_Wander
		TROO D 3 A_Look
		TNT1 A 0 A_SpawnItem("HeadshotTarget6", 18, 48, 0)
		
		
		TNT1 A 0 A_jump(196, "LookingForPlayer2")
		
		Goto LookingForPlayer
		
		
		
	ForgetTarget:
	TNT1 A 0 A_ClearTarget
	TNT1 A 0 A_TakeInventory("EnemyMemory", 25)
	TNT1 A 0 A_GiveInventory("LookingForPlayer", 1)
	Goto LookingForPlayer
	
	See:
	TROS A 1
	TNT1 A 0 A_TakeInventory("EnemyMemory", 15)
	TNT1 A 0 A_Jump(128, "SeeContinue")
	TNT1 A 0 A_SpawnItem("HeadshotTarget4", 12, 42,0)
	TROT A 2 A_faceTarget
	TROT B 2
	TROT C 2
	Goto SeeContinue
	
	
	
	SeeContinue:
		TNT1 A 0
        TNT1 A 0 A_JumpIfInventory("Fatality_Marine", 1, "FatalityMarine")
		//TNT1 A 0 A_JumpIf(MomZ < 0, "FallingAfterImpact")// funny thing I tried, better not implement
		TNT1 A 0 A_JumpIf(waterlevel == 2, "Swim")
		TNT1 A 0 A_JumpIf(waterlevel == 3, "Swim")
		
	Advancing:	
		TNT1 A 0 A_TAkeInventory("CantFire", 1)
        //TNT1 A 0 A_SpawnItemEx("FootStep", 0, 0, 10, 0, 0)
		
		TNT1 A 0 A_JumpIfInventory("EnemyMemory", 20, "ForgetTarget")
		TNT1 A 0 A_GiveInventory("EnemyMemory", 1)
		
		TNT1 A 0 A_TakeInventory("SKImp", 1)
		
		TNT1 A 0 A_SpawnItemEx("HeadshotTarget6", 18, 0, 48)
		TNT1 A 0 A_SpawnItemEx ("LegTargetBase", 16, 0, 0)
		TROO AAA 2 A_Chase
        
		
		TNT1 A 0 A_SpawnItemEx("HeadshotTarget6", 18, 0, 48)
		TNT1 A 0 A_SpawnItemEx ("LegTargetBase", 16, 0, 0)
		TROO BBB 2 A_Chase

		TNT1 A 0 A_SpawnItemEx("HeadshotTarget6", 18, 0, 48)
		TNT1 A 0 A_SpawnItemEx ("LegTargetBase", 16, 0, 0)
		TROO CCC 2 A_Chase

		TNT1 A 0 A_SpawnItemEx("HeadshotTarget6", 18, 0, 48)
		TNT1 A 0 A_SpawnItemEx ("LegTargetBase", 16, 0, 0)
		TROO DDD 2 A_Chase
		Loop
	
	LeapAttack:
		TROO E 1 A_FaceTarget
		TNT1 A 0 A_SpawnItem ("LegTarget12", 10)
		TNT1 A 0 A_TakeInventory("EnemyMemory", 100)
        TNT1 A 0 A_JumpIfInTargetInventory("IsInATank", 1, "LeapBack")
		TNT1 A 0 A_JumpIfCloser(80, "Melee")
		TNT1 A 0 A_SpawnItem("HeadshotTarget6", 12, 42,0)
		TROT CD 3 
		TNT1 A 0 A_TakeInventory("SKImp", 1)
        TNT1 A 0 ThrustThingZ(0,25,0,1)
        TNT1 A 0 A_FaceTarget
		
        TNT1 A 0 A_Recoil (-10)
		TROT E 2
		TROT F 2
        TNT1 A 0 A_GiveInventory ("IsJumping")
        TNT1 A 0 A_FaceTarget
        TROT F 6 
		TNT1 A 0 A_CustomMissile("ImpAttack2",10,0,0, 2)
        TNT1 A 0 A_TakeInventory ("IsJumping")
        TNT1 A 0 A_JumpIfInventory("Fatality_Marine", 1, "FatalityMarine")
		TROT G 1
		TROT GG 2 A_CustomMissile("ImpAttack2",10,0,0,2)
		TROT G 1 A_CustomMissile("ImpAttack2",50,0,0,2)
		TNT1 A 0 A_JumpIfInventory("Fatality_Marine", 1, "FatalityMarine")
		TROT HH 2 A_JumpIfInventory("Fatality_Marine", 1, "FatalityMarine")
		TNT1 A 0 A_JumpIfCloser(80, "Melee")
		Goto SeeContinue
	
	Melee:
	    TNT1 D 0 A_SpawnItem("HeadshotTarget4", 18, 48, 0)
        TROO E 4 A_FaceTarget
		TNT1 A 0 A_Recoil(-5)
		TNT1 D 0 A_SpawnItem("HeadshotTarget4", 18, 48, 0)
		TROO F 4 A_FaceTarget
		TNT1 A 0 A_TakeInventory("SKImp", 1)
		TNT1 D 0 A_SpawnItem("HeadshotTarget4", 18, 48, 0)
        TROO G 4 A_CustomMissile("ImpAttack",10,0,0,0)
		TNT1 D 0 A_SpawnItem("HeadshotTarget4", 18, 48, 0)
        TROO FE 4
		Goto SeeContinue

	Missile:
		TNT1 A 0
		TNT1 A 0 A_JumpIfHealthLower(1, "Death")
		TNT1 A 0 A_JumpIfInTargetInventory("IsInATank", 1, "LeapBack")
        TNT1 A 0 A_JumpIfCloser(150, "LeapAttack")
		TNT1 A 0 A_TakeInventory("EnemyMemory", 100)
		TNT1 A 0 A_TakeInventory("SKImp", 1)
		
		//TNT1 A 0 A_CustomMissile("MonsterTargetCheck", 34, 0, 0, 0) 
		//TNT1 A 0 A_CustomMissile("MonsterTargetCheckFaster", 34, 0, 0, 0) 
		TROO E 3 A_FaceTarget
		//TNT1 A 0 A_JumpIfInventory("CantFire",1, "Advancing")
		
		FireballAttack:
		TNT1 D 0 A_SpawnItemEx("HeadshotTarget10", 12, 7, 48)
		TNT1 A 0 A_SpawnItem ("LegTarget30", 10)
		TROO E 2 A_FaceTarget
        TNT1 A 0 A_JumpIfCloser(170, "LeapAttack")
		TNT1 A 0 A_Playsound ("IMPCHARG")
        TNT1 A 0 A_CustomMissile ("SmallFlameTrails", 35, 30, random (0, 40), 2, random (0, 160))
        TNT1 A 0 A_CustomMissile ("ImBallGettingReady", 35, 30, random (0, 140), 2, random (0, 160))
		TROO E 2 A_FaceTarget
		
		        TNT1 A 0 A_CustomMissile ("SmallFlameTrails", 35, 30, random (0, 40), 2, random (0, 160))
        TNT1 A 0 A_CustomMissile ("ImBallGettingReady", 35, 30, random (0, 140), 2, random (0, 160))
		TROO E 2 A_FaceTarget
		TNT1 A 0 A_SpawnItem ("LegTargetBase", 10)
		        TNT1 A 0 A_CustomMissile ("SmallFlameTrails", 35, 30, random (0, 40), 2, random (0, 160))
        TNT1 A 0 A_CustomMissile ("ImBallGettingReady", 35, 30, random (0, 140), 2, random (0, 160))
		TROO E 2 A_FaceTarget
		TNT1 A 0 A_SpawnItem ("LegTargetBase", 10)
	    TNT1 A 0 A_CustomMissile ("SmallFlameTrails", 35, 30, random (0, 40), 2, random (0, 160))
        TNT1 A 0 A_CustomMissile ("ImBallGettingReady", 35, 30, random (0, 140), 2, random (0, 160))
		TROO E 2 A_FaceTarget
		TNT1 A 0 A_SpawnItem ("LegTargetBase", 10)
		        TNT1 A 0 A_CustomMissile ("SmallFlameTrails", 35, 30, random (0, 40), 2, random (0, 160))
        TNT1 A 0 A_CustomMissile ("ImBallGettingReady", 35, 30, random (0, 140), 2, random (0, 160))
		TROO E 2 A_FaceTarget
		TNT1 A 0 A_SpawnItem ("LegTargetBase", 10)
		TNT1 A 0 A_CustomMissile ("SmallFlameTrails", 35, 30, random (0, 40), 2, random (0, 160))
        TNT1 A 0 A_CustomMissile ("ImBallGettingReady", 35, 30, random (0, 140), 2, random (0, 160))
		
		//TNT1 A 0 A_Jump(100, "specialattack")
		TROO F 2 A_FaceTarget
		TNT1 D 0 A_SpawnItem("HeadshotTarget10", 18, 48, 0)
		TNT1 A 0 A_SpawnItem ("LegTargetBase", 10)
		TROO G 6 A_CustomMissile("FireBall_", 34, 0, 0, 0) 
		TROO F 4
		TNT1 A 0 A_JumpIfCloser(150, "LeapAttack")
		Goto SeeContinue
		
	LeapBack:
		TROT C 4 
		TNT1 A 0 A_TakeInventory("SKImp", 1)
        TNT1 A 0 ThrustThingZ(0,25,0,1)
        TNT1 A 0 A_FaceTarget
		
        TNT1 A 0 A_Recoil (10)
		TNT1 D 0 A_SpawnItem("HeadshotTarget23", 18, 48, 0)
		TROT C 6
		Goto SpecialAttack+5
	SpecialAttack:
		TROO F 2 A_FaceTarget
		TNT1 D 0 A_SpawnItem("HeadshotTarget10", 18, 48, 0)
		TNT1 A 0 A_SpawnItem ("LegTarget30", 10)
		TROO G 6 A_CustomMissile("FireBall_", 34, 0, 0, 0) 
		TROO F 4
		TNT1 D 0 A_SpawnItem("HeadshotTarget10", 18, 48, 0)
		TNT1 A 0 A_SpawnItem ("LegTargetBase", 10)
		TROO I 2 A_FaceTarget
		TNT1 D 0 A_SpawnItem("HeadshotTarget10", 18, 48, 0)
		TNT1 A 0 A_SpawnItem ("LegTargetBase", 10)
		TROA H 6 A_CustomMissile("FireBall_", 34, 0, 0, 0) 
		TROO I 4
		Goto SeeContinue
		
		
	
	Death.Eat:
	    TNT1 A 0
		TNT1 A 0 A_NoBlocking
	    TNT1 A 0 A_Scream
        TNT1 A 0 A_GiveToTarget("ImpFatality",1)
		TNT1 A 0
        Stop	
		
	Death.HelperMarineFatallity:
	Death.RVFT:
		TNT1 A 0
	    TNT1 A 1 A_Pain
		TNT1 A 0 A_Scream
		TNT1 A 0 A_NoBlocking
        TNT1 A 0 A_GiveToTarget("ImpFatality3", 1)
		TNT1 A 0 A_GiveToTarget("ImpFatality", 1)
        Stop	
	
	Death.PussyGrab:
	    TNT1 A 0
		TNT1 A 0 A_Pain
		TNT1 A 0 A_Chase("","")
		TNT1 A 0 A_Pain
		TNT1 A 0 A_NoBlocking
		TNT1 A 0 A_GiveToTarget("GrabbedAImp", 1)
        Stop	
		
	Death.Fatality:
		TNT1 A 0 A_Pain
		TNT1 A 0 A_FaceTarget
		TNT1 A 0 A_SpawnItemEx("HealthPlusFatalityBonus", 0, 0, 20, random (-1, 1), random (-1, 1), 8)
		TNT1 A 0 A_SpawnItemEx("ArmorShardFatalityBonus", 0, 0, 20, random (-1, 1), random (-1, 1), 8)
        TNT1 A 0 A_NoBlocking
		TNT1 A 0 A_GiveToTarget("GoFatality", 1)
		TNT1 A 0 A_Jump(256, "Death.Fatality1", "Death.Fatality4", "Death.Fatality2", "Death.Fatality3")
		Goto Death.Fatality1
 
        Death.Fatality1:
        TNT1 A 0 A_GiveToTarget("ImpFatality", 1)
        Stop
		Death.Fatality2:
        TNT1 A 0 A_GiveToTarget("ImpFatality2", 1)
		Stop
		Death.Fatality3:
		Death.BHFT:
        TNT1 A 0 A_GiveToTarget("ImpFatality3", 1)
		Stop
		Death.Fatality4:
        TNT1 A 0 A_GiveToTarget("ImpFatality4", 1)
		Stop
		
	GotoStealthKill:
		TROO A 1
		TNT1 A 0 A_GiveToTarget("SKImp")
		TNT1 A 0 A_GiveToTarget("GoSpecial", 1)
		TNT1 A 0 A_GiveToTarget("GoFatality", 1)
		TROO A 1 A_Die("Stealthy")
		Stop
		Death.Stealthy:	
		TNT1 A 0 A_NoBlocking
		Stop
		
	Pain.Melee:
		TNT1 D 0
		TROO A 4
		TNT1 A 0 A_JumpIfInventory ("SKImp", 1, "GotoStealthKill")
		TROO A 4 A_Pain
		Goto SeeContinue
		
	Pain.Stealth:
		TNT1 A 0
		TNT1 A 0 A_Pain
		TNT1 A 0 A_JumpIfInventory ("SKImp", 1, "GotoStealthKill")
        TNT1 A 0 A_JumpIfInventory ("IsDown", 1, "GroundExecution")
		Goto See
		
	GroundExecution:
		TNT1 A 0 A_NoBlocking
		TNT1 A 0 A_GiveToTarget("ExecuteDownedImp", 1)
		TNT1 A 0 A_GiveToTarget("GoSpecial", 1)
		TNT1 A 0 A_Die("Vanish")
		Stop
		
	Death.Vanish:
		TNT1 A 0
		TNT1 A 0 A_NoBlocking
		Stop

	Pain.Cut:
	Pain.Saw:
		TNT1 A 0
		TNT1 A 0 A_Stop
	Pain:
	    TNT1 A 0
		TNT1 A 0 A_JumpIfInventory("IsDown", 1, "Pain.IsDown")
		TNT1 D 0 A_SpawnItem("HeadshotTarget4", 18, 48, 0)
		TNT1 A 0 A_SpawnItem ("LegTargetBase", 10)
		TNT1 A 0 A_TakeInventory("SKImp", 1)
		TROO H 3
		TROO H 3 A_Pain
		Goto SeeContinue
	
	Pain.IsDown:
	    ID11 B 1
	    ID11 B 5 A_Pain
		Goto GetUp
	    

    Pain.KillMe:
    Pain.Taunt:
        TNT1 A 0
		TNT1 A 0 HealThing(1)
        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.Shrapnel:	
		TNT1 A 0 A_TakeInventory("SKImp", 1)
		TNT1 A 0 A_FaceTarget
		TNT1 A 0 A_SpawnItem ("HeadshotTarget4", 0, 40,0)
		TROH Q 3 A_Pain
		TROH R 3 A_FaceTarget
		TNT1 A 0 A_SpawnItem ("HeadshotTarget20", 12, 31,0)
		TROH S 20
		TNT1 A 0 A_SpawnItem ("HeadshotTarget20", 12, 31,0)
		TROH S 20
		Goto SeeContinue

Pain.ExplosiveImpact:
	Pain.Explosive:
	Pain.ExtremePunches:
	         TNT1 A 0
			 TNT1 A 0 A_ChangeFlag("NOBLOCKMONST", 1)
	         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.Slide:
        TNT1 A 0
		TNT1 A 0 A_ChangeFlag("NOBLOCKMONST", 1)
		TNT1 A 0 A_ChangeFLag("NODROPOFF", 0)
		TNT1 A 0 A_ChangeFlag("NOPAIN", 1)
		TNT1 A 0 A_ChangeFlag("GHOST", 1)
		TNT1 A 0 A_ChangeFlag("THRUGHOST", 1)
        IZD4 K 1 A_Pain
		TNT1 A 0 A_GiveInventory("IsDown", 1)
        TNT1 A 0 ThrustThingZ(0,50,0,1)
		IZD4 K 1 A_facetarget
        IZD4 K 3
		IZD4 K 3 A_Recoil(-5)
        IZD4 L 8
		Goto FallingAfterImpact

    Pain.Kick:
	Pain.HeavyImpact:
	Pain.Stomp:
        TNT1 A 0
		TNT1 A 0 A_ChangeFlag("NOBLOCKMONST", 1)
		TNT1 A 0 A_ChangeFLag("NODROPOFF", 0)
		TNT1 A 0 A_ChangeFlag("NOPAIN", 1)
		TNT1 A 0 A_ChangeFlag("GHOST", 1)
		TNT1 A 0 A_ChangeFlag("THRUGHOST", 1)
        IZD4 K 1 A_Pain
		TNT1 A 0 A_TakeInventory("SKImp", 1)
        TNT1 A 0 A_GiveInventory("IsDown", 1)
        TNT1 A 0 ThrustThingZ(0,20,0,1)
		IZD4 K 1 A_facetarget
        IZD4 K 6 ThrustThing(angle*256/360+128, 5, 0, 0)
		TNT1 A 0 A_ChangeFlag("NOPAIN", 0)
		TNT1 A 0 A_ChangeFlag("GHOST", 0)
		TNT1 A 0 A_ChangeFlag("THRUGHOST", 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_JumpIfInventory ("FallingHeight", 7, "FallingDie")
		MARN A 0 A_SpawnItem("bdbodythud")
		IZD4 M 1
		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("GHOST", 0)
		TNT1 A 0 A_ChangeFlag("THRUGHOST", 0)
		TNT1 A 0 A_ChangeFlag("FORCEXYBILLBOARD", 1)
		TNT1 A 0 A_GiveInventory("ISDOWN", 1)
		IZD4 MMMMMMMM 5 A_JumpIf(momz < 0, "FallingAfterImpact")
		TNT1 A 0 A_TakeInventory("ISDOWN", 1)
		TNT1 A 0 A_ChangeFLag("USESPECIAL", 0)
		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 SeeContinue
		 
	
	FallingDie:
		TNT1 A 0
		TNT1 A 0 A_Stop
		TNT1 A 0 A_CustomMissile("BodyCrash1", 10)
		IZD4 M 10
		Goto Getup+17
	
	
	Death.Fall:
		TROO M 1
		TNT1 A 0 A_Scream
		TNT1 A 0 A_NoBLocking
		TNT1 AAAA 0 A_CustomMissile ("XDeath1", 32, 0, random (0, 360), 2, random (50, 130))
		TNT1 A 0 A_SpawnItem ("GrowingBloodPool")
		TROO M -1
		Stop
	
	
	
	Active:
		TNT1 A 0
		
		TNT1 A 0 A_GiveToTarget("ExecuteDownedImp", 1)
		TNT1 A 0 A_GiveToTarget("GoSpecial", 1)
		IZD4 M 0
		IZD4 MMMMMM 2 A_JumpIfInTargetInventory("IsExecutingOnAir", 1, "FinishActive")
		TNT1 A 0 A_JumpIfInTargetInventory("ExecuteBashWall", 1, "FinishActive")
		TNT1 M 1
		TNT1 A 0 A_JumpIfInTargetInventory("ExecuteStompWall", 1, "GetUp")
	  FinishActive:
		TNT1 A 0 A_NoBlocking
		TNT1 A 0 A_ChangeFlag("SHOOTABLE", 0)
		TNT1 A 0 A_ChangeFlag("THRUACTORS", 1)
		TNT1 A 0 A_ChangeFlag("COUNTKILL", 0)
		TNT1 A 0 A_ChangeFlag("USESPECIAL", 0)
		Stop
		

	

	PainHurt:
	
		TNT1 A 0 A_TakeInventory("SKImp", 1)
		TNT1 D 0 A_SpawnItem("HeadshotTarget4", 18, 48, 0)
		TROO H 1
		TROO H 1 A_Pain
		Goto SeeContinue
		
	Death.MonsterShotgunBullet:
	Death.Shotgun:
		TNT1 A 0
		TNT1 A 0 A_FaceTarget
		TNT1 A 0 A_SpawnItem("MuchBlood", 0, 40)
		
		TNT1 A 0 A_CustomMissile ("SuperWallRedBlood", 42, 0, random (170, 190), 2, random (0, 20))
	    TNT1 A 0 A_ChangeFlag("SLIDESONWALLS", 0)
		TNT1 A 0 A_Jump(42, "Death.Shotgunontheface")
		TNT1 A 0 A_JumpIfCloser(100, "Death.bLAST")
		TNT1 A 0 A_JumpIfCloser(320, "Death.Shotgunontheface")
		Goto Death
		
	Death.Shotgunontheface:	
	    TNT1 A 0 A_Stop
		TNT1 A 0 A_NoBlocking
		TNT1 AA 0 A_CustomMissile ("BloodMist", 40, 0, random (0, 360), 2, random (30, 90))
		TNT1 A 0 A_Jump(128, "DeathJump")
		TNT1 A 0 A_ChangeFlag("NOBLOCKMONST", 1)
		TNT1 A 0 A_Jump(32, "Death.ARm")
		TNT1 A 0 A_Jump(64, "DeathNoGuts")
		TNT1 A 0 A_Jump(64, "Death.Blast")
		TNT1 A 0 A_Jump(128, "DeathShotgunontheface2")
		TNT1 A 0 A_Stop
		TNT1 A 0 A_Pain
		TROO H 1 A_FaceTarget
		TNT1 A 0 A_Recoil(13)
		TNT1 A 0 ThrustThingZ(0,20,0,1)
		TNT1 A 0 A_Scream
		TNT1 AA 0 A_CustomMissile ("XDeath1", 35, 0, random (0, 360), 2, random (0, 160))
        TR06 ABCDE 4 A_CustomMissile ("Brutal_LiquidBlood3", 15, 0, random (0, 360), 2, random (0, 40))
		TR06 FGHIJK 4 A_JumpIf((MomY == 0), "DSFStop")
		Goto DSFStop+1
		
	DSFStop:
		TNT1 A 0 A_SpawnItem("Ploft3")
		TNT1 A 0 A_SpawnItem ("GrowingBloodPool")
		TNT1 A 0 A_CustomMissile ("SuperWallRedBlood", 2, 0, random (170, 190), 2, random (0, 0))
		TNT1 A 0 A_SpawnItem("DeadImpTR06K")
		TNT1 A -1
		Stop
	
	DeathShotgunontheface2:	
		TNT1 A 0 A_ChangeFlag("NOBLOCKMONST", 1)
		TNT1 A 0 A_Stop
		TNT1 A 0 A_Pain
		TROO H 1 A_FaceTarget
		TNT1 A 0 A_Scream
		TNT1 A 0 A_Recoil(13)
		TNT1 A 0 ThrustThingZ(0,20,0,1)
		TNT1 AA 0 A_CustomMissile ("BloodMist", 40, 0, random (0, 360), 2, random (30, 90))
		TNT1 AA 0 A_CustomMissile ("XDeath1", 35, 0, random (0, 360), 2, random (0, 160))
        TR06 LMNO 4 A_CustomMissile ("Brutal_LiquidBlood3", 15, 0, random (0, 360), 2, random (0, 40))
		TR06 QRSTU 4 A_JumpIf((MomY == 0), "DSFStop2")
		Goto DSFStop2+1
		
	DSFStop2:
	TNT1 A 0 A_SpawnItem("Ploft3")
	TNT1 A 0 A_SpawnItem ("GrowingBloodPool")
	TNT1 A 0 A_CustomMissile ("SuperWallRedBlood", 2, 0, random (170, 190), 2, random (0, 0))
		TNT1 A 0 A_SpawnItem("DeadImpTR06V")
		TNT1 A -1
		Stop

	Death:
        TNT1 A 0
        TNT1 A 0 A_Jump(32, "Death.Arm")
        TNT1 A 0 A_Jump(24,"DeathNoGuts")
		TNT1 A 0 A_Jump(24,"Death20alt")
	Death.Minor:
		TNT1 A 0
		TNT1 A 0 A_Jump(128, "DeathMirror")
		TR97 A 8 
		TR97 B 8 A_Scream
		TR97 C 6
		TR97 D 6 A_NoBlocking
		TNT1 A 0 A_SpawnItem ("GrowingBloodPool")
        TNT1 A 0 A_SpawnItem("DeadImp")
		TNT1 A -1
		Stop
		
	Death.Down:
	Death.Trample:
	    TNT1 A 0 A_Scream
		TNT1 A 0 A_NoBlocking
		TNT1 A 0 A_Stop
		TNT1 AAA 0 A_CustomMissile ("XDeath1", 2, 0, random (0, 360), 2, random (0, 40))
		ID11 DC 6
		TNT1 A 0 A_SpawnItem("DeadImp")
		TNT1 A -1
		Stop
		
		Death.Fire:
		Death.FallInLava:
        TNT1 A 0
		TNT1 A 0 A_Scream
        TNT1 A 0 A_NoBlocking
		TNT1 A 0 A_SpawnItem("BurningImpRunning", 0, 10)
        Stop
		
		
		Death20alt:
        TNT1 A 0
		TNT1 A 0 A_Scream
		TROD ABCD 6
        TNT1 A 0 A_NoBlocking
		TNT1 A 0 A_SpawnItem ("GrowingBloodPool")
		TNT1 A 0 A_SpawnItemEx ("ImpDyingOfBloodLoss", 0,0,7,0,0,0,0,SXF_NOCHECKPOSITION,0)
        Stop
   


     Death.Arm:
		TNT1 A 0 A_CustomMissile ("XDeathImpArm", 35, 0, random (0, 360), 2, random (0, 160))
		TNT1 A 0 A_Scream
		TNT1 A 0 A_NoBlocking
		TNT1 AA 0 A_CustomMissile ("BloodMist", 40, 0, random (0, 360), 2, random (30, 90))
		TR08 A 4 A_CustomMissile ("XDeath1", 40, 0, random (0, 360), 2, random (0, 160))
		TNT1 A 0 A_SpawnItemEx ("DyingImpNoArm",0,0,0,0,0,0,0,SXF_NOCHECKPOSITION,0)
		Stop

      Death.Leg:
		TNT1 A 0
		TNT1 A 0 A_JumpIfInTargetInventory("HeavyAutomaticWeapon", 1, "Death.LegMassacre")
		TNT1 A 0 A_JumpIfInTargetInventory("RandomHeadExploder", 1, "HeadExploder")
		TNT1 A 0 A_Jump(64, "DeathLeg2")
		TNT1 A 0 A_CustomMissile ("XDeathImpLeg", 35, 0, random (0, 360), 2, random (0, 160))
		TNT1 AA 0 A_CustomMissile ("BloodMist", 10, 0, random (0, 360), 2, random (30, 90))
		TR09 A 4
		TR09 A 3 A_CustomMissile ("XDeath1", 40, 0, random (0, 360), 2, random (0, 160))
		TR09 B 3 A_Scream
		TR09 C 3 A_NoBlocking
        TNT1 A 0 A_SpawnItemEx ("DyingImpNoLeg",0,0,0,0,0,0,0,SXF_NOCHECKPOSITION,0)
		Stop
	
	DeathLeg2:
	TNT1 A 0 A_NoBlocking
	TNT1 A 0 A_Fall
	TNT1 A 0 A_CustomMissile ("XDeathImpLeg", 35, 0, random (0, 360), 2, random (0, 160))
    TNT1 A 0 A_CustomMissile ("BloodMistBig", 10, 0, random (0, 360), 2, random (30, 90))
		TNT1 AA 0 A_CustomMissile ("BloodMist", 10, 0, random (0, 360), 2, random (30, 90))
	TNT1 A 0 A_SpawnItem("ImpSaciLol")
	Stop

	

    DeathJump:
         TNT1 A 0 A_Scream
         TNT1 A 0 A_NoBlocking
		 TNT1 A 0 A_Stop
		 TNT1 A 0 A_ChangeFLag("NODROPOFF", 0)
		TNT1 A 0 A_ChangeFLag("SLIDESONWALLS", 0)
        TNT1 A 0 ThrustThingZ(0,40,0,1)
        TNT1 A 0 A_FaceTarget
        TNT1 A 0 A_Recoil (10)
         ID11 A 4 A_CustomMissile ("Brutal_LiquidBlood3", 15, 0, random (0, 360), 2, random (0, 40))
		 TNT1 A 0 A_JumpIf((MomY == 0), "TakeASit")
		 ID11 A 4 A_CustomMissile ("Brutal_LiquidBlood3", 15, 0, random (0, 360), 2, random (0, 40))
		 TNT1 A 0 A_JumpIf((MomY == 0), "TakeASit")
		 ID11 B 4 A_CustomMissile ("Brutal_LiquidBlood3", 15, 0, random (0, 360), 2, random (0, 40))
		 TNT1 A 0 A_JumpIf((MomY == 0), "TakeASit")
		 ID11 B 4 A_CustomMissile ("Brutal_LiquidBlood3", 15, 0, random (0, 360), 2, random (0, 40))
		 TNT1 A 0 A_JumpIf((MomY == 0), "TakeASit")
		 ID11 C 4 A_CustomMissile ("Brutal_LiquidBlood3", 15, 0, random (0, 360), 2, random (0, 40))
		 TNT1 A 0 A_JumpIf((MomY == 0), "TakeASit")
		 ID11 C 4 A_CustomMissile ("Brutal_LiquidBlood3", 15, 0, random (0, 360), 2, random (0, 40))
		 TNT1 A 0 A_JumpIf((MomY == 0), "TakeASit")
		 ID11 D 4 A_CustomMissile ("Brutal_LiquidBlood3", 15, 0, random (0, 360), 2, random (0, 40))
		 TNT1 A 0 A_JumpIf((MomY == 0), "TakeASit")
		 ID11 D 4 A_CustomMissile ("Brutal_LiquidBlood3", 15, 0, random (0, 360), 2, random (0, 40))
		 TNT1 A 0 A_JumpIf((MomY == 0), "TakeASit")
		 TNT1 A 0 A_SpawnItem ("GrowingBloodPool")
         TNT1 A 0 A_SpawnItem("DeadImp")
		 TNT1 A -1
         Stop
		 
        Stop
	TakeASit:
	    TNT1 AAAA 0 A_CustomMissile ("SuperWallRedBlood", 6, 0, random (170, 190), 2, random (0, 40))
	    ID11 B 5
	    TNT1 A 0 A_SpawnItem("GrowingBloodPool")
		TNT1 A 0 A_SpawnItemEx("DeadImp_Slumped", 10)
		Stop	


    Death.Melee:
			TNT1 A 0 A_JumpIfInventory ("SKImp", 1, "StealthKill")
      Death.Kick:   
		 TNT1 A 0 A_Scream
         TNT1 A 0 A_NoBlocking
        TNT1 A 0 ThrustThingZ(0,30,0,1)
        TNT1 A 0 A_FaceTarget
        TNT1 A 0 A_Recoil (8)
         ID11 ABCD 8
         TNT1 A 0 A_SpawnItem("DeadImp")
		 TNT1 A -1
         Stop

	
	

		
	HeadExploder:
	    TNT1 A 0
		TNT1 A 0 A_Jump(72, "Death.HeadExplode")
		Goto DeathHeadMinor2
		
	Death.head:
	    TNT1 A 0 A_JumpIfInTargetInventory("HasPlasmaWeapon", 1, "Death.Plasma")
		TNT1 A 0 A_CustomMissile ("BloodMistBig", 50, 0, random (0, 360), 2, random (30, 90))
		TNT1 AA 0 A_CustomMissile ("BloodMist", 50, 0, random (0, 360), 2, random (30, 90))
		TNT1 A 0 A_JumpIfInTargetInventory("HasCutingWeapon", 1, "Death.Decaptate")
		TNT1 A 0 A_JumpIfHealthLower(-60, "Death.HeadExplode")
		TNT1 A 0 A_JumpIfInTargetInventory("RandomHeadExploder", 1, "HeadExploder")
		TNT1 A 0 A_JumpIfInTargetInventory("HeavyAutomaticWeapon", 1, "DeathHeadMinor2")
		TNT1 A 0 A_Jump(16, "DeathHeadminor2")
		
	Death.HeadMinor:
		TNT1 A 0 A_FaceTarget
        TNT1 A 0 A_PlaySound("misc/xdeath4")
		TNT1 AA 0 A_CustomMissile ("Brains1", 50, 0, random (0, 360), 2, random (0, 160))
		TNT1 A 0 A_CustomMissile ("Brains3", 50, 0, random (0, 360), 2, random (0, 160))
		TNT1 A 0 A_CustomMissile ("Brains6", 50, 0, random (0, 360), 2, random (0, 160))
		//TNT1 A 0 A_CustomMissile ("Brains7", 50, 0, random (0, 360), 2, random (0, 160))
		TNT1 AA 0 A_CustomMissile ("SmallBrainPieceFast", random (45, 55), random (5, -5), random (170, 190), 2, random (-10, 10))
		TNT1 AA 0 A_CustomMissile ("SmallBrainPiece", 50, 0, random (0, 360), 2, random (0, 160))
		TNT1 A 0 A_CustomMissile ("SuperWallRedBlood", 46, 0, random (170, 190), 2, random (0, 40))
		
		TROH K 5 A_NoBlocking
		TROH L 5 A_Scream
		TROH M 5
		TROH N 5 
		TNT1 A 0 A_SpawnItem ("GrowingBloodPool")
        TNT1 A 0 A_SpawnItem("DeadImp_MinorHeadDeadFront")
		TNT1 A -1
		Stop
		
	DeathHeadminor2:
	    TNT1 A 0
		TNT1 A 0 A_FaceTarget
        TNT1 A 0 A_PlaySound("misc/xdeath4")
		TNT1 AA 0 A_CustomMissile ("Brains1", 50, 0, random (0, 360), 2, random (0, 160))
		TNT1 A 0 A_CustomMissile ("Brains3", 50, 0, random (0, 360), 2, random (0, 160))
		TNT1 A 0 A_CustomMissile ("Brains6", 50, 0, random (0, 360), 2, random (0, 160))
		//TNT1 A 0 A_CustomMissile ("Brains7", 50, 0, random (0, 360), 2, random (0, 160))
		TNT1 AA 0 A_CustomMissile ("SmallBrainPieceFast", random (45, 55), random (5, -5), random (170, 190), 2, random (-10, 10))
		TNT1 AA 0 A_CustomMissile ("SmallBrainPiece", 50, 0, random (0, 360), 2, random (0, 160))
		TNT1 A 0 A_CustomMissile ("SuperWallRedBlood", 46, 0, random (170, 190), 2, random (0, 40))
        TNT1 AAA 0 A_CustomMissile ("BrainBlood", 50, 0, random (0, 360), 2, random (0, 160))
		TNT1 AAA 0 A_CustomMissile ("Teeth", 50, 0, random (0, 360), 2, random (0, 160))
		
		TNT1 A 0 A_Scream
		TNT1 A 0 A_NoBlocking
		TNT1 A 0 A_SpawnItem("DyingImpHalfFace")
		Stop	
		
		
	Death.headExplode:
	    TNT1 A 0
		TNT1 A 0 A_SpawnItem("ImpHeadExplode", 0, 50)
		
		TROH AAAA 2 A_CustomMissile ("Brutal_LiquidBlood2", 50, 0, random (0, 360), 2, random (60, 120))
		TNT1 A 0 A_NoBlocking
		TROH BBBB 2 A_CustomMissile ("Brutal_LiquidBlood2", 40, 0, random (0, 360), 2, random (60, 120))
		TNT1 A 0 A_XScream
		TNT1 A 0 A_Jump(32, "Deathchickenhead")
		TNT1 A 0 A_SpawnItem("DyingImpNoHeadClean")
		Stop
		
	Death.StompWall:
		TNT1 A 0
		TNT1 A 0 A_SpawnItem("ImpHeadExplode", 0, 30)
		
		TNT1 A 0 A_NoBlocking
		TNT1 A 0 A_XScream
		TNT1 A 0 A_SpawnItem("DeadImp_Slumped_NoHead")
		TNT1 A 0 A_SpawnItem ("GrowingBloodPool")
		TNT1 A -1
		Stop
		
	Deathchickenhead:
	    
		TNT1 A 0
		TROH AAAA 2 A_CustomMissile ("Brutal_LiquidBlood2", 50, 0, random (0, 360), 2, random (60, 120))
		TNT1 A 0 A_SpawnItem("DyingImpNoHeadLikeChicken")
		TNT1 A 0 A_NoBlocking
		Stop
		
        TNT1 A 0 A_PlaySound("misc/xdeath2c")
		TROH FFFGGGHHHIII 2 A_CustomMissile ("Brutal_LiquidBlood2", 30, 0, random (0, 360), 2, random (10, 90))
		
		        TNT1 A 0 A_PlaySound("misc/xdeath2c")
		TROH FFFGGGHHHIII 2 A_CustomMissile ("Brutal_LiquidBlood2", 30, 0, random (0, 360), 2, random (10, 90))
		
		        TNT1 A 0 A_PlaySound("misc/xdeath2c")
		TROH FFFGGGHHHIII 2 A_CustomMissile ("Brutal_LiquidBlood2", 30, 0, random (0, 360), 2, random (10, 90))
		
		        TNT1 A 0 A_PlaySound("misc/xdeath2c")
		TROH FFFGGGHHHIII 2 A_CustomMissile ("Brutal_LiquidBlood2", 30, 0, random (0, 360), 2, random (10, 90))
		
				        TNT1 A 0 A_PlaySound("misc/xdeath2c")
		TROH FFFGGGHHHIII 2 A_CustomMissile ("Brutal_LiquidBlood2", 30, 0, random (0, 360), 2, random (10, 90))
		
				        TNT1 A 0 A_PlaySound("misc/xdeath2c")
		TROH FFFGGGHHHIII 2 A_CustomMissile ("Brutal_LiquidBlood2", 30, 0, random (0, 360), 2, random (10, 90))
		
				
		
		
		TROH CCCCCCCC 2 A_CustomMissile ("Brutal_LiquidBlood2", 30, 0, random (0, 360), 2, random (60, 120))
		TROH DDD 2 A_CustomMissile ("Brutal_LiquidBlood2", 20, 0, random (0, 360), 2, random (60, 120)) 
		TNT1 A 0 A_SpawnItem ("GrowingBloodPool")
		TROH EEEEEEEEEEEEEEEEEEEEEEEEEEEEE 2 A_CustomMissile ("Brutal_LiquidBlood2", 15, 0, random (0, 360), 2, random (15, 40))
        TNT1 A 0 A_SpawnItem("DeadImp_NoHead")
		TNT1 A -1
		Stop
		
		
		
		DeathMirror:
        TROO V 9
		TROO W 9 A_Scream
		TROO X 8 A_NoBlocking
		TROO Y 8 
		TNT1 A 0 A_SpawnItem ("GrowingBloodPool")
        TNT1 A 0 A_SpawnItem("DeadImpMinorHeadShot")
		TNT1 A -1
		Stop

	Death.decaptate:
        TNT1 A 0 A_CustomMissile ("BloodMistBig", 50, 0, random (0, 360), 2, random (30, 90))
		TNT1 AA 0 A_CustomMissile ("BloodMist", 50, 0, random (0, 360), 2, random (30, 90))
        TNT1 A 0 A_PlaySound("misc/xdeath4")
       TNT1 A 0 A_CustomMissile ("XDeathImpHeadBeheaded", 50, 0, random (0, 360), 2, random (40, 90))
		TNT1 A 0 A_Jump(32, "Deathchickenhead")
		TNT1 A 0 A_SpawnItem("DyingImpNoHeadClean")
		TNT1 A -1
		Stop

	
		
	
		
	
		
	    Death.Minigun:
        TNT1 A 0
       TNT1 A 0 A_JumpIfInventory ("IsDown", 1, "Death.Down")
	   TNT1 A 0 A_Jump(32,"DeathNoGuts")
		TNT1 A 0 A_Jump(96, "Death")
        Goto Death.Minigun
		
	        Death.Minigun:
        TNT1 A 0
		TNT1 A 0 A_FaceTarget
		TNT1 A 0 A_Scream
		TNT1 O 0 A_NoBlocking
        TNT1 A 0 A_SpawnItem ("BrutalizedImp1", 1)
		Stop
		
		Death.LegMassacre:
		TNT1 A 0 A_CustomMissile ("XDeathImpLeg", 35, 0, random (0, 360), 2, random (0, 160))
		TNT1 A 0 A_CustomMissile ("MuchBlood", 50, 0, random (0, 360), 2, random (0, 160))
		TR09 A 8 A_CustomMissile ("XDeath1", 40, 0, random (0, 360), 2, random (0, 160))
		TR09 B 8 A_Scream
		TNT1 A 0 A_NoBlocking
        TNT1 A 0 A_SpawnItem ("ImpBrutalizedWithNoLeg")
		Stop
		
	Death.Desintegrate:
        TNT1 A 0 A_XScream
        TNT1 A 0 A_NoBlocking
        TNT1 A 0 A_SpawnItem("DesintegratedHuman")
		TNT1 A 0 A_Stop
		TGIB ABCDEFGHIJKLMNOPQ 3
		TGIB Q -1
      Stop

	Death.cut:

		TNT1 A 0 A_XScream
		TNT1 O 0 A_NoBlocking
        TNT1 A 0 A_CustomMissile ("XDeath1", 40, 0, random (0, 360), 2, random (0, 160))
		TROG A 2 A_CustomMissile ("RipImp", 0, 0, random (0, 360), 2, random (0, 160))
        TROG AAA 4 A_SpawnItem ("MuchBlood", 0, 30)
	    TROG BCDEFGH 8
		TNT1 A 0 A_SpawnItem ("GrowingBloodPool")
        TNT1 A 0 A_SpawnItem ("DeadImp_Half", 5)
		Stop
		
		
	Death.HKFT:
	Death.Saw:
	    TNT1 A 0
		TNT1 A 0 A_FaceTarget
		TNT1 A 0 A_Jump(32, "Death.Arm")
		TNT1 A 0 A_NoBlocking
		TNT1 A 0 A_XScream
		TNT1 AA 0 A_CustomMissile ("Guts", 32, 0, random (0, -210), 2, random (0, 40))
		TNT1 AAA 0 A_CustomMissile ("XDeath1", 32, 0, random (0, -210), 2, random (0, 40))
		TNT1 A 0 A_CustomMissile ("XDeathHalfImpUpperPart32", 32, 0, random (0, -210), 2, random (0, 40))
		TNT1 A 0 A_CustomMissile ("XDeathImpHead", 32, 0, random (0, -210), 2, random (0, 40))
		TNT1 AAA 0 A_CustomMissile ("Xdeath3", 16, 0, random (0, -210), 2, random (0, 40))
		TNT1 AAAA 0 A_CustomMissile ("Brutal_FlyingBlood", 32, 0, random (170, 190), 2, random (0, 40))
		TNT1 AAAA 0 A_CustomMissile ("Brutal_FlyingBloodFaster", 32, 0, random (170, 190), 2, random (0, 40))
		TNT1 AAAA 0 A_CustomMissile ("Brutal_FlyingBloodMuchFaster", 32, 0, random (170, 190), 2, random (0, 40))
		TNT1 AAAA 0 A_CustomMissile ("SuperWallRedBlood", 32, 0, random (170, 190), 2, random (0, 40))
		TNT1 AAA 0 A_CustomMissile ("BloodMist", 40, 0, random (0, 360), 2, random (30, 90))
		TNT1 A 0 A_CustomMissile ("BloodMistBig", 40, 0, random (0, 360), 2, random (30, 90))
		TRO3 A 6 A_Stop
		TNT1 A 0 A_SpawnItem ("GrowingBloodPool")
		TRO3 BBBBBBBBBB 3 A_CustomMissile ("Brutal_LiquidBlood2", 26, 0, random (0, 360), 2, random (30, 60))
		TRO3 CCC 3 A_CustomMissile ("Brutal_LiquidBlood2", 26, 0, random (0, 360), 2, random (10, 40))
		TRO3 DD 3 A_CustomMissile ("Brutal_LiquidBlood2", 6, 0, random (0, 360), 2, random (30, 60))
		TNT1 A 0 A_SpawnItem("DeadImpTRO3E")
		TNT1 A -1
	    Stop	

DeathNoGuts:
        TNT1 AAAAA 0
		TNT1 AA 0 A_CustomMissile ("Guts", 24, 0, random (0, 360), 2, random (0, 160))
		TNT1 A 0 A_CustomMissile ("BloodMistBig", 40, 0, random (0, 360), 2, random (30, 90))
		TNT1 AA 0 A_CustomMissile ("BloodMist", 40, 0, random (0, 360), 2, random (30, 90))
		TNT1 AA 0 A_CustomMissile ("XDeath1", 30, 0, random (0, 360), 2, random (0, 160))
		IMPC A 6 A_Scream
        IMPC B 1 A_NoBlocking
		TNT1 A 0 A_SpawnItem ("GrowingBloodPool")
        TNT1 A 0 A_SpawnItem ("DyingImp", 2)
		Stop

    Death.Plasma: Death.Plasma2:
		TNT1 A 0
		TNT1 A 0 A_Stop
		PBR1 A 6 A_XScream
		TNT1 AAAA 0 A_CustomMissile ("BluePlasmaFireNonStatic", 42, 0, random (0, 360), 2, random (0, 180))
		TNT1 AAA 0 A_CustomMissile ("Blood", 32, 0, random (0, 360), 2, random (0, 180))
		TNT1 AAA 0 A_CustomMissile ("BloodMistSmall", 32, 0, random (0, 360), 2, random (0, 180))
		TNT1 AAA 0 A_CustomMissile ("Brutal_FlyingBlood", 32, 0, random (0, 360), 2, random (0, 180))
		PBR1 B 6 A_NoBlocking
		TNT1 A 0 A_SpawnItemEx ("DetectFloorCraterSmall",0,0,0,0,0,0,0,SXF_NOCHECKPOSITION,0)
		TNT1 A 0 A_SpawnItem("BarrelExplosionSmokeColumn")
		TNT1 A 0 A_SpawnItemEx("TinyBurningPiece", random (-15, 15), random (-15, 15))
		TNT1 AA 0 A_SpawnItemEx("TinyBurningPiece2", random (-35, 35), random (-35, 35))
		TNT1 AA 0 A_SpawnItemEx("TinyBurningPiece3", random (-45, 45), random (-45, 35))
		PBR1 CCDD 3 A_CustomMissile ("BluePlasmaFireNonStatic", 32, 0, random (0, 360), 2, random (0, 180))
		PBR1 EEFF 3 A_CustomMissile ("BluePlasmaFireNonStatic", 24, 0, random (0, 360), 2, random (0, 180))
		PBR1 GG 3 A_CustomMissile ("BluePlasmaFireNonStatic", 22, 0, random (0, 360), 2, random (0, 180))
		PBR1 H -1
		Stop
	
	Death.SuperPlasma:
        TNT1 A 0
        TNT1 A 0 A_XScream
        TNT1 A 0 A_NoBlocking
		XBRN AA 2 BRIGHT A_SpawnItem("BlueFlare",0,43)
        TNT1 AAAA 0 A_CustomMissile ("Brutal_Blood", 30, 0, random (0, 360), 2, random (0, 160))
		
	    TNT1 A 0 A_CustomMissile ("XDeathBurnedImpArm", 32, 0, random (0, 360), 2, random (0, 160))
	    TNT1 A 0 A_CustomMissile ("XDeathBurnedImpLeg", 32, 0, random (0, 360), 2, random (0, 160))
	    TNT1 A 0 A_CustomMissile ("XDeathBurnedMeat", 32, 0, random (0, 360), 2, random (0, 160))
	    TNT1 A 0 A_CustomMissile ("XDeathBurnedMeat2", 32, 0, random (0, 360), 2, random (0, 160))
	    TNT1 A 0 A_CustomMissile ("XDeathBurnedMeat3", 32, 0, random (0, 360), 2, random (0, 160))

		XBRN BB 2 BRIGHT A_SpawnItem("BlueFlare",0,43)
        TNT1 A 0 A_CustomMissile ("Brutal_Blood", 30, 0, random (0, 360), 2, random (0, 160))
		XBRN CC 2 BRIGHT A_SpawnItem("BlueFlare",0,43)
				TNT1 AAAAA 0 A_CustomMissile ("PlasmaParticleX", 48, 0, random (0, 360), 2, random (0, 360))
		TNT1 AAA 0 A_CustomMissile ("BigPlasmaParticleX", 42, 0, random (0, 360), 2, random (0, 360))
        TNT1 A 0
        Stop
		
			Death.GreenFire:
        TNT1 A 0
        TNT1 A 0 A_XScream
        TNT1 A 0 A_NoBlocking
        TNT1 AAAA 0 A_CustomMissile ("Brutal_Blood", 30, 0, random (0, 360), 2, random (0, 160))
		
	    
	    TNT1 A 0 A_CustomMissile ("XDeathBurnedImpLeg", 32, 0, random (0, 360), 2, random (0, 160))
	    TNT1 AA 0 A_CustomMissile ("XDeathBurnedMeat", 32, 0, random (0, 360), 2, random (0, 160))
	    TNT1 A 0 A_CustomMissile ("XDeathBurnedMeat2", 32, 0, random (0, 360), 2, random (0, 160))
	    TNT1 A 0 A_CustomMissile ("XDeathBurnedMeat3", 32, 0, random (0, 360), 2, random (0, 160))
		
		EXPL AAAAAAAAAAAAAAAAAAAAAAAA 0 A_CustomMissile ("GreenFlameTrails", 50, 0, random (0, 360), 2, random (0, 360))
		XBRN AAAA 2 BRIGHT A_SpawnItem("GreenFlare",0,43)
        Stop

    Death.Blast:
	    TNT1 A 0
		TNT1 A 0 A_FaceTarget
		TNT1 A 0 A_Jump(12, "Death.Arm")
		TNT1 A 0 A_NoBlocking
		TNT1 A 0 A_Jump(128, "Death.Blast2")
		TNT1 A 0 A_XScream
		TNT1 AAA 0 A_CustomMissile ("Guts", 32, 0, random (150, 210), 2, random (0, 40))
		TNT1 AAA 0 A_CustomMissile ("XDeath1", 32, 0, random (150, 210), 2, random (0, 40))
		TNT1 A 0 A_CustomMissile ("XDeathImpArm", 32, 0, random (150, 210), 2, random (0, 40))
		TNT1 A 0 A_CustomMissile ("XDeathImpHead", 32, 0, random (150, 210), 2, random (0, 40))
		TNT1 AAA 0 A_CustomMissile ("Xdeath3", 16, 0, random (170, 190), 2, random (0, 40))
		TNT1 AAAA 0 A_CustomMissile ("Brutal_FlyingBlood", 32, 0, random (170, 190), 2, random (0, 40))
		TNT1 AAAA 0 A_CustomMissile ("Brutal_FlyingBloodFaster", 32, 0, random (170, 190), 2, random (0, 40))
		TNT1 AAAA 0 A_CustomMissile ("Brutal_FlyingBloodMuchFaster", 32, 0, random (170, 190), 2, random (0, 40))
		TNT1 AA 0 A_CustomMissile ("SuperWallRedBlood", 32, 0, random (170, 190), 2, random (0, 40))
		TNT1 AAA 0 A_CustomMissile ("BloodMistBig", 40, 0, random (0, 360), 2, random (30, 90))
		TRO3 A 6 A_Stop
		TNT1 A 0 A_SpawnItem ("GrowingBloodPool")
		TRO3 BBBBBBBBBB 3 A_CustomMissile ("Brutal_LiquidBlood2", 26, 0, random (0, 360), 2, random (30, 60))
		TRO3 CCC 3 A_CustomMissile ("Brutal_LiquidBlood2", 26, 0, random (0, 360), 2, random (10, 40))
		TRO3 DD 3 A_CustomMissile ("Brutal_LiquidBlood2", 6, 0, random (0, 360), 2, random (30, 60))
		TNT1 A 0 A_SpawnItem("DeadImpTRO3E")
		TNT1 A -1
	    Stop
	
	Death.Blast2:
		TNT1 A 0 A_XScream
		TNT1 AAA 0 A_CustomMissile ("Guts", 32, 0, random (150, 210), 2, random (0, 40))
		TNT1 AAA 0 A_CustomMissile ("XDeath1", 32, 0, random (150, 210), 2, random (0, 40))
		TNT1 A 0 A_CustomMissile ("XDeathImpArm", 32, 0, random (150, 210), 2, random (0, 40))
		TNT1 A 0 A_CustomMissile ("XDeathImpHead", 32, 0, random (150, 210), 2, random (0, 40))
		TNT1 AAA 0 A_CustomMissile ("Xdeath3", 16, 0, random (170, 190), 2, random (0, 40))
		TNT1 AAAA 0 A_CustomMissile ("Brutal_FlyingBlood", 32, 0, random (170, 190), 2, random (0, 40))
		TNT1 AAAA 0 A_CustomMissile ("Brutal_FlyingBloodFaster", 32, 0, random (170, 190), 2, random (0, 40))
		TNT1 AAAA 0 A_CustomMissile ("Brutal_FlyingBloodMuchFaster", 32, 0, random (170, 190), 2, random (0, 40))
		TNT1 AA 0 A_CustomMissile ("SuperWallRedBlood", 32, 0, random (170, 190), 2, random (0, 40))
		TNT1 AAA 0 A_CustomMissile ("BloodMistBig", 40, 0, random (0, 360), 2, random (30, 90))
		TRO4 A 6 A_Stop
		TNT1 A 0 A_SpawnItem ("GrowingBloodPool")
		TRO4 BBBBBBBBBB 3 A_CustomMissile ("Brutal_LiquidBlood2", 26, 0, random (0, 360), 2, random (30, 60))
		TRO4 CCC 3 A_CustomMissile ("Brutal_LiquidBlood2", 26, 0, random (0, 360), 2, random (10, 40))
		TRO4 DD 3 A_CustomMissile ("Brutal_LiquidBlood2", 6, 0, random (0, 360), 2, random (30, 60))
		TNT1 A 0 A_SpawnItem("DeadImpTRO4E")
		TNT1 A -1
	    Stop

	Death.SSG:
	Death.Railgun:
		TNT1 A 0
		TNT1 A 0 A_Stop
	    IZD1 E 1 A_Pain
		IZD1 E 1 A_FaceTarget
		TNT1 AA 0 A_CustomMissile ("BloodMistBig", 40, 0, random (0, 360), 2, random (30, 90))
		TNT1 AAA 0 A_CustomMissile ("BloodMist", 40, 0, random (0, 360), 2, random (30, 90))
		
	    TNT1 AAA 0 bright A_CustomMissile ("SuperGoreSpawner", 35, 0, random (170, 190), 2, random (0, 40))
        //TNT1 A 0 A_CustomMissile ("MeatDeath", 0, 0, random (0, 360), 2, random (0, 160))
		//TNT1 AA 0 A_CustomMissile ("XDeath1", 32, 0, random (170, 190), 2, random (0, 40))
		TNT1 AA 0 A_CustomMissile ("XDeath2", 32, 0, random (170, 190), 2, random (0, 40))
		TNT1 A 0 A_CustomMissile ("XDeath3", 32, 0, random (170, 190), 2, random (0, 40))
		TNT1 AAA 0 A_CustomMissile ("Guts", 32, 0, random (150, 210), 2, random (0, 40))
		//TNT1 AAAA 0 A_CustomMissile ("Brutal_FlyingBlood", 32, 0, random (170, 190), 2, random (0, 40))
		//TNT1 AAAA 0 A_CustomMissile ("Brutal_FlyingBloodFaster", 32, 0, random (170, 190), 2, random (0, 40))
		//TNT1 AAAA 0 A_CustomMissile ("Brutal_FlyingBloodMuchFaster", 32, 0, random (170, 190), 2, random (0, 40))
		//TNT1 AAAA 0 A_CustomMissile ("SuperWallRedBlood", 32, 0, random (170, 190), 2, random (0, 40))
		//TNT1 AAAA 0 A_CustomMissile ("SuperWallRedBlood", 46, 0, random (170, 190), 2, random (0, 40))
		TNT1 AA 0 A_CustomMissile ("XDeathImpArm", 32, 0, random (170, 190), 2, random (0, 40))
		TNT1 A 0 A_CustomMissile ("XDeathImpHead", 32, 0, random (170, 190), 2, random (0, 40))
        TNT1 A 0 A_XScream
		TNT1 A 0 A_NoBlocking
		IZD1 EEFFG 6
		TNT1 A 0 A_SpawnItem ("GrowingBloodPool")
		TNT1 A 0 A_SpawnItem("DeadImpIZD1H")
		TNT1 A -1
        Stop
		
	XDeath:
		TNT1 A 0 A_XScream
		TNT1 A 0 A_NoBlocking
		TNT1 A 0 A_FaceTarget
		TNT1 AAA 0 A_CustomMissile ("XDeath1", 42, 0, random (0, 190), 2, random (10, 60))
		TNT1 AAA 0 A_CustomMissile ("XDeath3", 42, 0, random (0, 190), 2, random (10, 60))
		TNT1 A 0 A_CustomMissile ("XDeath2", 42, 0, random (0, 190), 2, random (10, 60))
		TNT1 A 0 A_CustomMissile ("XDeath4", 42, 0, random (0, 190), 2, random (10, 60))
  	    TNT1 A 1 A_CustomMissile ("ImpXDeath", 0, 0, random (0, 360), 2, random (0, 160))
		Stop
	
	 Death.ExtremePunches:
		 TNT1 A 0
		 //TNT1 A 0 A_JumpIfInTargetInventory("HeavyStrikeRight", 1, "HeavyPunchRight")
		 //TNT1 A 0 A_JumpIfInTargetInventory("HeavyStrikeLeft", 1, "HeavyPunchLeft") 
		 //TNT1 A 0 A_JumpIfInTargetInventory("HeavyStrikeUpper", 1, "HeavyPunchUpper")
		 TNT1 A 0 A_XScream
		 TNT1 A 0 A_NoBlocking
		 TNT1 A 0 A_FaceTarget
		 TNT1 A 0 A_CustomMissile ("ExtremePunchedImp", 8, 0, random (175, 185), 2, random (10, 20))
		 Stop
	Death.Shrapnel:
		TNT1 A 0
		TNT1 A 0 A_JumpIfHealthLower(-50, 4)
		TNT1 A 0 A_SpawnItem("MuchBlood", 0, 32)
		TNT1 A 0 ThrustThingZ(0, 30, 0, 0)
		TNT1 A 0 A_Jump(128, "Death.Head")
		Goto Death
		TNT1 AA 0
		TNT1 A 0 A_Jump(255, "Death.ExplosiveImpact", "Death.Leg")
		Goto Death
		
	Death.ExplosiveImpact:
		TNT1 A 0
		TNT1 A 0 A_NoBlocking
		TNT1 A 0 A_XScream
		TNT1 A 0 A_SpawnItemEx("MuchBlood2", 0, 0, 40)
		TNT1 A 0 A_ChangeFlag("NOBLOCKMONST", 1)
		TNT1 A 0 ThrustThingZ(0,25,0,1)
		TNT1 A 0 A_JumpIfHealthLower(-10, 2)
		TNT1 A 0 A_Jump(255, "Death.Leg", "Death.ARm")
	    TNT1 A 0 A_Jump(32,"Death.LandMine")
		
		TNT1 AAAA 0 A_CustomMissile ("Brains1", 50, 0, random (0, 360), 2, random (0, 160))
		TNT1 A 0 A_CustomMissile ("Brains3", 50, 0, random (0, 360), 2, random (0, 160))
		TNT1 A 0 A_CustomMissile ("Brains6", 50, 0, random (0, 360), 2, random (0, 160))
		TNT1 A 0 A_CustomMissile ("Brains7", 50, 0, random (0, 360), 2, random (0, 160))
		TNT1 AAAA 0 A_CustomMissile ("SmallBrainPieceFast", random (45, 55), random (5, -5), random (170, 190), 2, random (-10, 10))
		TNT1 AAAA 0 A_CustomMissile ("SmallBrainPiece", 50, 0, random (0, 360), 2, random (0, 160))
		TNT1 A 0 A_CustomMissile ("XDeathImpArm", 35, 0, random (0, 360), 2, random (0, 160))
		TNT1 A 0 A_CustomMissile ("XDeath3", 40, 0, random (0, 360), 2, random (0, 160))
		TNT1 A 0 A_CustomMissile ("XDeathImpLeg", 32, 0, random (0, 360), 2, random (0, 160))
		TNT1 A 0 ThrustThingZ(0,15,0,1)
	    ID17 AB 5
	    ID17 CDEF 5 A_CheckFloor ("Dead.ExplosiveImpact")
		ID17 EEEEEEEEEE 5 A_CheckFloor ("Dead.ExplosiveImpact")
		TNT1 A 0 A_SpawnItem("DeadImpID17G")
		TNT1 A -1
		Stop
		
		Dead.ExplosiveImpact:
		TNT1 A 0
		TNT1 A 0 A_SpawnItem ("GrowingBloodPool")
		TNT1 A 0 A_SpawnItem ("ThisImpGotFuckedHard")
		TNT1 A 0 A_SpawnItem ("Ploft")
		TNT1 AAAA 0 A_SpawnItem ("Blood")
		TNT1 A -1
		Stop
		
		
		Death.Landmine:
		Death.LandMine2:
		TNT1 A 0
		TNT1 A 0 ThrustThingZ(0,15,0,1)
		Death.LegInTheAir:
		TNT1 A 0 ThrustThingZ(0,35,0,1)
		TNT1 A 0 A_CustomMissile ("XDeathImpLeg", 32, 0, random (0, 360), 2, random (0, 160))
		TNT1 AA 0 A_CustomMissile ("XDeath1", 40, 0, random (0, 360), 2, random (0, 160))
	
	ID13 A 1 A_Scream
	    ID17 HI 4
		ID17 JKLMN 4 A_CheckFloor ("Dead.Landmine")
		ID17 NNNNNNNN 4 A_CheckFloor ("Dead.Landmine")
		TNT1 A 0 A_SpawnItem("DeadImp_NoLeg")
		TNT1 A -1
		Stop
	
	Dead.Landmine:
		TR09 E 0
		TNT1 A 0 A_SpawnItem ("GrowingBloodPool")
		TNT1 A 0 A_SpawnItem ("Ploft")
		TNT1 AAAA 0 A_SpawnItem ("Blood")
		TNT1 A 0 A_SpawnItem("DeadImp_NoLeg")
		TNT1 A -1
		Stop		
		
	 Death.Stomp:
		TNT1 A 0 A_Scream
		TNT1 A 0 A_NoBlocking
		TROO KL 2
	    TNT1 AA 0 A_SpawnItem("MeatDeathSmall")
		TNT1 AAA 0 bright A_CustomMissile ("SuperGoreSpawner", 5, 0, random (0, 360), 2, random (30, 180))
		TNT1 AAAA 0 bright A_CustomMissile ("XDeath1", 5, 0, random (0, 360), 2, random (30, 180))
		TNT1 AA 0 bright A_CustomMissile ("XDeath2b", 55, 0, random (0, 360), 2, random (30, 180))
		TNT1 AA 0 bright A_CustomMissile ("XDeath3b", 55, 0, random (0, 360), 2, random (30, 180))
		TNT1 A 0 A_SpawnItem ("GrowingBloodPool")
		TNT1 A 0 A_SpawnItem ("CrushedRemains")
		TNT1 A 1
		TNT1 A 1 A_XScream
		Stop
		
	Crush:
		TNT1 A 0
		TNT1 AAAAA 0 A_CustomMissile ("Brutal_FlyingBloodTrail8", 0, 0, random (0, 360), 2, random (0, 360))
		TNT1 AAAA 0 A_SpawnItemEx ("BodyRemovalThing",0,0,0,0,0,0,0,SXF_NOCHECKPOSITION,0)
		TNT1 A 1 A_XScream
		Stop

   FatalityMarine:
       IPFP ABCD 4
	   TNT1 A 0 A_SpawnItem ("MarineGotOwnedByImp", 1)
       TNT1 A 0 A_SpawnItemEx("FootStep5", 0, 0, 40, 0, 0)
       IPFP EE 6
	   
       IPFP F 8
	   
	   IPFP G 8
	   TNT1 A 0 A_CustomMissile ("MuchBlood", 5, 0, random (0, 360), 2, random (0, 160))
       IPFP H 8

       IPFP I 8
	   TNT1 A 0 A_CustomMissile ("MuchBlood", 5, 0, random (0, 360), 2, random (0, 160))
       IPFP J 8

       IPFP K 8
	   TNT1 A 0 A_CustomMissile ("MuchBlood", 5, 0, random (0, 360), 2, random (0, 160))
       IPFP H 8

       IPFP I 8
	   TNT1 A 0 A_CustomMissile ("MuchBlood", 5, 0, random (0, 360), 2, random (0, 160))
       IPFP J 8

       IPFP K 8
	   TNT1 A 0 A_CustomMissile ("MuchBlood", 5, 0, random (0, 360), 2, random (0, 160))
       IPFP H 8

       IPFP I 8
		TNT1 A 0 A_CustomMissile ("MuchBlood", 5, 0, random (0, 360), 2, random (0, 160))
       IPFP J 8
	   
	   
	   IPFP L 8
	   TNT1 A 0 A_CustomMissile ("MuchBlood2", 5, 0, random (0, 360), 2, random (0, 160))
       IPFP M 8
	   TNT1 A 0 A_CustomMissile ("Guts", 12, 0, random (0, 360), 2, random (0, 40))

       IPFP N 8
		TNT1 A 0 A_CustomMissile ("MuchBlood2", 5, 0, random (0, 360), 2, random (0, 160))
       IPFP O 8
	   TNT1 A 0 A_CustomMissile ("Guts", 12, 0, random (0, 360), 2, random (0, 40))
	   
	   IPFP L 8
		TNT1 A 0 A_CustomMissile ("MuchBlood2", 5, 0, random (0, 360), 2, random (0, 160))
       IPFP M 8
	   TNT1 AA 0 A_CustomMissile ("Guts", 12, 0, random (0, 360), 2, random (0, 40))

       IPFP N 8
	   TNT1 A 0 A_CustomMissile ("MuchBlood2", 5, 0, random (0, 360), 2, random (0, 160))
       IPFP O 8
	   TNT1 AAA 0 A_CustomMissile ("Guts", 12, 0, random (0, 360), 2, random (0, 40))
       

        TNT1 A 0 A_TakeInventory("Fatality_Marine",1)
		TNT1 A 0 A_SpawnItem ("GrowingBloodPool")
		
	Goto See 
		 
	StealthKill:
	TNT1 A 0
	TNT1 A 0 A_JumpIfInTargetInventory("IsPlayer", 1, 1)
	Goto Death
	TNT1 A 0 A_GiveToTarget("GoFatality", 1)
	TNT1 A 0 A_GiveToTarget("GoSpecial", 1)
	TNT1 A 0 A_GiveToTarget("SKImp", 1)
	TNT1 A 0 A_NoBlocking
	TNT1 A 0 A_Fall
	TNT1 A 1
	TNT1 A 0 A_Die("Stealthy")
	TNT1 A 1
	Stop
	Death.Stealthy:
	TNT1 A 0
	Stop
	
	Swim:
	TNT1 A 0
	TNT1 A 0 A_NoBlocking
	TNT1 A 0 A_Fall
	TNT1 A 0 A_SpawnItem("ImpFish")
	Stop
	
	Death.Ice:
	Death.Freeze:
	Death.Frost:
	TNT1 A 0 A_ChangeFlag("SHOOTABLE", 0)
	TNT1 A 0 A_ChangeFlag("SOLID", 0)
	TNT1 A 0 A_SpawnItem("FrozenImp")
	Stop
	
	Death.Massacre:
	Goto Death
	
	}
}

ACTOR ImpAttack: BaronBall
{
	Radius 10
	Height 18
	DamageType Rip
	Projectile 
	Radius 4
	+RANDOMIZE
    Damage (random(20,20))
	+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("imp/melee")
		TNT1 A 0 BRIGHT
		Stop
	}
}


ACTOR MonsterTargetCheck
{
	Radius 4
	Height 4
    Damage 0
	PROJECTILE
    -BLOODSPLATTER 
	+SEEKERMISSILE
	+THRUSPECIES
	SeeSound "None"
	DeathSound "none"
	Decal "none"
	Species "NonCombatant"
    Speed 300
	States
	{
	Spawn:
		TNT1 AAAAAAAAAAA 1 A_SeekerMissile (99,99)
		Stop
	Death:		
	XDeath:
		TNT1 A 0
		TNT1 A 0 A_JumpIfTargetInLOS("NoSight", 0, JLOSF_PROJECTILE, 50) 
		TNT1 A 0 A_GiveToTarget("CantFire")
		PLAY A 0
		TNT1 A 0 BRIGHT
		Stop
	NoSight:
		TNT1 A 0
		PLAY A 0
		TROO A 0
		TNT1 A 1
		Stop
	}
}


ACTOR MonsterTargetCheckFaster: FastProjectile
{
	Radius 4
	Height 4
	Projectile 
    Damage 0
    -BLOODSPLATTER 
	+SEEKERMISSILE
	+THRUSPECIES
	SeeSound "None"
	DeathSound "none"
	Decal "none"
	Species "NotACover"
    Speed 900
	States
	{
	Spawn:
		TNT1 AAAAAAAAAAA 1 A_SeekerMissile (99,99)
		Stop
	Death:		
	XDeath:
		TNT1 A 0
		TNT1 A 0 A_JumpIfTargetInLOS("NoSight", 0, JLOSF_PROJECTILE, 50) 
		TNT1 A 0 A_GiveToTarget("CantFire")
		PLAY A 0
		TNT1 A 0 BRIGHT
		Stop
	NoSight:
		TNT1 A 0
		PLAY A 0
		TROO A 0
		TNT1 A 1
		Stop
	}
}



		

ACTOR ImpAttack2: ImpAttack
{
    +THRUGHOST
	DamageType ImpFatalityMarine
    Damage (random(10,10))
}

ACTOR FireBall_ Replaces DoomImpBall
{
	Game Doom
	DamageType Burn
	Radius 4
	Height 10
	Speed 16
	FastSpeed 24
	Damage (random(20,20))
	PROJECTILE
    +THRUGHOST
	+FORCEXYBILLBOARD
	RenderStyle Add
	Alpha 1
	SeeSound "imp/attack"
	DeathSound "imp/shotx"
	Decal "Scorch"
	Species "Imps"
	+DONTHURTSPECIES
	Scale 0.3
	States
	{
	StopInAir:
		TNT1 A 0
		EXPL A 0 A_CustomMissile ("FireBallExplosionFlames", 1, 0, random (0, 360), 2, random (0, 360))
		Stop
		
	Spawn:
	    TNT1 A 0 A_JumpIf(waterlevel > 1, "SpawnUnderwater")
		TNT1 A 0 ACS_NamedExecuteAlways("BDCheckJanitor", 0, 0, 0, 0)//Check Effects
		BLHD Ab 1 BRIGHT
		TNT1 A 0 A_JumpIfInventory("lowgraphicsmode", 1, "SpawnCheap")
	
	Spawn1:
		TNT1 A 0 
		BLHD A 1 BRIGHT A_SpawnItem ("CoolAndNewFlameTrails", 0, random( -2, 2))
		TNT1 A 0 A_CustomMissile ("OldschoolRocketSmokeTrailDarker", 2, 0, random (160, 210), 2, random (-30, 30))
		Loop
		
	SpawnCheap:
		BLHD AB 1 BRIGHT// A_SpawnItem ("CoolAndNewFlameTrails")
		Loop
		
	SpawnUnderwater:
		FR7X A 1 BRIGHT A_SpawnItem("FireballFlare",0,0)
		TNT1 A 0 A_CustomMissile ("BUBULZ", 0, 0, random (0, 360), 2, random (0, 180))
		FR7X B 1 BRIGHT A_SpawnItem("FireballFlare",0,0)
		TNT1 A 0 A_CustomMissile ("BUBULZ", 0, 0, random (0, 360), 2, random (0, 180))
		Goto Spawn1	
		
	Death:
		//TNT1 A 0 A_ChangeFlag("SHOOTABLE", 0)
		//TNT1 A 0 A_JumpIfInventory("lowgraphicsmode", 1, "DeathCheap")
		TNT1 A 0
		TNT1 A 0 A_SpawnItemEx ("SmallUnderwaterExplosion",0,0,0,0,0,0,0,SXF_NOCHECKPOSITION,0)
	    EXPL A 0 A_CustomMissile ("FireBallExplosionFlames", 1, 0, random (0, 360), 2, random (0, 360))
		//FRFX CDEFGHIJKLMNOP 1 BRIGHT A_SpawnItem("RedFlare",0,0)
		TNT1 A 0 A_SpawnItemEx("TinyBurningPiece3", random (-5, 5), random (-5, 5))
		TNT1 A 0 A_SpawnItemEx ("DetectFloorCraterSmall",0,0,0,0,0,0,0,SXF_NOCHECKPOSITION,0)
	    TNT1 A 0 A_SpawnItemEx ("DetectCeilCraterSmall",0,0,0,0,0,0,0,SXF_NOCHECKPOSITION,0)
		TNT1 A 0 A_CustomMissile ("BDExplosionparticlesSmall", 10, 0, random (0, 180), 2, random (40, 90))
		TNT1 A 0 A_CustomMissile ("PlasmaSmoke", 1, 0, random (0, 360), 2, random (0, 160))
		Stop
	XDeath:
	    TNT1 A 0
		//TNT1 A 0 A_JumpIfInventory("lowgraphicsmode", 1, "DeathCheap")
		TNT1 A 0 A_SpawnItemEx ("SmallUnderwaterExplosion",0,0,0,0,0,0,0,SXF_NOCHECKPOSITION,0)
		TNT1 A 0 A_CustomMissile ("BDExplosionparticlesSmall", 10, 0, random (0, 180), 2, random (40, 90))
	    EXPL A 0 A_CustomMissile ("FireBallExplosionFlames", 1, 0, random (0, 360), 2, random (0, 360))
		TNT1 A 0 A_SpawnItemEx("TinyBurningPiece3", random (-15, 15), random (-15, 15))
		TNT1 A 0 A_CustomMissile ("PlasmaSmoke", 1, 0, random (0, 360), 2, random (0, 160))
		//FRFX CDEFGHIJKLMNOP 1 BRIGHT A_SpawnItem("RedFlare",0,0)
		Stop
	}
}

ACTOR FireBallWeapon: FireBall_
{
	-THRUGHOST
}


ACTOR ImpTorso
{
    Radius 0
    Height 16
    Scale 1.1
	Mass 20
    Health 50
    +SHOOTABLE
    -SOLID
    +NOTELEPORT
	+FLOORCLIP
    +MOVEWITHSECTOR
    damagefactor "Blood", 0.0
    damagefactor "Trample", 0.0
    States
    {
    Spawn:
    BLUD C 0 A_Recoil (3)
    BLUD C 0 ThrustThing (random(0,255),random(1,5))
    BLUD C 0 ThrustThingZ (0,random(0,50),random(0,1),0)
TNT1 A 0 A_SetInvulnerable
GORX B 10
TNT1 A 0 A_UnSetInvulnerable
    Goto Dead
    
   Dead:
        GORX B 10
        Loop
    Death:
        TNT1 AA 0 A_CustomMissile ("XDeath1", 0, 0, random (0, 180), 2, random (0, 180))
        TNT1 A 0 A_CustomMissile ("XDeath2", 0, 0, random (0, 180), 2, random (0, 180))
        TNT1 A 0
        Stop
    Death.Plasma: Death.Plasma2:
        TNT1 A 0
        TNT1 A 0 A_XScream
        TNT1 A 0 A_NoBlocking
        TNT1 AAA 0 A_CustomMissile ("Brutal_FlyingBlood", 50, 0, random (0, 360), 2, random (0, 160))
	    TNT1 A 0 A_CustomMissile ("XDeathBurnedMeat", 32, 0, random (0, 360), 2, random (0, 160))
	    TNT1 A 0 A_CustomMissile ("XDeathBurnedMeat2", 32, 0, random (0, 360), 2, random (0, 160))
	    TNT1 A 0 A_CustomMissile ("XDeathBurnedMeat3", 32, 0, random (0, 360), 2, random (0, 160))
		EXPL AAA 0 A_CustomMissile ("ExplosionSmoke", 32, 0, random (0, 360), 2, random (0, 360))
        TNT1 A 0
        Stop

    }
}










Actor DeadImp: CurbstompedMarine Replaces DeadDoomImp
{
    Radius 12
    Height 12
    +SHOOTABLE
    +NOTELEPORT
    +MOVEWITHSECTOR
    +CORPSE
	-SOLID
	+FLOORCLIP
	+THRUACTORS
	+SHOOTABLE
	damagefactor "Crush", 50.0
    Mass 1000
    Health 100
    damagefactor "Blood", 0.0
    damagefactor "Trample", 0.0
    damagefactor "Melee", 10.0
    damagefactor "Fatality", 10.0
	damagefactor "Kick", 10.0
	damagefactor "ExplosiveImpact", 10.0
States
    {
    Spawn:
        TROO M -1
        Stop
    Death:
		TNT1 A 0 A_CustomMissile ("XDeathImpLeg", 5, 0, random (0, 360), 2, random (0, 160))
		TNT1 A 0 A_SpawnItem ("DeadImp_NoLeg", 5)
		TNT1 A 0 A_NoBlocking
		TNT1 A 0 A_SpawnItem("MeatDeathSmall", 0, 10)
		Stop
		
    Death.Plasma: Death.Plasma2:
        TNT1 A 0
        TNT1 A 0 A_XScream
        TNT1 A 0 A_NoBlocking
        TNT1 AAA 0 A_CustomMissile ("Brutal_FlyingBlood", 50, 0, random (0, 360), 2, random (0, 160))
	    TNT1 A 0 A_CustomMissile ("XDeathBurnedMeat", 32, 0, random (0, 360), 2, random (0, 160))
	    TNT1 A 0 A_CustomMissile ("XDeathBurnedMeat2", 32, 0, random (0, 360), 2, random (0, 160))
	    TNT1 A 0 A_CustomMissile ("XDeathBurnedMeat3", 32, 0, random (0, 360), 2, random (0, 160))
		EXPL AAA 0 A_CustomMissile ("ExplosionSmoke", 32, 0, random (0, 360), 2, random (0, 360))
        TNT1 A 0
        Stop
   }}

Actor DeadImp_NoArm: DeadImp
{Health 200 States{Spawn:
        TR08 E -1
        Stop    
		
		Death:
			TNT1 A 0 A_NoBlocking
			TNT1 A 0 A_SpawnItem("ImpHeadExplode", 0, 10)
			TNT1 A 0 A_SpawnItem("DeadImp_NoArmNoHead")
			Stop
		 }}



Actor DeadImp_NoArmNoHead: DeadImp_NoArm
{Health 200 States{Spawn:
        TR08 G -1
        Stop   
		
       Death:
			TNT1 A 0 A_NoBlocking
			TNT1 A 0 A_SpawnItem("RipGuts", 0, 10)
			TNT1 AA 0 A_SpawnItem("MeatDeathSmall", 0, 10)
			TNT1 A 0 A_CustomMissile ("XDeathImpArm", 5, 0, random (0, 360), 2, random (0, 160))
			TNT1 A 0 A_SpawnItem("DeadImp_Half")
			Stop
			}}

Actor DeadImp_NoLeg: DeadImp
{Health 200 States{Spawn:
        TR09 E -1
        Stop
      Death:
		TNT1 A 0 A_CustomMissile ("XDeathImpLeg", 5, 0, random (0, 360), 2, random (0, 160))
		TNT1 A 0 A_SpawnItem ("RipImp", 5)
		TNT1 A 0 A_NoBlocking
		TNT1 A 0 A_SpawnItem("MeatDeathSmall", 0, 10)
		Stop
		}}


Actor DeadImp_NoHead: DeadImp
{Health 200 States{Spawn:
        TROH E -1
        Stop	     	
        Death:
			TNT1 A 0 A_NoBlocking
			TNT1 A 0 A_SpawnItem("MeatDeathSmall", 0, 10)
			TNT1 A 0 A_CustomMissile ("XDeathImpArm", 5, 0, random (0, 360), 2, random (0, 160))
			TNT1 A 0 A_SpawnItem("DeadImp_NoArmNoHead")
			Stop}}

Actor DeadImp_MinorHeadDeadFront: DeadImp
{Health 200 States{Spawn:
        TROH O -1
        Stop
		
		Death:
			TNT1 A 0 A_NoBlocking
			TNT1 A 0 A_SpawnItem("ImpHeadExplode", 0, 10)
			TNT1 A 0 A_SpawnItem("DeadImp_NoHead")
			Stop
		}}
		 
Actor DeadImpMinorHeadShot: DeadImp
{Health 200 States{Spawn:
        TROO Y -1
        Stop	     	
        }}
		
Actor DeadImpNoFace: DeadImp
{Health 200 States{Spawn:
        T6SW G -1
        Stop	     	
        }}		

Actor DeadImp_Half: DeadImp
{Health 200 States{Spawn:
        TROG H -1
        Stop
        Death:
		TNT1 AA 0 A_CustomMissile ("XDeathImpLeg", 5, 0, random (0, 360), 2, random (0, 160))
		TNT1 AA 0 A_SpawnItem("MeatDeathSmall", 0, 10)
		TNT1 A 0 A_NoBlocking
		Stop
		}}
		  
Actor impfacesorapedomgthisiscruel: DeadImp_Half
{Health 200 States{Spawn:
        FTCI K -1
        Stop
		
		Death:
		TNT1 A 0 A_SpawnItem("RipGuts", 0, 10)
		TNT1 A 0 A_CustomMissile ("XDeathImpArm", 5, 0, random (0, 360), 2, random (0, 160))
		TNT1 A 0 A_CustomMissile ("XDeathHalfImpUpperPart32", 32, 0, random (0, 360), 2, random (10, 60))
		TNT1 A 0 A_SpawnItem("MeatDeathSmall", 0, 10)
		TNT1 A 0 A_SpawnItem("DeadImp_Half")
		TNT1 A 0 A_NoBlocking
		Stop
  }}		  


ACTOR StompedImp: impfacesorapedomgthisiscruel
{Health 200 States{Spawn:
        FTYI Z -1
        Stop}}



Actor DeadImp_NoStomach: DeadImp
{Health 200 States{Spawn:
	    IMPC I -1
        Stop    
       Death:
			TNT1 A 0 A_NoBlocking
			TNT1 A 0 A_SpawnItem("ImpHeadExplode", 0, 10)
			TNT1 A 0 A_SpawnItem("DeadImp_NoHead")
			Stop}}



Actor DeadImp_NoStomachNoHead: DeadImp
{Health 200 States{Spawn:
	    IMPC L -1
        Stop    
       Death:
			TNT1 A 0 A_NoBlocking
			TNT1 A 0 A_SpawnItem("ImpHeadExplode", 0, 10)
			TNT1 A 0 A_SpawnItem("DeadImp_NoHead")
			Stop}}
		
		
Actor DeadImp_BaronFatality: DeadImp
{
-SHOOTABLE
Health 200 States{Spawn:
	    3HF2 K -1
        Stop }}		


Actor ImpMessyCorpse: CurbstompedMarine
{Health 200 States{Spawn:
	    FTBI H -1
        Stop    
       Death:
			TNT1 A 0 A_NoBlocking
			TNT1 AA 0 A_CustomMissile ("XDeathImpArm", 5, 0, random (0, 360), 2, random (0, 160))
			TNT1 AA 0 A_CustomMissile ("XDeathImpLeg", 5, 0, random (0, 360), 2, random (0, 160))
			TNT1 AA 0 A_SpawnItem("MeatDeathSmall", 0, 10)
			TNT1 A 0 A_SpawnItem("DeadImp_NoHead")
			Stop}}
		
		
Actor DeadImpBloodLoss: CurbstompedMarine
{Health 200 States{Spawn:
	    TROD J -1
        Stop    
       Death:
		TNT1 A 0 A_SpawnItem("RipImp", 0, 10)
		TNT1 A 0 A_SpawnItem("MeatDeathSmall", 0, 10)
		TNT1 A 0 A_SpawnItem("DeadImp_Half")
		TNT1 A 0 A_NoBlocking
		Stop
		}}		



Actor DeadImp_Slumped: ZombiemanTorso
{
+NOPAIN
+NOBLOCKMONST
Health 200
DamageFactor "Head", 15.0
Height 22
Radius 8
States{Spawn:
		TNT1 A 0
		TNT1 A 0 A_Recoil(6)
		BR94 A 6
		TNT1 A 0 A_JumpIf(momx < 0, "LayDown")
		TNT1 A 0 A_JumpIf(momy < 0, "LayDown")
		TNT1 A 0 A_JumpIf(momx > 0, "LayDown")
		TNT1 A 0 A_JumpIf(momy > 0, "LayDown")
		TNT1 A 0 A_SpawnItemEx("HeadshotTarget20", 0, 0, 22)
		BR94 A 16
        Loop  
	LayDown:
	TNT1 A 0 A_NoBlocking
	TNT1 A 0 A_SpawnItem("DeadImp")
	Stop
	XDeath:
	Death.Explosives:
	Death.ExplosiveImpact:
		TNT1 A 0 A_NoBlocking
		TNT1 A 0 A_SpawnItem("ImpXDeath")
		Stop	
	
	Death.Head:
		TNT1 A 0 A_NoBlocking
		TNT1 A 0 A_SpawnItemEx("ImpHeadExplode", 0, 0, 22)
		TNT1 A 0 A_SpawnItem("DeadImp_Slumped_NoHead")
		Stop
		
	Death:
	    TNT1 A 0 A_NoBlocking
		TNT1 AAA 0 A_CustomMissile ("Guts", 32, 0, random (150, 210), 2, random (0, 40))
		TNT1 AAA 0 A_CustomMissile ("XDeath1", 32, 0, random (150, 210), 2, random (0, 40))
		TNT1 AAA 0 A_CustomMissile ("Xdeath3", 16, 0, random (170, 190), 2, random (0, 40))
		TNT1 AAAA 0 A_CustomMissile ("Brutal_FlyingBlood", 32, 0, random (170, 190), 2, random (0, 40))
		TNT1 AAAA 0 A_CustomMissile ("Brutal_FlyingBloodFaster", 32, 0, random (170, 190), 2, random (0, 40))
		TNT1 AAAA 0 A_CustomMissile ("Brutal_FlyingBloodMuchFaster", 32, 0, random (170, 190), 2, random (0, 40))
		TNT1 AAAA 0 A_CustomMissile ("SuperWallRedBlood", 32, 0, random (170, 190), 2, random (0, 40))
		TNT1 AAA 0 A_CustomMissile ("BloodMistBig", 40, 0, random (0, 360), 2, random (30, 90))
		TNT1 AA 0 A_CustomMissile ("XDeathImpArm", 40, 0, random (0, 360), 2, random (30, 90))
		TNT1 A 0 A_SpawnItemEx("ImpHeadExplode", 0, 0, 22)
		//TNT1 A 0 A_SpawnItem("DeadImpJustLegsAreLeft")
		Stop
		}}
		
		
Actor DeadImp_Slumped_NoHead: ZombiemanTorso
{
+NOPAIN
+NOBLOCKMONST
Height 22
States{Spawn:
		TNT1 A 0
		BR94 B 100
        Loop  
	XDeath:
	Death.Explosives:
	Death.ExplosiveImpact:
		TNT1 A 0 A_NoBlocking
		TNT1 A 0 A_SpawnItem("ImpXDeath")
		Stop	
	Death:
	    TNT1 A 0 A_NoBlocking
		TNT1 AAA 0 A_CustomMissile ("Guts", 32, 0, random (150, 210), 2, random (0, 40))
		TNT1 AAA 0 A_CustomMissile ("XDeath1", 32, 0, random (150, 210), 2, random (0, 40))
		TNT1 AAA 0 A_CustomMissile ("Xdeath3", 16, 0, random (170, 190), 2, random (0, 40))
		TNT1 AAAA 0 A_CustomMissile ("Brutal_FlyingBlood", 32, 0, random (170, 190), 2, random (0, 40))
		TNT1 AAAA 0 A_CustomMissile ("Brutal_FlyingBloodFaster", 32, 0, random (170, 190), 2, random (0, 40))
		TNT1 AAAA 0 A_CustomMissile ("Brutal_FlyingBloodMuchFaster", 32, 0, random (170, 190), 2, random (0, 40))
		TNT1 AAAA 0 A_CustomMissile ("SuperWallRedBlood", 32, 0, random (170, 190), 2, random (0, 40))
		TNT1 AAA 0 A_CustomMissile ("BloodMistBig", 40, 0, random (0, 360), 2, random (30, 90))
		TNT1 AA 0 A_CustomMissile ("XDeathImpArm", 40, 0, random (0, 360), 2, random (30, 90))
		//TNT1 A 0 A_SpawnItem("DeadImpJustLegsAreLeft")
		Stop	
		}}
		


Actor DeadImpTR06K: DeadImp
{States{Spawn:
	    TR06 K -1
        Stop 
		
		Death:
		TNT1 A 0 A_SpawnItem("RipImp", 0, 10)
		TNT1 A 0 A_SpawnItem("MeatDeathSmall", 0, 10)
		TNT1 A 0 A_SpawnItem("DeadImp_Half")
		TNT1 A 0 A_NoBlocking
		Stop
		}}
		
		

Actor DeadImpTR06V: DeadImp
{States{Spawn:
	    TR06 V -1
        Stop
		
		Death:
		TNT1 A 0 A_SpawnItem("RipImp", 0, 10)
		TNT1 A 0 A_SpawnItem("MeatDeathSmall", 0, 10)
		TNT1 A 0 A_SpawnItem("DeadImp_Half")
		TNT1 A 0 A_NoBlocking
		Stop}}	


Actor DeadImpTRO3E: DeadImp
{States{Spawn:
	    TRO3 E -1
        Stop 
		
		Death:
		TNT1 A 0 A_CustomMissile ("XDeathHalfImpUpperPart32", 32, 0, random (0, 360), 2, random (10, 60))
		TNT1 A 0 A_SpawnItem("MeatDeathSmall", 0, 10)
		TNT1 A 0 A_SpawnItem("DeadImp_Half")
		TNT1 A 0 A_NoBlocking
		Stop
		}}	


Actor DeadImpTRO4E: DeadImp
{States{Spawn:
	    TRO4 E -1
        Stop
		
		Death:
		TNT1 A 0 A_CustomMissile ("XDeathHalfImpUpperPart32", 32, 0, random (0, 360), 2, random (10, 60))
		TNT1 A 0 A_SpawnItem("MeatDeathSmall", 0, 10)
		TNT1 A 0 A_SpawnItem("DeadImp_Half")
		TNT1 A 0 A_NoBlocking
		Stop}}	


Actor DeadImpIZD1H: DeadImp_Half
{States{Spawn:
	    IZD1 H -1
        Stop }}	


Actor DeadImpID17G: DeadImp
{States{Spawn:
	    ID17 G -1
        Stop
		
		Death:
		TNT1 A 0 A_CustomMissile ("XDeathHalfImpUpperPart32", 32, 0, random (0, 360), 2, random (10, 60))
		TNT1 A 0 A_SpawnItem("MeatDeathSmall", 0, 10)
		TNT1 A 0 A_CustomMissile ("XDeathImpLeg", 5, 0, random (0, 360), 2, random (0, 160))
		TNT1 A 0 A_SpawnItem("RipGuts", 0, 10)
		TNT1 A 0 A_NoBlocking
		Stop}}	
		
		

Actor DeadImpIZD3D: DeadImp
{States{Spawn:
	    IZD3 D -1
        Stop
		
		Death:
		TNT1 A 0 A_CustomMissile ("XDeathHalfImpUpperPart32", 32, 0, random (0, 360), 2, random (10, 60))
		TNT1 A 0 A_SpawnItem("MeatDeathSmall", 0, 10)
		TNT1 AA 0 A_CustomMissile ("XDeathImpLeg", 5, 0, random (0, 360), 2, random (0, 160))
		TNT1 A 0 A_SpawnItem("RipGuts", 0, 10)
		TNT1 A 0 A_NoBlocking
		Stop}}			

