//=================================================
// based on the Afrit by Nanami
// base sprites by Jimmy91 and Nanami
// decorate and sprite edit by zrrion the insect
//=================================================

Actor Cardinal 3120
{
//$Category Monsters
//$Sprite CARDA1
//$Title "Dark Cardinal"
Monster
Health 4500
Speed 10
Radius 24
Height 112
PainChance 50
Mass 1100
SeeSound "DarkCardinal/sight" //"cyber/sight"
ActiveSound "DarkCardinal/active" //"cyber/active"
PainSound "DarkCardinal/pain" //"brain/pain"
DeathSound "DarkCardinal/death" //"cyber/death"
+BOSS
+NORADIUSDMG
+NOGRAVITY
+FLOAT
+DONTFALL
+FLOATBOB
Bloodcolor "Green"
bloodtype "BaronBlood"//"Onegative"
Obituary "%o was blessed by the Dark Cardinal."  
damagefactor "RedPaint", 0
damagefactor "OrangePaint", 0
damagefactor "YellowPaint", 0
damagefactor "GreenPaint", 0
damagefactor "BluePaint", 0
damagefactor "PurplePaint", 0
damagefactor "WhitePaint", 0
damagefactor "BlackPaint", 0
  PainChance "ShotgunWeak", 5
States 
	{ 
	Spawn:
		CARD A 1 Bright A_Look
		CARD A 1 Bright A_SpawnItemEx ("BFGTrail", random(-8,8),random(-8,8),random(-8,-4), velx/2, vely/2, (velz/2)-random(1,2), 0, SXF_ABSOLUTEVELOCITY|SXF_NOCHECKPOSITION|SXF_CLIENTSIDE) 
		Loop
	See:
		CARD A 1 Bright A_Chase 
		CARD A 1 Bright A_SpawnItemEx ("BFGTrail", random(-2,2),random(-2,2),random(-8,-4), velx/2, vely/2, velz/2, 0, SXF_ABSOLUTEVELOCITY|SXF_NOCHECKPOSITION|SXF_CLIENTSIDE) 
		CARD A 1 Bright A_Chase 
		CARD A 1 Bright A_SpawnItemEx ("BFGTrail", random(-2,2),random(-2,2),random(-8,-4), velx/2, vely/2, velz/2, 0, SXF_ABSOLUTEVELOCITY|SXF_NOCHECKPOSITION|SXF_CLIENTSIDE) 
		CARD B 1 Bright A_Chase 
		CARD B 1 Bright A_SpawnItemEx ("BFGTrail", random(-2,2),random(-2,2),random(-8,-4), velx/2, vely/2, velz/2, 0, SXF_ABSOLUTEVELOCITY|SXF_NOCHECKPOSITION|SXF_CLIENTSIDE) 
		CARD B 1 Bright A_Chase 
		CARD B 1 Bright A_SpawnItemEx ("BFGTrail", random(-2,2),random(-2,2),random(-8,-4), velx/2, vely/2, velz/2, 0, SXF_ABSOLUTEVELOCITY|SXF_NOCHECKPOSITION|SXF_CLIENTSIDE) 
		loop
	Missile:
		CARD A 0 A_jump(25,"GrenadeAttack")
		CARD A 0 A_jump(100,"PlasmaAttack")
		CARD C 4 Bright A_FaceTarget
		CARD B 0 A_SpawnItemEx ("BFGTrail", random(-2,2),random(-2,2),random(-8,-4), velx/2, vely/2, (velz/2)-random(1,2), 0, SXF_ABSOLUTEVELOCITY|SXF_NOCHECKPOSITION|SXF_CLIENTSIDE) 
		CARD D 5 Bright A_CustomMissile("CardinalRocket",42,-30,0)
		CARD B 0 A_SpawnItemEx ("BFGTrail", random(-2,2),random(-2,2),random(-8,-4), velx/2, vely/2, (velz/2)-random(1,2), 0, SXF_ABSOLUTEVELOCITY|SXF_NOCHECKPOSITION|SXF_CLIENTSIDE) 
		CARD C 4 Bright A_FaceTarget
		CARD B 0 A_SpawnItemEx ("BFGTrail", random(-2,2),random(-2,2),random(-8,-4), velx/2, vely/2, (velz/2)-random(1,2), 0, SXF_ABSOLUTEVELOCITY|SXF_NOCHECKPOSITION|SXF_CLIENTSIDE) 
		CARD D 5 Bright A_CustomMissile("CardinalRocket",42,-30,0)
		CARD B 0 A_SpawnItemEx ("BFGTrail", random(-2,2),random(-2,2),random(-8,-4), velx/2, vely/2, (velz/2)-random(1,2), 0, SXF_ABSOLUTEVELOCITY|SXF_NOCHECKPOSITION|SXF_CLIENTSIDE) 
		CARD C 4 Bright
		CARD B 0 A_SpawnItemEx ("BFGTrail", random(-2,2),random(-2,2),random(-8,-4), velx/2, vely/2, (velz/2)-random(1,2), 0, SXF_ABSOLUTEVELOCITY|SXF_NOCHECKPOSITION|SXF_CLIENTSIDE) 
		Goto See
	GrenadeAttack:
		CARD C 4 Bright A_FaceTarget
		CARD B 0 A_SpawnItemEx ("BFGTrail", random(-2,2),random(-2,2),random(-8,-4), velx/2, vely/2, (velz/2)-random(1,2), 0, SXF_ABSOLUTEVELOCITY|SXF_NOCHECKPOSITION|SXF_CLIENTSIDE) 
		CARD D 5 Bright A_CustomMissile("PainGrenade",42,-30,0)
		CARD B 0 A_SpawnItemEx ("BFGTrail", random(-2,2),random(-2,2),random(-8,-4), velx/2, vely/2, (velz/2)-random(1,2), 0, SXF_ABSOLUTEVELOCITY|SXF_NOCHECKPOSITION|SXF_CLIENTSIDE) 
		CARD C 4 Bright
		CARD B 0 A_SpawnItemEx ("BFGTrail", random(-2,2),random(-2,2),random(-8,-4), velx/2, vely/2, (velz/2)-random(1,2), 0, SXF_ABSOLUTEVELOCITY|SXF_NOCHECKPOSITION|SXF_CLIENTSIDE) 
		Goto See
	PlasmaAttack:
		CARD C 4 Bright A_FaceTarget
		CARD B 0 A_SpawnItemEx ("BFGTrail", random(-2,2),random(-2,2),random(-8,-4), velx/2, vely/2, (velz/2)-random(1,2), 0, SXF_ABSOLUTEVELOCITY|SXF_NOCHECKPOSITION|SXF_CLIENTSIDE) 
		CARD D 5 Bright A_CustomMissile("CardinalPlasma",42,-30,0)
		CARD B 0 A_SpawnItemEx ("BFGTrail", random(-2,2),random(-2,2),random(-8,-4), velx/2, vely/2, (velz/2)-random(1,2), 0, SXF_ABSOLUTEVELOCITY|SXF_NOCHECKPOSITION|SXF_CLIENTSIDE) 
		CARD C 4 Bright A_FaceTarget
		CARD B 0 A_SpawnItemEx ("BFGTrail", random(-2,2),random(-2,2),random(-8,-4), velx/2, vely/2, (velz/2)-random(1,2), 0, SXF_ABSOLUTEVELOCITY|SXF_NOCHECKPOSITION|SXF_CLIENTSIDE) 
		CARD D 5 Bright A_CustomMissile("CardinalPlasma",42,-30,0)
		CARD B 0 A_SpawnItemEx ("BFGTrail", random(-2,2),random(-2,2),random(-8,-4), velx/2, vely/2, (velz/2)-random(1,2), 0, SXF_ABSOLUTEVELOCITY|SXF_NOCHECKPOSITION|SXF_CLIENTSIDE) 
		CARD C 4 Bright A_FaceTarget
		CARD B 0 A_SpawnItemEx ("BFGTrail", random(-2,2),random(-2,2),random(-8,-4), velx/2, vely/2, (velz/2)-random(1,2), 0, SXF_ABSOLUTEVELOCITY|SXF_NOCHECKPOSITION|SXF_CLIENTSIDE) 
		CARD D 5 Bright A_CustomMissile("CardinalPlasma",42,-30,0)
		CARD B 0 A_SpawnItemEx ("BFGTrail", random(-2,2),random(-2,2),random(-8,-4), velx/2, vely/2, (velz/2)-random(1,2), 0, SXF_ABSOLUTEVELOCITY|SXF_NOCHECKPOSITION|SXF_CLIENTSIDE) 
		CARD C 4 Bright A_FaceTarget
		CARD B 0 A_SpawnItemEx ("BFGTrail", random(-2,2),random(-2,2),random(-8,-4), velx/2, vely/2, (velz/2)-random(1,2), 0, SXF_ABSOLUTEVELOCITY|SXF_NOCHECKPOSITION|SXF_CLIENTSIDE) 
		CARD D 5 Bright A_CustomMissile("CardinalPlasma",42,-30,0)
		CARD B 0 A_SpawnItemEx ("BFGTrail", random(-2,2),random(-2,2),random(-8,-4), velx/2, vely/2, (velz/2)-random(1,2), 0, SXF_ABSOLUTEVELOCITY|SXF_NOCHECKPOSITION|SXF_CLIENTSIDE) 
		CARD C 4 Bright A_FaceTarget
		CARD B 0 A_SpawnItemEx ("BFGTrail", random(-2,2),random(-2,2),random(-8,-4), velx/2, vely/2, (velz/2)-random(1,2), 0, SXF_ABSOLUTEVELOCITY|SXF_NOCHECKPOSITION|SXF_CLIENTSIDE) 
		CARD D 5 Bright A_CustomMissile("CardinalPlasma",42,-30,0)
		CARD B 0 A_SpawnItemEx ("BFGTrail", random(-2,2),random(-2,2),random(-8,-4), velx/2, vely/2, (velz/2)-random(1,2), 0, SXF_ABSOLUTEVELOCITY|SXF_NOCHECKPOSITION|SXF_CLIENTSIDE) 
		CARD C 4 Bright A_FaceTarget
		CARD B 0 A_SpawnItemEx ("BFGTrail", random(-2,2),random(-2,2),random(-8,-4), velx/2, vely/2, (velz/2)-random(1,2), 0, SXF_ABSOLUTEVELOCITY|SXF_NOCHECKPOSITION|SXF_CLIENTSIDE) 
		CARD D 5 Bright A_CustomMissile("CardinalPlasma",42,-30,0)
		CARD B 0 A_SpawnItemEx ("BFGTrail", random(-2,2),random(-2,2),random(-8,-4), velx/2, vely/2, (velz/2)-random(1,2), 0, SXF_ABSOLUTEVELOCITY|SXF_NOCHECKPOSITION|SXF_CLIENTSIDE) 
		Goto See
	Pain: 
		CARD B 0 A_SpawnItemEx ("BFGTrail", random(-2,2),random(-2,2),random(-8,-4), velx/2, vely/2, (velz/2)-random(1,2), 0, SXF_ABSOLUTEVELOCITY|SXF_NOCHECKPOSITION|SXF_CLIENTSIDE) 
		CARD P 2 Bright A_Stop
		CARD P 0 A_custommissile("DeathBall",42,0,0,2,0)
		CARD P 0 A_custommissile("DeathBall",42,0,20,2,0)
		CARD P 0 A_custommissile("DeathBall",42,0,40,2,0)
		CARD P 0 A_custommissile("DeathBall",42,0,60,2,0)
		CARD P 0 A_custommissile("DeathBall",42,0,80,2,0)
		CARD P 0 A_custommissile("DeathBall",42,0,100,2,0)
		CARD P 0 A_custommissile("DeathBall",42,0,120,2,0)
		CARD P 0 A_custommissile("DeathBall",42,0,140,2,0)
		CARD P 0 A_custommissile("DeathBall",42,0,160,2,0)
		CARD P 0 A_custommissile("DeathBall",42,0,180,2,0)
		CARD P 0 A_custommissile("DeathBall",42,0,200,2,0)
		CARD P 0 A_custommissile("DeathBall",42,0,220,2,0)
		CARD P 0 A_custommissile("DeathBall",42,0,240,2,0)
		CARD P 0 A_custommissile("DeathBall",42,0,260,2,0)
		CARD P 0 A_custommissile("DeathBall",42,0,280,2,0)
		CARD P 0 A_custommissile("DeathBall",42,0,300,2,0)
		CARD P 0 A_custommissile("DeathBall",42,0,320,2,0)
		CARD P 0 A_custommissile("DeathBall",42,0,340,2,0)
		CARD B 0 Bright A_SpawnItemEx ("BFGTrail", random(-2,2),random(-2,2),random(-8,-4), velx/2, vely/2, velz/2, 0, SXF_ABSOLUTEVELOCITY|SXF_NOCHECKPOSITION|SXF_CLIENTSIDE) 
		CARD P 4 Bright A_Pain
		Goto See
	Death: 
		CARD E 0 BRIGHT A_Stop
		CARD E 8 Bright A_ChangeFlag("FLOATBOB",false)
		TNT1 A 0 bright A_SpawnItemEx("bfgflare", 0,0,0, 0,0,0, 0, 160)
		CARD F 8 Bright A_Scream
		BFE1 A 0 A_SpawnItemEx ("BFGEffectSpawner", 0, 0, 0, 0, 0, 0, 0, 160)
		CARD G 8 Bright A_NoBlocking
		NULL A 0 A_SpawnItemEx ("GreenParticleShroom", 0,0,0, 0,0,0, 0, 160) 
		CARD H 8 Bright A_Explode
		CARD IJKL 8 Bright
		Stop 
	} 
}
//====================
Actor CardinalRocket
{
Projectile
Radius 11
Height 8
Speed 20
Damage 24
+RANDOMIZE
+DEHEXPLOSION
+ROCKETTRAIL
damagetype "rocket"
SeeSound "weapons/rocklf"
DeathSound "weapons/rocklx"
States
	{
	Spawn:
		CROC AABB 1 bright A_SpawnItemEx ("PlasmaTrailGreen", random(-0.25,0.25), random(-0.25,0.25), random(-0.25,0.25), velx/random(3,5), vely/random(3,5), velz/random(3,5), 0, SXF_ABSOLUTEVELOCITY|SXF_NOCHECKPOSITION|SXF_CLIENTSIDE) 
		Loop
	Death:
		TNT1 A 0 bright A_SpawnItemEx("bfgflare", 0,0,0, 0,0,0, 0, 160)
		NULL A 0 A_SpawnItemEx ("GreenParticleSphere", 0,0,0, 0,0,0, 0, 160) 
		CROC C 8 Bright A_Explode
		CROC D 6 Bright
		CROC E 4 Bright
		Stop
	}
}
//====================
Actor CardinalPlasma  
{
Projectile
Radius 11
Height 8
Speed 20
Damage 16
+FLOATBOB
SeeSound "imp/attack"
DeathSound ""
States
	{
	Spawn:
		CRTA I 1 Bright A_SpawnItemEx("CPlasmaTail")
		Loop
	Death:
		TNT1 A 0 bright A_SpawnItemEx("bfgflare2", 0,0,0, 0,0,0, 0, 160)
		GPLE ABCDE 4 bright
		stop
	XDeath:
  	TNT1 A 0 A_PlaySoundEx("plasma/zap", soundslot6)
	NULL AAAAAAAA 0 A_SpawnItemEx ("PlasmaBallCrackleSpawner", 0,0,0, 0,0,0, 0, 160) 

    GPLE A 4 bright
	NULL A 0 A_SpawnItemEx ("CacodemonBallTrail1", random(-96,96),random(-96,96),random(-30,30), 0,0,0, 0, 160, 208) 
	NULL A 0 A_SpawnItemEx ("CacodemonBallTrail2", random(-96,96),random(-96,96),random(-30,30), 0,0,0, 0, 160, 208) 
	NULL A 0 A_SpawnItemEx ("CacodemonBallTrail3", random(-96,96),random(-96,96),random(-30,30), 0,0,0, 0, 160, 208) 
	NULL A 0 A_SpawnItemEx ("CacodemonBallTrail4", random(-96,96),random(-96,96),random(-30,30), 0,0,0, 0, 160, 208) 
    GPLE B 4 bright
	NULL A 0 A_SpawnItemEx ("CacodemonBallTrail1", random(-96,96),random(-96,96),random(-30,30), 0,0,0, 0, 160, 208) 
	NULL A 0 A_SpawnItemEx ("CacodemonBallTrail2", random(-96,96),random(-96,96),random(-30,30), 0,0,0, 0, 160, 208) 
	NULL A 0 A_SpawnItemEx ("CacodemonBallTrail3", random(-96,96),random(-96,96),random(-30,30), 0,0,0, 0, 160, 208) 
	NULL A 0 A_SpawnItemEx ("CacodemonBallTrail4", random(-96,96),random(-96,96),random(-30,30), 0,0,0, 0, 160, 208) 
    GPLE C 4 bright
	NULL A 0 A_SpawnItemEx ("CacodemonBallTrail1", random(-30,30),random(-30,30),random(-30,30), 0,0,0, 0, 160, 240) 
	NULL A 0 A_SpawnItemEx ("CacodemonBallTrail2", random(-30,30),random(-30,30),random(-30,30), 0,0,0, 0, 160, 240) 
	NULL A 0 A_SpawnItemEx ("CacodemonBallTrail3", random(-30,30),random(-30,30),random(-30,30), 0,0,0, 0, 160, 240) 
	NULL A 0 A_SpawnItemEx ("CacodemonBallTrail4", random(-30,30),random(-30,30),random(-30,30), 0,0,0, 0, 160, 240) 
    GPLE DE 4 bright
    stop
	}
}
//====================
Actor CPlasmaTail
{
+NOINTERACTION
+FLOATBOB
Renderstyle Translucent
States
	{
	Spawn:
    	TNT1 A 0
    	TNT1 A 0 Thing_ChangeTID (0, 1330) 
		CRTA IHGFEDCBABCDEFGHI 2 Bright A_fadeout(0.08)
		Stop
	}
}
//====================
Actor DeathBall : BaronBall
{
Damage 1
+SEEKERMISSILE 
Scale 0.8
SeeSound "DeathBall/spawn"
States
	{
	Spawn:
		BAL7 A 0 Bright A_Tracer
		BAL7 AABB 1 Bright A_SpawnItemEx("DBallTail")
		Loop
	Death:
    TNT1 A 0 bright A_SpawnItemEx("hectshotflare", 0,0,0, 0,0,0, 0, 160)
		BAL7 CDE 6 Bright
		Stop
	}
}
//====================
Actor DBallTail
{
+NOINTERACTION
RenderStyle Translucent
Alpha 0.9
Scale 0.6
States
	{
	Spawn:
    	TNT1 A 0
    	TNT1 A 0 Thing_ChangeTID (0, 1330) 
		BAL7 AABBAABB 2 Bright A_fadeout(0.1)
		Stop
	}
}
//====================
Actor PainGrenade
{
Projectile
Radius 11
Height 8
Speed 20
Damage 5
Bouncetype Doom
-NOGRAVITY
Translation "168:191=112:127","160:167=112:125"
SeeSound "PainGrenade/fire"
BounceSound "PainGrenade/bounce"
DeathSound "PainGrenade/explode"
States
	{
	Spawn:
		CEGG A 1 Bright A_SpawnItemEx("faintGhost1")
		Loop
	Death:
		TNT1 A 0 A_SetTranslucent(1.0,1)
		TNT1 A 0 A_NoGravity
		FIRE A 3 Bright
		FIRE B 3 Bright A_SpawnItemEx("Paingasm",0,0,0,0,0,0,0,SXF_SETMASTER|SXF_TRANSFERPOINTERS)
		FIRE CDEFGH 3 Bright
		Stop
	}
}
//====================
Actor Paingasm 10004
{
//$Category Realm667 Monsters
//$Sprite HEADA1
//$Title "Paingasm"
Monster
Health 500
Radius 31
Height 56
Mass 400
Speed 25
PainChance 128
Bloodcolor "Blue"
bloodtype "CacoBlood"//"Onegative"
+FLOAT
+NOGRAVITY
+DONTGIB
SeeSound "caco/sight"
PainSound "caco/pain"
DeathSound "caco/death"
ActiveSound "caco/active"
Obituary "%o was removed from life by a Paingasm."
HitObituary "%o's face got tore off by a Paingasm."
Translation "168:191=112:127"
RenderStyle Translucent
Alpha 0.5
States
	{
	Spawn:
		HEAD A 10 Bright A_Look
		Loop
	See:
		HEAD A 0 A_SetTranslucent(0.5,0)
		HEAD A 3 Bright A_Chase
		HEAD A 0 A_SpawnItemEx("faintGhost2")
		Loop
	Missile:
		HEAD B 0 A_SetTranslucent(1.0,0)
		HEAD BC 5 Bright A_FaceTarget
		HEAD D 5 Bright A_CustomMissile("PaingasmBall",24,0,0)
		Goto See
	Melee:
		HEAD D 0 A_SetTranslucent(1.0,0)
		HEAD D 0 A_PlaySound("Paingasm/chomp",7)
		HEAD DC 4 Bright A_FaceTarget
		HEAD B 4 Bright A_CustomMeleeAttack(4)
		HEAD E 8 Bright A_FaceTarget
		Goto See
	Pain:
		HEAD E 0 A_SetTranslucent(0.5,0)
		HEAD E 3 Bright
		HEAD E 3 Bright A_Pain
		HEAD F 6 Bright
		Goto See
	Death:
		HEAD G 0 A_SetTranslucent(0.5,0)
		
   HEAD G 4 A_SetSolid
   HEAD G 4 //A_SetShootable
   HEAD H 8 A_Scream
 Falling:
   HEAD H 1
    HEAD H 0 A_JumpIf(waterlevel == 3, "Crash")
    HEAD H 0 A_JumpIf(waterlevel == 2, "Crash")
    //HEAD H 0 A_JumpIf(waterlevel == 1, "Crash")
   Loop
 Crash:
   HEAD I 4 A_PlaySound ("cacodemon/splat")
   HEAD J 4
   HEAD K 2 A_NoBlocking
   HEAD K 1 A_UnsetSolid
   HEAD K 1 A_UnSetShootable
   HEAD L 1 A_SetFloorClip
   HEAD M 5
   HEAD N 6
   HEAD O 7
   HEAD P 8
   HEAD Q 1 A_FadeOut(0.01)
   wait
	}
}
//====================
Actor faintGhost1
{
+NOINTERACTION
Translation "168:191=112:127"
RenderStyle Translucent
Alpha 0.4
States
	{
	Spawn:
    	TNT1 A 0
		CEGG A 1 Bright A_fadeout(0.02)
		Loop
	}
}
//====================
Actor faintGhost2 : faintGhost1
{
States
	{
	Spawn:
    	TNT1 A 0
		HEAD A 1 Bright A_fadeout(0.02)
		Loop
	}
}
//====================
Actor PaingasmBall : BaronBall
{
Translation "112:127=192:207"
States
	{
	Spawn:
		BAL7 A 1 Bright
	NULL A 0 A_SpawnItemEx ("DarkImpBallTrail", 0, random(-2,2), random(-2,2), velx/random(3,5), vely/random(3,5), velz/random(3,5), 0, SXF_ABSOLUTEVELOCITY|SXF_NOCHECKPOSITION|SXF_CLIENTSIDE) 
	NULL A 0 A_SpawnItemEx ("DarkImpCrackleSpawner", 0, random(-1,1), random(-1,1), 0, 0, 0, 0, 160) 
		BAL7 A 1 Bright
	NULL A 0 A_SpawnItemEx ("DarkImpBallTrail", 0, random(-2,2), random(-2,2), velx/random(3,5), vely/random(3,5), velz/random(3,5), 0, SXF_ABSOLUTEVELOCITY|SXF_NOCHECKPOSITION|SXF_CLIENTSIDE) 
	NULL A 0 A_SpawnItemEx ("DarkImpCrackleSpawner", 0, random(-1,1), random(-1,1), 0, 0, 0, 0, 160) 
		BAL7 B 1 Bright
	NULL A 0 A_SpawnItemEx ("DarkImpBallTrail", 0, random(-2,2), random(-2,2), velx/random(3,5), vely/random(3,5), velz/random(3,5), 0, SXF_ABSOLUTEVELOCITY|SXF_NOCHECKPOSITION|SXF_CLIENTSIDE) 
	NULL A 0 A_SpawnItemEx ("DarkImpCrackleSpawner", 0, random(-1,1), random(-1,1), 0, 0, 0, 0, 160) 
		BAL7 B 1 Bright
	NULL A 0 A_SpawnItemEx ("DarkImpBallTrail", 0, random(-2,2), random(-2,2), velx/random(3,5), vely/random(3,5), velz/random(3,5), 0, SXF_ABSOLUTEVELOCITY|SXF_NOCHECKPOSITION|SXF_CLIENTSIDE) 
	NULL A 0 A_SpawnItemEx ("DarkImpCrackleSpawner", 0, random(-1,1), random(-1,1), 0, 0, 0, 0, 160) 
		Loop
	Death:
    TNT1 A 0 bright A_SpawnItemEx("blueflare", 0,0,0, 0,0,0, 0, 160)
		BAL7 CDE 6 Bright
		Stop
	}
}
//====================
