//===========================================================================
//
// Imp Variants
//
//===========================================================================


ACTOR Imp3 : Imp
{
	Game Doom
    Scale 1.04
	SpawnID 5
	Health 117
	Radius 16
	Height 48
	Mass 100
    GibHealth 35
	damagefactor "Shotgun", 1.0
	DamageFactor "Head", 2.0
	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", 500.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:
		TRO5 ML 8
		TRO5 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:
		TRO5 A 1 //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:	
        TRO5 A 0
		TNT1 A 0 A_SpawnItem("HeadshotTarget10", 18, 48, 0)
		TNT1 A 0 A_CheckSight("Stand2")
		//TNT1 A 0 A_SpawnItem ("LegTarget100", 10)
		TRO5 AB 6 A_Look //tros
		Loop
	Stand2:
		TRO5 AB 10 A_Look //tros
		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)
		TRO5 A 10 A_Look //tros
        TNT1 A 0 A_SpawnItem ("HeadshotTarget10", 18, 48,0)
		TRO5 B 10 A_Look //tros
		TNT1 A 0 A_SpawnItem ("HeadshotTarget10", 18, 48,0)
		TRO5 A 10 A_Look //tros
		TNT1 A 0 A_SetAngle(angle - 40)
		TNT1 A 0 A_SpawnItem ("HeadshotTarget10", 18, 48,0)
		TRO5 A 10 A_Look //tros
        TNT1 A 0 A_SpawnItem ("HeadshotTarget10", 18, 48,0)
		TRO5 B 10 A_Look
		TNT1 A 0 A_SpawnItem ("HeadshotTarget10", 18, 48,0)
		TRO5 A 10 A_Look
		TNT1 A 0 A_SetAngle(angle + 40)
        TNT1 A 0 A_SpawnItem ("HeadshotTarget10", 18, 48,0)
		TRO5 B 10 A_Look
		TNT1 A 0 A_SpawnItem ("HeadshotTarget10", 18, 48,0)
		TRO5 A 10 A_Look
        TNT1 A 0 A_SpawnItem ("HeadshotTarget10", 18, 48,0)
		TRO5 B 10 A_Look
		
	LookingForPlayer2:	
		TRO5 DD 0 A_Wander
		TRO5 A 2 A_Look
		TRO5 DD 0 A_Wander
		TRO5 A 2 A_Look
		TNT1 A 0 A_SpawnItem("HeadshotTarget6", 18, 48, 0)
		
		TRO5 DD 0 A_Wander
		TRO5 B 3 A_Look
		TRO5 DD 0 A_Wander
		TRO5 B 3 A_Look
		TNT1 A 0 A_SpawnItem("HeadshotTarget6", 18, 48, 0)
		
		TRO5 CC 0 A_Wander
		TRO5 C 3 A_Look
		TRO5 CC 0 A_Wander
		TRO5 C 3 A_Look
		TNT1 A 0 A_SpawnItem("HeadshotTarget6", 18, 48, 0)
		
		TRO5 DD 0 A_Wander
		TRO5 D 3 A_Look
		TRO5 DD 0 A_Wander
		TRO5 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:
	TRO5 A 1 //tros
	TNT1 A 0 A_TakeInventory("EnemyMemory", 15)
	TNT1 A 0 A_Jump(128, "SeeContinue")
	TNT1 A 0 A_SpawnItem("HeadshotTarget4", 12, 42,0)
	TRO5 A 2 A_faceTarget //TROT
	TRO5 B 2 //TROT
	TRO5 C 2 //TROT
	Goto SeeContinue
		
	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)
		TRO5 AAA 2 A_Chase
		TNT1 A 0 A_SpawnItemEx("HeadshotTarget6", 18, 0, 48)
		TNT1 A 0 A_SpawnItemEx ("LegTargetBase", 16, 0, 0)
		TRO5 BBB 2 A_Chase
		TNT1 A 0 A_SpawnItemEx("HeadshotTarget6", 18, 0, 48)
		TNT1 A 0 A_SpawnItemEx ("LegTargetBase", 16, 0, 0)
		TRO5 CCC 2 A_Chase
		TNT1 A 0 A_SpawnItemEx("HeadshotTarget6", 18, 0, 48)
		TNT1 A 0 A_SpawnItemEx ("LegTargetBase", 16, 0, 0)
		TRO5 DDD 2 A_Chase
		Loop
	
//CeilingCrawling
	CeilingJump:
		TNT1 A 0 A_JumpIf(CallACS("GetActorZDist") <= 120, 2)
		TNT1 AAA 0
		TNT1 A 0 A_JumpIf(CallACS("IsThisSky") == 1, "SeeContinue")
		TNT1 A 0 A_PlaySound("imp/sight",6)
		1M40 A 6
		TNT1 A 0 A_GiveInventory ("IsJumping")
		TNT1 A 0 ThrustThingZ(0,50,0,1)
		2M40 AAAA 1 A_CheckCeiling("CeilingLatch")
		TNT1 A 0 ThrustThingZ(0,45,0,1)
		2M40 BBBBCCCC 1 A_CheckCeiling("CeilingLatch")
		TNT1 A 0 ThrustThingZ(0,45,0,1)
		2M40 DDDDEEEE 1 A_CheckCeiling("CeilingLatch")
		TNT1 A 0 ThrustThingZ(0,45,0,1)
		2M40 FFFFGGGG 1 A_CheckCeiling("CeilingLatch")
		1M40 EEEEEEEEEEEEEEE 1 A_CheckFloor("SeeContinue")
		TNT1 A 0 A_TakeInventory ("IsJumping")
		Goto SeeContinue
	
	CeilingLatch:
		TNT1 A 0 A_ChangeFlag("NOGRAVITY", 1)
		TNT1 A 0 A_ChangeFlag("THRUSPECIES", 1)
//		TNT1 A 0 A_ChangeFlag("CEILINGHUGGER", 1)
		TNT1 A 0 A_ChangeFlag("NOVERTICALMELEERANGE", 1)
		TNT1 A 0 A_GiveInventory ("ImpOnCeiling", 1)
		2M40 HHHHHHHH 1 ThrustThingZ(0,500,0,1)
		Goto CeilingCrawl
	
	CeilingCrawl:
		TNT1 A 0 A_JumpIfInventory("Fatality_Marine", 1, "FatalityMarine")
        TNT1 A 0 A_SpawnItemEx("FootStep", 0, 0, 10, 0, 0)
        TNT1 A 0 A_JumpIf(waterlevel == 2, "Swim")
		TNT1 A 0 A_JumpIf(waterlevel == 3, "Swim")
		TNT1 A 0 A_SpawnItem("HeadshotTarget4", 0, 48,0)
		TNT1 A 0 A_SpawnItem ("LegTargetBase", 10)
		TNT1 A 0 A_JumpIf(CallACS("IsThisSky") == 1, "CeilingPounce")
		//TNT1 A 0 A_JumpIf(momz != 0, "CeilingPounce")
		TNT1 A 0 ThrustThingZ(0,500,0,1)
		2M40 II 2 A_Chase("CeilingPounce", "CeilingMissile")
		//ContinueCeilingCrawl1:
		TNT1 A 0 A_Recoil(-1)
		TNT1 A 0 A_SpawnItem("HeadshotTarget4", 0, 48,0)
		TNT1 A 0 A_SpawnItem ("LegTargetBase", 10)
		TNT1 A 0 ThrustThingZ(0,500,0,1)
		2M40 II 2 A_Chase("CeilingPounce", "CeilingMissile")
		TNT1 A 0 A_JumpIf(momz != 0, "CeilingPounce")
		TNT1 A 0 A_PlaySound("flesh/step",4)
        TNT1 A 0 A_TakeInventory("SKImp", 1)
		//ContinueCeilingCrawl2:
		TNT1 A 0 A_SpawnItem("HeadshotTarget4", 0, 48,0)
		TNT1 A 0 A_SpawnItem ("LegTargetBase", 10)
		TNT1 A 0 ThrustThingZ(0,500,0,1)
		2M40 JJ 2 A_Chase("CeilingPounce", "CeilingMissile")
		//ContinueCeilingCrawl3:
		TNT1 A 0 A_SpawnItem("HeadshotTarget4", 0, 48,0)
		TNT1 A 0 A_SpawnItem ("LegTargetBase", 10)
		TNT1 A 0 ThrustThingZ(0,500,0,1)
		2M40 JJ 2 A_Chase("CeilingPounce", "CeilingMissile")
		TNT1 A 0 A_PlaySound("flesh/step",4)
		TNT1 A 0 
		TNT1 A 0 A_JumpIf(CallACS("IsThisSky") == 1, "CeilingPounce")
		TNT1 A 0 A_JumpIf(momz != 0, "CeilingPounce")
		//ContinueCeilingCrawl4:
		TNT1 A 0 A_SpawnItem("HeadshotTarget4", 0, 48,0)
		TNT1 A 0 A_SpawnItem ("LegTargetBase", 10)
		TNT1 A 0 ThrustThingZ(0,500,0,1)
		2M40 KK 2 A_Chase("CeilingPounce", "CeilingMissile")
		//ContinueCeilingCrawl5:
		TNT1 A 0 A_SpawnItem("HeadshotTarget4", 0, 48,0)
		TNT1 A 0 A_SpawnItem ("LegTargetBase", 10)
		TNT1 A 0 ThrustThingZ(0,500,0,1)
		2M40 KK 2 A_Chase("CeilingPounce", "CeilingMissile")
		TNT1 A 0 A_PlaySound("flesh/step",4)
		TNT1 A 0 A_JumpIf(CallACS("IsThisSky") == 1, "CeilingPounce")
		TNT1 A 0 A_JumpIf(momz != 0, "CeilingPounce")
		//ContinueCeilingCrawl6:
		TNT1 A 0 A_SpawnItem("HeadshotTarget4", 0, 48,0)
		TNT1 A 0 A_SpawnItem ("LegTargetBase", 10)
		TNT1 A 0 ThrustThingZ(0,500,0,1)
		2M40 HH 2 A_Chase("CeilingPounce", "CeilingMissile")
		//ContinueCeilingCrawl7:
		TNT1 A 0 A_SpawnItem("HeadshotTarget4", 0, 48,0)
		TNT1 A 0 A_SpawnItem ("LegTargetBase", 10)
		TNT1 A 0 ThrustThingZ(0,500,0,1)
		2M40 HH 2 A_Chase("CeilingPounce", "MaybeCeilingPounce")
		TNT1 A 0 A_PlaySound("flesh/step",4)
		TNT1 A 0 A_JumpIf(CallACS("IsThisSky") == 1, "CeilingPounce")
		TNT1 A 0 A_JumpIf(momz != 0, "CeilingPounce")
		TNT1 A 0 A_JumpIfTargetInLOS(1)
		Goto CeilingDrop
		TNT1 A 0
		TNT1 A 0 A_Jump(224, 3)
		TNT1 A 0 A_JumpIfCloser(1200, "CeilingDrop")
		TNT1 AAAAA 0 
		Loop
		
	CeilingDrop:
		TNT1 AAA 0
		TNT1 A 0 A_TakeInventory ("ImpOnCeiling")
		TNT1 A 0 A_ChangeFlag("NOGRAVITY", 0)//CEILINGHUGGER
		TNT1 A 0 A_ChangeFlag("CEILINGHUGGER", 0)
		2M40 DCBA 1 A_FaceTarget
		
	CeilingDropping:
		TROT F 1 A_JumpIf (momz == 0, "CeilingLanding")
		loop
		
	CeilingLanding:
		TNT1 A 0 A_PlaySound("flesh/step",4)
		TROT GHCD 5 A_FaceTarget
		Goto SeeContinue
		
	CeilingMissile:
		TNT1 D 0 A_SpawnItem("HeadshotTarget23", 0, 48,0)
		TNT1 A 0 A_SpawnItem ("LegTarget30", 10)
		TNT1 A 0 ThrustThingZ(0,500,0,1)
		2M40 L 4 A_FaceTarget
        TNT1 A 0 A_JumpIfCloser(150, "CeilingPounce")
		TNT1 A 0 A_Playsound ("IMPCHARG")
        TNT1 A 0 A_CustomMissile ("SmallFlameTrails", 25, -30, random (0, 40), 2, random (0, 160))
        TNT1 A 0 A_CustomMissile ("ImBallGettingReady", 25, -30, random (0, 140), 2, random (0, 160))
		2M40 L 2 A_FaceTarget
		TNT1 A 0 A_CustomMissile ("SmallFlameTrails", 25, -30, random (0, 40), 2, random (0, 160))
        TNT1 A 0 A_CustomMissile ("ImBallGettingReady", 25, -30, random (0, 140), 2, random (0, 160))
		TNT1 A 0 ThrustThingZ(0,500,0,1)
		2M40 L 2 A_FaceTarget
		TNT1 A 0 A_SpawnItem ("LegTargetBase", 10)
		TNT1 A 0 A_CustomMissile ("SmallFlameTrails", 25, -30, random (0, 40), 2, random (0, 160))
        TNT1 A 0 A_CustomMissile ("ImBallGettingReady", 25, -30, random (0, 140), 2, random (0, 160))
		TNT1 A 0 ThrustThingZ(0,500,0,1)
		2M40 L 2 A_FaceTarget
		TNT1 A 0 A_SpawnItem ("LegTargetBase", 10)
		TNT1 D 0 A_SpawnItem("HeadshotTarget23", 0, 48,0)
		TNT1 A 0 A_CustomMissile ("SmallFlameTrails", 25, -30, random (0, 40), 2, random (0, 160))
        TNT1 A 0 A_CustomMissile ("ImBallGettingReady", 25, -30, random (0, 140), 2, random (0, 160))
		TNT1 A 0 ThrustThingZ(0,500,0,1)
		2M40 L 2 A_FaceTarget
		TNT1 A 0 A_SpawnItem ("LegTargetBase", 10)
		TNT1 D 0 A_SpawnItem("HeadshotTarget23", 0, 48,0)
		TNT1 A 0 A_CustomMissile ("SmallFlameTrails", 25, -30, random (0, 40), 2, random (0, 160))
        TNT1 A 0 A_CustomMissile ("ImBallGettingReady", 25, -30, random (0, 140), 2, random (0, 160))
		TNT1 A 0 ThrustThingZ(0,500,0,1)
		2M40 L 2 A_FaceTarget
		TNT1 A 0 A_SpawnItem ("LegTargetBase", 10)
		TNT1 D 0 A_SpawnItem("HeadshotTarget23", 0, 48,0)
		TNT1 A 0 A_CustomMissile ("SmallFlameTrails", 25, -30, random (0, 40), 2, random (0, 160))
        TNT1 A 0 A_CustomMissile ("ImBallGettingReady", 25, -30, random (0, 140), 2, random (0, 160))
		TNT1 A 0 ThrustThingZ(0,500,0,1)
		2M40 M 2 A_FaceTarget
		TNT1 D 0 A_SpawnItem("HeadshotTarget10", 0, 48,0)
		TNT1 A 0 A_SpawnItem ("LegTargetBase", 10)
		TNT1 A 0 ThrustThingZ(0,500,0,1)
		2M40 N 6 A_CustomMissile("FireBall_", 22, 0, 0, 0) 
		TNT1 A 0 ThrustThingZ(0,500,0,1)
		2M40 M 4
		Goto CeilingCrawl
		
	MaybeCeilingPounce:
		TNT1 A 0 A_Jump(28, 3)
		Goto CeilingCrawl
		
	CeilingPounce:
		TNT1 AAA 0
		TNT1 A 0 A_TakeInventory ("ImpOnCeiling")
		TNT1 A 0 A_ChangeFlag("NOGRAVITY", 0)//CEILINGHUGGER
		TNT1 A 0 A_ChangeFlag("CEILINGHUGGER", 0)
		TNT1 A 0 A_ChangeFlag("THRUSPECIES", 0)
		TNT1 A 0 A_Recoil (-18)
		TNT1 A 0 A_FaceTarget
		TNT1 A 0 A_PlaySound("weapons/fistwhoosh")
		TNT1 A 0 A_CustomMissile("ImpAttack2",10,0,0,0)
		2M40 CDEFG 4 A_FaceTarget
		TNT1 A 0 A_CustomMissile("ImpAttack2",10,0,0,0)
		1M40 EEE 1 A_CustomMissile("ImpAttack2",10,0,0,0)
		TNT1 A 0 A_TakeInventory ("IsJumping")
		TNT1 A 0 A_Jump(24, 3)
		1M40 A 6
		Goto SeeContinue
		TNT1 AAA 0 
		Goto Melee+1
	
		SeeContinue:
        TNT1 A 0 A_JumpIfInventory("Fatality_Marine", 1, "FatalityMarine")
		TNT1 A 0 A_JumpIf(waterlevel == 2, "Swim")
		TNT1 A 0 A_JumpIf(waterlevel == 3, "Swim")
		TNT1 A 0 A_SpawnItem("HeadshotTarget4", 0, 48,0)
		TNT1 A 0 A_JumpIfInventory("EnemyMemory", 25, "ForgetTarget")
		TNT1 A 0 A_GiveInventory("EnemyMemory", 1)
		TNT1 A 0 A_SpawnItem ("LegTargetBase", 10)
		TRO5 AA 2 A_Chase
		TNT1 A 0 A_Recoil(-1)
		TNT1 A 0 A_SpawnItem("HeadshotTarget4", 0, 48,0)
		TNT1 A 0 A_SpawnItem ("LegTargetBase", 10)
		TRO5 AA 2 A_Chase
        TNT1 A 0 A_TakeInventory("SKImp", 1)
		TNT1 A 0 A_SpawnItem("HeadshotTarget4", 0, 48,0)
		TNT1 A 0 A_SpawnItem ("LegTargetBase", 10)
		TRO5 BB 2 A_Chase
		TNT1 A 0 A_SpawnItem("HeadshotTarget4", 0, 48,0)
		TNT1 A 0 A_SpawnItem ("LegTargetBase", 10)
		TRO5 BB 2 A_Chase	
		TNT1 A 0 A_SpawnItem("HeadshotTarget4", 0, 48,0)
		TNT1 A 0 A_SpawnItem ("LegTargetBase", 10)
		TRO5 CC 2 A_Chase
		TNT1 A 0 A_SpawnItem("HeadshotTarget4", 0, 48,0)
		TNT1 A 0 A_SpawnItem ("LegTargetBase", 10)
		TRO5 CC 2 A_Chase
		TNT1 A 0 A_SpawnItem("HeadshotTarget4", 0, 48,0)
		TNT1 A 0 A_SpawnItem ("LegTargetBase", 10)
		TRO5 DD 2 A_Chase
		TNT1 A 0 A_SpawnItem("HeadshotTarget4", 0, 48,0)
		TNT1 A 0 A_SpawnItem ("LegTargetBase", 10)
		TRO5 DD 2 A_Chase
		TNT1 A 0 A_Jump(236, 3)
		TNT1 A 0 A_JumpIfCloser(800, "CeilingJump")
		TNT1 AAAAA 0 
		Loop
	
	LeapAttack:
		TRO5 b 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)
		TRO5 cD 3//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)
		TRO5 E 2 //TROT E 2 
		TRO5 F 2 //TROT f 2 
        TNT1 A 0 A_GiveInventory ("IsJumping")
        TNT1 A 0 A_FaceTarget
        TRO5 F 6 //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")
		TRO5 G 1//TROT G 1
		TRO5 GG 2 A_CustomMissile("ImpAttack2",10,0,0,2)
		TRO5 G 1 A_CustomMissile("ImpAttack2",50,0,0,2)
		TNT1 A 0 A_JumpIfInventory("Fatality_Marine", 1, "FatalityMarine")
		TRO5 ff 2 A_JumpIfInventory("Fatality_Marine", 1, "FatalityMarine") //TROT HH 2
		TNT1 A 0 A_JumpIfCloser(80, "Melee")
		Goto SeeContinue
	
	Melee:
	    TNT1 D 0 A_SpawnItem("HeadshotTarget4", 18, 48, 0)
        TRO5 E 4 A_FaceTarget
		TNT1 A 0 A_Recoil(-5)
		TNT1 D 0 A_SpawnItem("HeadshotTarget4", 18, 48, 0)
		TRO5 F 4 A_FaceTarget
		TNT1 A 0 A_TakeInventory("SKImp", 1)
		TNT1 D 0 A_SpawnItem("HeadshotTarget4", 18, 48, 0)
        TRO5 G 4 A_CustomMissile("ImpAttack",10,0,0,0)
		TNT1 D 0 A_SpawnItem("HeadshotTarget4", 18, 48, 0)
        TRO5 FE 4
		Goto SeeContinue

	Missile:
		TNT1 A 0 A_JumpIfInventory("ImpOnCeiling", 1, "CeilingMissile")
		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)
		TRO5 E 3 A_FaceTarget	
		TNT1 D 0 A_SpawnItemEx("HeadshotTarget10", 12, 7, 48)
		TNT1 A 0 A_SpawnItem ("LegTarget30", 10)
		TRO5 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))
		TRO5 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))
		TRO5 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))
		TRO5 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))
		TRO5 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))
		TRO5 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")
		TRO5 F 2 A_FaceTarget
		TNT1 D 0 A_SpawnItem("HeadshotTarget10", 18, 48, 0)
		TNT1 A 0 A_SpawnItem ("LegTargetBase", 10)
		TRO5 G 6 A_CustomMissile("FireBall_", 34, 0, 0, 0) 
		TRO5 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:
		TRO5 F 2 A_FaceTarget
		TNT1 D 0 A_SpawnItem("HeadshotTarget10", 18, 48, 0)
		TNT1 A 0 A_SpawnItem ("LegTarget30", 10)
		TRO5 G 6 A_CustomMissile("FireBall_", 34, 0, 0, 0) 
		TRO5 F 4
		TNT1 D 0 A_SpawnItem("HeadshotTarget10", 18, 48, 0)
		TNT1 A 0 A_SpawnItem ("LegTargetBase", 10)
		TRO5 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) 
		TRO5 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:
		TRO5 A 1
		TNT1 A 0 A_GiveToTarget("SKImp")
		TNT1 A 0 A_GiveToTarget("GoSpecial", 1)
		TNT1 A 0 A_GiveToTarget("GoFatality", 1)
		TRO5 A 1 A_Die("Stealthy")
		Stop
		Death.Stealthy:	
		TNT1 A 0 A_NoBlocking
		Stop
		
	Pain.Melee:
		TNT1 A 0 A_ChangeFlag("NOGRAVITY", 0)
		TNT1 A 0 A_ChangeFlag("THRUSPECIES", 0)
		TNT1 A 0 A_ChangeFlag("CEILINGHUGGER", 0)
		TNT1 D 0
		TRO5 A 4
		TNT1 A 0 A_JumpIfInventory ("SKImp", 1, "GotoStealthKill")
		TRO5 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_ChangeFlag("NOGRAVITY", 0)
		TNT1 A 0 A_ChangeFlag("THRUSPECIES", 0)
		TNT1 A 0 A_ChangeFlag("CEILINGHUGGER", 0)
		TNT1 A 0 A_JumpIfInventory("ImpOnCeiling", 1, "PainCanFallFromCeiling")
		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)
		TRO5 H 3
		TRO5 H 3 A_Pain
		Goto SeeContinue
	
	Pain.IsDown:
		TNT1 A 0
		TNT1 A 0 A_ChangeFlag("NOGRAVITY", 0)
		TNT1 A 0 A_ChangeFlag("THRUSPECIES", 0)
		TNT1 A 0 A_ChangeFlag("CEILINGHUGGER", 0)
	    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("NOGRAVITY", 0)
			TNT1 A 0 A_ChangeFlag("THRUSPECIES", 0)
			TNT1 A 0 A_ChangeFlag("CEILINGHUGGER", 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
		
	PainCanFallFromCeiling:
		TNT1 A 0 A_ChangeFlag("NOGRAVITY", 0)
		TNT1 A 0 A_ChangeFlag("THRUSPECIES", 0)
		TNT1 A 0 A_ChangeFlag("CEILINGHUGGER", 0)
		TNT1 A 0 A_TakeInventory ("ImpOnCeiling")
		
	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:
		TRO5 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")
		TRO5 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_ChangeFlag("NOGRAVITY", 0)
		TNT1 A 0 A_ChangeFlag("THRUSPECIES", 0)
		TNT1 A 0 A_ChangeFlag("CEILINGHUGGER", 0)
		TNT1 A 0 A_TakeInventory("SKImp", 1)
		TNT1 D 0 A_SpawnItem("HeadshotTarget4", 18, 48, 0)
		TRO5 H 1
		TRO5 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
		TRO5 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
		TRO5 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_ChangeFlag("NOGRAVITY", 0)
		TNT1 A 0 A_ChangeFlag("THRUSPECIES", 0)
		TNT1 A 0 A_ChangeFlag("CEILINGHUGGER", 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_ChangeFlag("NOGRAVITY", 0)
		TNT1 A 0 A_ChangeFlag("THRUSPECIES", 0)
		TNT1 A 0 A_ChangeFlag("CEILINGHUGGER", 0)
	    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_ChangeFlag("NOGRAVITY", 0)
		TNT1 A 0 A_ChangeFlag("THRUSPECIES", 0)
		TNT1 A 0 A_ChangeFlag("CEILINGHUGGER", 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_ChangeFlag("NOGRAVITY", 0)
		TNT1 A 0 A_ChangeFlag("THRUSPECIES", 0)
		TNT1 A 0 A_ChangeFlag("CEILINGHUGGER", 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_ChangeFlag("NOGRAVITY", 0)
		TNT1 A 0 A_ChangeFlag("THRUSPECIES", 0)
		TNT1 A 0 A_ChangeFlag("CEILINGHUGGER", 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_ChangeFlag("NOGRAVITY", 0)
		TNT1 A 0 A_ChangeFlag("THRUSPECIES", 0)
		TNT1 A 0 A_ChangeFlag("CEILINGHUGGER", 0)
         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_ChangeFlag("NOGRAVITY", 0)
		TNT1 A 0 A_ChangeFlag("THRUSPECIES", 0)
		TNT1 A 0 A_ChangeFlag("CEILINGHUGGER", 0)
		 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_ChangeFlag("NOGRAVITY", 0)
		TNT1 A 0 A_ChangeFlag("THRUSPECIES", 0)
		TNT1 A 0 A_ChangeFlag("CEILINGHUGGER", 0)
	    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_SpawnItemEx("HealthCrueltyBonus2", 0, 0, 4, random (-2.5, 2.5), random (-2.5, 2.5), 5)

		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))

TNT1 A 0 A_SpawnItemEx("HealthCrueltyBonus2", 0, 0, 4, random (-2.5, 2.5), random (-2.5, 2.5), 5)

		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_SpawnItemEx("HealthCrueltyBonus2", 0, 0, 4, random (-2.5, 2.5), random (-2.5, 2.5), 5)

		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 A_ChangeFlag("NOGRAVITY", 0)
		TNT1 A 0 A_ChangeFlag("THRUSPECIES", 0)
		TNT1 A 0 A_ChangeFlag("CEILINGHUGGER", 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_ChangeFlag("NOGRAVITY", 0)
		TNT1 A 0 A_ChangeFlag("THRUSPECIES", 0)
		TNT1 A 0 A_ChangeFlag("CEILINGHUGGER", 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_ChangeFlag("NOGRAVITY", 0)
		TNT1 A 0 A_ChangeFlag("THRUSPECIES", 0)
		TNT1 A 0 A_ChangeFlag("CEILINGHUGGER", 0)
		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_ChangeFlag("NOGRAVITY", 0)
		TNT1 A 0 A_ChangeFlag("THRUSPECIES", 0)
		TNT1 A 0 A_ChangeFlag("CEILINGHUGGER", 0)
		 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 A_ChangeFlag("NOGRAVITY", 0)
		TNT1 A 0 A_ChangeFlag("THRUSPECIES", 0)
		TNT1 A 0 A_ChangeFlag("CEILINGHUGGER", 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 A_ChangeFlag("NOGRAVITY", 0)
		TNT1 A 0 A_ChangeFlag("THRUSPECIES", 0)
		TNT1 A 0 A_ChangeFlag("CEILINGHUGGER", 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
		TRO5 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
	
	}
}

