actor EmeraldCobra : BlackViper
{
	obituary "%o was gunned down by an Emerald Cobra."
	radius 15
	height 56
	speed 16
	bloodtype newbloodsplatter
	painsound "undeadhunter/pain"
	deathsound "undeadhunter/death"
	seesound "undeadhunter/activate"
	dropitem "chaingun" 256
	dropitem "lilchest" 20
	translation "5:5=126:126", "6:6=125:125", "80:111=112:124", "8:8=127:127"
	//translation "5:8=240:246", "107:111=200:207", "96:107=195:201"
	states
	{
	Missile:
		TNT1 A 0
		TNT1 A 0 A_JumpIfCloser(500, "GrenadeShot")
		TNT1 A 0 A_JumpIfCloser(700, "machinegunfire")
	snipershot:
		TNT1 A 0
		DEHU E 4 A_playsound ("blackviper/gunready",0,1,0,0.8)
		DEHU E 15 A_FaceTarget
		TNT1 A 0 a_playsound ("huntergunshot",CHAN_WEAPON,1,0,0.7)
		DEHU F 1 bright A_CustomBulletAttack (9, 0, 1, random(3,5), "CobraPuff", 0, CBAF_NORANDOM)
		DEHU E 2 
		TNT1 A 0 a_playsound ("huntergunshot",CHAN_WEAPON,1,0,0.7)
		DEHU F 1 bright A_CustomBulletAttack (9, 0, 1, random(3,5), "CobraPuff", 0, CBAF_NORANDOM)
		DEHU E 6 A_FaceTarget
		TNT1 A 0 a_playsound ("huntergunshot",CHAN_WEAPON,1,0,0.7)
		DEHU F 1 bright A_CustomBulletAttack (9, 0, 1, random(3,5), "CobraPuff", 0, CBAF_NORANDOM)
		DEHU E 2 
		TNT1 A 0 a_playsound ("huntergunshot",CHAN_WEAPON,1,0,0.7)
		DEHU F 1 bright A_CustomBulletAttack (9, 0, 1, random(3,5), "CobraPuff", 0, CBAF_NORANDOM)
		DEHU E 6 A_FaceTarget
		TNT1 A 0 a_playsound ("huntergunshot",CHAN_WEAPON,1,0,0.7)
		DEHU F 1 bright A_CustomBulletAttack (9, 0, 1, random(3,5), "CobraPuff", 0, CBAF_NORANDOM)
		DEHU E 2 
		TNT1 A 0 a_playsound ("huntergunshot",CHAN_WEAPON,1,0,0.7)
		DEHU F 1 bright A_CustomBulletAttack (9, 0, 1, random(3,5), "CobraPuff", 0, CBAF_NORANDOM)
		DEHU E 6 A_FaceTarget
		TNT1 A 0 a_playsound ("huntergunshot",CHAN_WEAPON,1,0,0.7)
		DEHU F 1 bright A_CustomBulletAttack (9, 0, 1, random(3,5), "CobraPuff", 0, CBAF_NORANDOM)
		DEHU E 2 
		TNT1 A 0 a_playsound ("huntergunshot",CHAN_WEAPON,1,0,0.7)
		DEHU F 1 bright A_CustomBulletAttack (9, 0, 1, random(3,5), "CobraPuff", 0, CBAF_NORANDOM)
		DEHU E 20

		DEHU E 15
		DEHU G 0 a_jump (120, "snipershot")    
		goto See
	GrenadeShot:
		DEHU E 8 A_playsound ("Cobra/Grenadeready",0,1,0,0.5)
		DEHU E 18 A_FaceTarget
		TNT1 A 0 a_playsound ("subweapons/earthshakershot")	
		DEHU F 2 bright a_custommissile ("CobraGrenade",40)
		DEHU E 3 
		DEHU E 10
		DEHU G 0 a_jump (80, "snipershot")    
		DEHU G 0 a_jump (100, "GrenadeShot")    
		goto See		
	machinegunfire:
		DEHU E 4 A_playsound ("blackviper/gunready",0,1,0,0.8)
		DEHU E 15 A_FaceTarget
		TNT1 A 0 a_playsound ("huntergunshot",CHAN_WEAPON)
		DEHU F 1 bright A_CustomBulletAttack (15, 0, 1, random(3,5), "CobraPuff", 0, CBAF_NORANDOM)
		DEHU E 2 
		TNT1 A 0 a_playsound ("huntergunshot",CHAN_WEAPON)
		DEHU F 1 bright A_CustomBulletAttack (15, 0, 1, random(3,5), "CobraPuff", 0, CBAF_NORANDOM)
		DEHU E 6 A_FaceTarget
		TNT1 A 0 a_playsound ("huntergunshot",CHAN_WEAPON)
		DEHU F 1 bright A_CustomBulletAttack (15, 0, 1, random(3,5), "CobraPuff", 0, CBAF_NORANDOM)
		DEHU E 2 
		TNT1 A 0 a_playsound ("huntergunshot",CHAN_WEAPON)
		DEHU F 1 bright A_CustomBulletAttack (15, 0, 1, random(3,5), "CobraPuff", 0, CBAF_NORANDOM)
		DEHU E 6 A_FaceTarget
		TNT1 A 0 a_playsound ("huntergunshot",CHAN_WEAPON)
		DEHU F 1 bright A_CustomBulletAttack (15, 0, 1, random(3,5), "CobraPuff", 0, CBAF_NORANDOM)
		DEHU E 2 
		TNT1 A 0 a_playsound ("huntergunshot",CHAN_WEAPON)
		DEHU F 1 bright A_CustomBulletAttack (15, 0, 1, random(3,5), "CobraPuff", 0, CBAF_NORANDOM)
		DEHU E 6 A_FaceTarget
		TNT1 A 0 a_playsound ("huntergunshot",CHAN_WEAPON)
		DEHU F 1 bright A_CustomBulletAttack (15, 0, 1, random(3,5), "CobraPuff", 0, CBAF_NORANDOM)
		DEHU E 2 
		TNT1 A 0 a_playsound ("huntergunshot",CHAN_WEAPON)
		DEHU F 1 bright A_CustomBulletAttack (15, 0, 1, random(3,5), "CobraPuff", 0, CBAF_NORANDOM)
		DEHU E 20
		DEHU G 0 a_jump (100, "machinegunfire")    
		goto see

	Death:
		DEHU H 1 A_Scream
		DEHU H 1 A_NoBlocking
		DEHU H 1 A_facetarget
		TNT1 A 0 thrustthingz (0,30,0,1)
		TNT1 A 0 ThrustThing(angle*256/360+128, 4, 0, 0)		
		DEHU I 5 
		DEHU J 5
		DEHU KLM 5
		TNT1 A 0 a_jump (8,"DarkPortal")
		DEHU N -1
		stop
	DarkPortal:
		TNT1 A 0
		DEHU N random(50,180) 
		TNT1 A 0 a_playsound ("Darkportal/form",0)
		DEHU N 3 Thing_SetTranslation(0, 4242)
		HWRP ABCD 1
		TNT1 A 1 a_spawnitemex ("WeakPortal")
		stop				
	XDeath:
		DEHU O 2 A_XScream
		DEHU P 2 A_PlaySound("undeadhunter/xdeath")
		DEHU Q 2 A_NoBlocking
		TNT1 A 0 a_spawnitem ("bigbloodsplatter")
		TNT1 AAAAAAAA 0 a_spawnitemex ("newbloodsplatter",0,0,24)       
		TNT1 AAA 0 a_spawnitemex("bonegib",0,0,0,random(-10,10),random(-10,10),10)
		DEHU RSTUV 5
		TNT1 A 0 a_jump (8,"GibbedDarkPortal")
		DEHU W -1
		stop
	GibbedDarkPortal:
		TNT1 A 0
		DEHU W random(50,180) 
		TNT1 A 0 a_playsound ("Darkportal/form",0)
		DEHU W 3 Thing_SetTranslation(0, 4242)
		HWRP ABCD 1
		TNT1 A 1 a_spawnitemex ("WeakPortal")
		stop				
	}
}
	

ACTOR CobraPuff : BulletPuff
{
	+NOBLOCKMAP
	+NOGRAVITY
	+ALLOWPARTICLES
	+RANDOMIZE
	+bright
	+puffonactors
	+alwayspuff
	RenderStyle Translucent
	Alpha 0.8
	scale 0.4
	VSpeed 0
	Mass 5
	States
	{
	Spawn:
		TNT1 A 0
		TNT1 A 0 a_playsound ("DoomSlayer/ReignStormHit",CHAN_BODY,0.70,0,1)
		SCBL BCD 2 bright
		Stop		
	Crash:
		TNT1 A 0
		TNT1 A 0 a_playsound ("DoomSlayer/ReignStormMiss",CHAN_BODY,0.80,0,1)
		SCBL BCD 2 bright
		Stop
	}
}

ACTOR CobraLaser : BulletPuff
{
	+NOBLOCKMAP
	+NOGRAVITY
	+ALLOWPARTICLES
	+RANDOMIZE
	+bright
	+puffonactors
	+alwayspuff
	+bloodlessimpact
	+painless
	RenderStyle Translucent
	Alpha 0.8
	scale 0.7
	VSpeed 0
	Mass 5
	States
	{
	Spawn:
		TNT1 A 0
		PTL1 A 2 bright
		Stop
	death:
		TNT1 A 1
		stop
	}
}

actor CobraLaserAim
{
	radius 3
	height 6
	speed .1
	Scale 0.5
	+nogravity
	+FLOORCLIP
	+bright
	+DONTSPLASH
	+NOTELEPORT
	+nointeraction
	states
	{
	spawn:
		PTL1 A 2 bright
		stop
	death:
		TNT1 A 1 
		stop
	}
}




ACTOR CobraSniperPuff : BulletPuff
{
	+NOBLOCKMAP
	+NOGRAVITY
	+ALLOWPARTICLES
	+RANDOMIZE
	+bright
	+puffonactors
	+alwayspuff
	RenderStyle Translucent
	Alpha 0.8
	scale 3
	VSpeed 0
	Mass 5
	decal KustamStaff
	States
	{
	Spawn:
		TNT1 A 0
		TNT1 A 0 a_playsound ("DoomSlayer/ReignStormHit",CHAN_BODY,0.70,0,1)
		SCBL BCD 2 bright
		Stop		
	Crash:
		TNT1 A 0
		TNT1 A 0 a_playsound ("DoomSlayer/ReignStormMiss",CHAN_BODY,0.80,0,1)
		SCBL BCD 2 bright
		Stop
	}
}


actor CobraGrenade
{
	+notimefreeze
	projectile
    +BLOODSPLATTER
	+FORCEXYBILLBOARD	
	+LOOKALLAROUND
	+THRUSPECIES
	+THRUGHOST
	species "enemyshot"
	radius 2
	speed 30
	gravity 0.60
	damage (30)
	Scale 1.5
	translation "167:191=96:111", "32:47=102:111"
	projectilekickback 3000
	states
	{
	spawn:
		TNT1 A 0
		TNT1 A 0 A_SpawnItemEx("CobraSmoke",frandom(-4,4),frandom(-4,4),frandom(-4,4))
		GBLT A 1 bright
		TNT1 A 0 A_SpawnItemEx("CobraSmoke",frandom(-4,4),frandom(-4,4),frandom(-4,4))
		GBLT A 1 bright
		TNT1 A 0 A_SpawnItemEx("CobraSmoke",frandom(-4,4),frandom(-4,4),frandom(-4,4))
		GBLT A 1 bright
		TNT1 A 0 A_SpawnItemEx("CobraSmoke",frandom(-4,4),frandom(-4,4),frandom(-4,4))
		GBLT A 1 bright
		TNT1 A 0 A_SpawnItemEx("CobraSmoke",frandom(-4,4),frandom(-4,4),frandom(-4,4))
		GBLT A 1 bright
		TNT1 A 0 A_SpawnItemEx("CobraSmoke",frandom(-4,4),frandom(-4,4),frandom(-4,4))
		GBLT A 1 bright
		TNT1 A 0 A_SpawnItemEx("CobraSmoke",frandom(-4,4),frandom(-4,4),frandom(-4,4))
		GBLT A 1 bright
		TNT1 A 0 A_SpawnItemEx("CobraSmoke",frandom(-4,4),frandom(-4,4),frandom(-4,4))
		GBLT A 1 bright
		TNT1 A 0 A_SpawnItemEx("CobraSmoke",frandom(-4,4),frandom(-4,4),frandom(-4,4))
		GBLT A 1 bright
		TNT1 A 0 A_SpawnItemEx("CobraSmoke",frandom(-4,4),frandom(-4,4),frandom(-4,4))
		GBLT A 1 bright
		TNT1 A 0 A_SpawnItemEx("CobraSmoke",frandom(-4,4),frandom(-4,4),frandom(-4,4))
		GBLT A 1 bright
		TNT1 A 0 a_changeflag ("NOGRAVITY",0)
		Goto falling
	Falling:
		TNT1 A 0 A_SpawnItemEx("CobraSmoke",frandom(-4,4),frandom(-4,4),frandom(-4,4))
		GBLT A 1 bright
		loop
	death:
		TNT1 A 0
		TNT1 A 2 bright a_explode (20,128)
		TNT1 A 0 Radius_Quake (2,6,0,10,0)
		TNT1 A 0 a_playsound ("DoomSlayer/wrathnormal",0)
		TNT1 A 0 a_spawnitemex ("CobraBoom")
		TNT1 A 8
		stop
	}
}

Actor CobraSmoke
{
	radius 3
	height 6
	speed .1
	renderstyle translucent
	Alpha 0.5
	Scale 1
	+nogravity
	+FLOORCLIP
	+bright
	+DONTSPLASH
	+NOTELEPORT
	+clientsideonly
	states
	{
	spawn:
		TNT1 A 0
		TNT1 A 1
		KSMO ABCD 2
		stop
	death:
		TNT1 A 1
		stop
	}
}

actor CobraBoom 
{
	radius 3
	height 6
	speed .1
	Scale 1
	+nogravity
	+FLOORCLIP
	+bright
	+DONTSPLASH
	+NOTELEPORT
	+nointeraction
	states
	{
	spawn:
		WRML B 4 
		WRML C 3 bright
		WRML EFGH 2 bright
		stop
	death:
		TNT1 A 1 
		stop
	}
}

