actor PistolHood : actor

{
	Health 20
	Radius 20
	Height 56
	Speed 15
	scale 1
	PainChance 200
	Painchance "BarrelGrab", 0
	Mass 200
	MONSTER 
	+FLOORCLIP
	SeeSound "archer/sight"
	AttackSound "archer/attack"
	PainSound "archer/pain"
	DeathSound "archer/death"
	ActiveSound "archer/growl"
	bloodtype newbloodsplatter
	Obituary "%o was gunned down by a Shroud Gunner."
	dropitem "clip" 256
	dropitem "lilchest" 05
	states
	{
	spawn:
		HGUN AB 10 A_Look
		Loop
	See:
		HGUN AABBCCDD 3 A_Chase
		Loop
	Missile:
		HGUN E 0 A_Jump (20,"Fireshot")
		HGUN E 0 A_Jump (20,"Iceshot")
		HGUN E 8 a_playsound ("ShroudGun/Arm",CHAN_WEAPON,1,0,0.7)
        HGUN E 15 A_FaceTarget
		TNT1 A 0 a_playsound ("ShroudGun/Fire",0,1,0,0.7)
        HGUN F 5 bright A_CustomBulletAttack (14.5, 0, 1, random(2,5) * 3, "HoodPuff", 0, CBAF_NORANDOM)
		HGUN E 5
        Goto See
	Fireshot:	
		TNT1 A 0 a_playsound ("archer/firecharge",0)
        HGUN E 2 a_playsound ("ShroudGun/Arm",CHAN_WEAPON,1,0,0.7)
        HGUN E 4 a_facetarget
		TNT1 AAA 0 a_spawnitemex ("FireArrowCharge",10,5,45,Frandom(-100,100)/25.0,Frandom(-100,100)/20.0,Frandom(-100,100)/10.0,0)  
        HGUN E 4 a_facetarget
		TNT1 AAA 0 a_spawnitemex ("FireArrowCharge",10,5,45,Frandom(-100,100)/25.0,Frandom(-100,100)/20.0,Frandom(-100,100)/10.0,0)  
        HGUN E 4 a_facetarget
		TNT1 AAA 0 a_spawnitemex ("FireArrowCharge",10,5,45,Frandom(-100,100)/25.0,Frandom(-100,100)/20.0,Frandom(-100,100)/10.0,0)  
        HGUN E 4 a_facetarget
		TNT1 AAA 0 a_spawnitemex ("FireArrowCharge",10,5,45,Frandom(-100,100)/25.0,Frandom(-100,100)/20.0,Frandom(-100,100)/10.0,0)  
        HGUN E 4 a_facetarget
		TNT1 AAA 0 a_spawnitemex ("FireArrowCharge",10,5,45,Frandom(-100,100)/25.0,Frandom(-100,100)/20.0,Frandom(-100,100)/10.0,0)  
        HGUN E 4 a_facetarget
		TNT1 AAA 0 a_spawnitemex ("FireArrowCharge",10,5,45,Frandom(-100,100)/25.0,Frandom(-100,100)/20.0,Frandom(-100,100)/10.0,0)  
        HGUN E 4 a_facetarget
		TNT1 AAA 0 a_spawnitemex ("FireArrowCharge",10,5,45,Frandom(-100,100)/25.0,Frandom(-100,100)/20.0,Frandom(-100,100)/10.0,0)  
        HGUN E 4 a_facetarget


        HGUN F 5 bright A_CustomBulletAttack (18.5, 0, 1, random(3,7) * 3, "FireHoodPuff", 0, CBAF_NORANDOM)
		TNT1 A 0 a_playsound ("gauntlet/fullcharge",0)
		TNT1 A 0 a_playsound ("ShroudGun/Fire",0,1,0,0.7)
		HGUN E 5
        Goto See
    Iceshot:
		TNT1 A 0 a_playsound ("archer/icecharge",0)
		HGUN E 2 a_playsound ("ShroudGun/Arm",CHAN_WEAPON,1,0,0.7)
        HGUN E 4 a_facetarget
		TNT1 AAA 0 a_spawnitemex ("IceArrowCharge",10,5,45,Frandom(-100,100)/25.0,Frandom(-100,100)/20.0,Frandom(-100,100)/10.0,0)  
        HGUN E 4 a_facetarget
		TNT1 AAA 0 a_spawnitemex ("IceArrowCharge",10,5,45,Frandom(-100,100)/25.0,Frandom(-100,100)/20.0,Frandom(-100,100)/10.0,0)  
        HGUN E 4 a_facetarget
		TNT1 AAA 0 a_spawnitemex ("IceArrowCharge",10,5,45,Frandom(-100,100)/25.0,Frandom(-100,100)/20.0,Frandom(-100,100)/10.0,0)  
        HGUN E 4 a_facetarget
		TNT1 AAA 0 a_spawnitemex ("IceArrowCharge",10,5,45,Frandom(-100,100)/25.0,Frandom(-100,100)/20.0,Frandom(-100,100)/10.0,0)  
        HGUN E 4 a_facetarget
		TNT1 AAA 0 a_spawnitemex ("IceArrowCharge",10,5,45,Frandom(-100,100)/25.0,Frandom(-100,100)/20.0,Frandom(-100,100)/10.0,0)  
        HGUN E 4 a_facetarget
		TNT1 AAA 0 a_spawnitemex ("IceArrowCharge",10,5,45,Frandom(-100,100)/25.0,Frandom(-100,100)/20.0,Frandom(-100,100)/10.0,0)  
        HGUN E 4 a_facetarget
		TNT1 AAA 0 a_spawnitemex ("IceArrowCharge",10,5,45,Frandom(-100,100)/25.0,Frandom(-100,100)/20.0,Frandom(-100,100)/10.0,0)  
        HGUN E 4 a_facetarget
        HGUN F 5 bright A_CustomBulletAttack (18.5, 0, 1, random(3,7) * 3, "IceHoodPuff", 0, CBAF_NORANDOM)
		TNT1 A 0 a_playsound ("ShroudGun/Fire",0,1,0,0.7)
		HGUN E 5
        Goto See		
	Pain:
    	HGUN G 3
		TNT1 A 0 A_TakeInventory ("PowerTerrorStatus",999)
  		TNT1 A 0 a_takeinventory ("PowerKickedStatus",999)
		HGUN G 3 A_Pain
    	Goto See
	Pain.Dazer:
    Pain.Superkick:
    	HGUN G 3
		TNT1 A 0 a_giveinventory ("KickDazer",1)
		HGUN G 3 A_Pain
    	Goto Dazed
    Dazed:
		HGUN G 2
		HGUN G 1 A_SetAngle (angle+15)
		HGUN G 1 A_JumpIfInventory ("PowerKickedStatus",1,"Dazed")
		Goto See
	Death:
        HGUN H 2 A_Scream 
		HGUN H 1 A_NoBlocking
		HGUN H 1 a_facetarget
		TNT1 A 0 thrustthingz (0,30,0,1)
		TNT1 A 0 ThrustThing(angle*256/360+128, 4, 0, 0)
        HGUN I 3
		HGUN J 3
        HGUN KL 4
		TNT1 A 0 a_jump (4,"DarkPortal")
        HGUN L -1
        Stop
	DarkPortal:
		TNT1 A 0
		HGUN L random(50,180) 
		TNT1 A 0 a_playsound ("Darkportal/form",0)
		HGUN L 3 Thing_SetTranslation(0, 4242)
		HWRP ABCD 1
		TNT1 A 1 a_spawnitemex ("WeakPortal")
		stop
	death.blazice:
		HGUN I 2 a_scream
		HGIC A 2 A_noblocking
		TNT1 A 0 a_playsound ("swordtech/freezedeath")
		TNT1 A 0 a_fadeout (0.20)
		TNT1 AAAAAAAAAAAA 0 a_spawnitemex ("iceparticle",random(-8,8),random(-8,8),32,random(-100,100)/10.0,random(-100,100)/10.0,random(-100,100)/20.0,0,160)
		HGIC B 90 bright
		HGIC C 2 bright
		TNT1 A 0 a_playsound ("swordtech/iceshatter")
		TNT1 AAA 0 a_spawnitemex ("icefragment",0,0,0,random(-10,10),random(-10,10),10) 
		TNT1 AAAA 0 a_spawnitemex ("icefragment",0,0,0,random(-4,13),random(-8,13),8) 
		stop
	death.fatalslash:
		FDHG A 2 a_scream
		HGIC A 4 a_noblocking
		FDHG A 15 
	randomwait:
		FDHG A 1 a_jump (20,"split")
		loop
	split:
		FDHG AABBCC 5
		FDHG DE 2 
		FDHG FGHIJ 3 bright  A_SpawnItemEx ("fatalburst", frandom(-20,20),frandom(-20,20),frandom(5,30), 0,0,0, 0, SXF_NOCHECKPOSITION,80)
		FDHG KKKK 1 bright  A_SpawnItemEx ("fatalburst", frandom(-20,20),frandom(-20,20),frandom(5,30), 0,0,0, 0, SXF_NOCHECKPOSITION,80)
	exploding:
		FDHG K 1 bright 
		TNT1 A 1 bright A_SpawnItemEx ("fatalburst", frandom(-20,20),frandom(-20,20),frandom(5,30), 0,0,0, 0, SXF_NOCHECKPOSITION, 80)
		FDHG K 1 bright 
		TNT1 A 1 bright A_SpawnItemEx ("fatalburst", frandom(-20,20),frandom(-20,20),frandom(5,30), 0,0,0, 0, SXF_NOCHECKPOSITION, 80)
		FDHG K 1 bright 
		TNT1 A 1 bright A_SpawnItemEx ("fatalburst", frandom(-20,20),frandom(-20,20),frandom(5,30), 0,0,0, 0, SXF_NOCHECKPOSITION, 80)
		FDHG K 1 bright a_jump (130,"reallydie")
		TNT1 A 1 bright A_SpawnItemEx ("fatalburst", frandom(-20,20),frandom(-20,20),frandom(5,30), 0,0,0, 0, SXF_NOCHECKPOSITION, 80)
		loop
	reallydie:
		TNT1 A 0
		TNT1 A 1 a_spawnitemex ("fataldrawdeath",0,0,30)
		stop
    XDeath:
        TNT1 A 0 a_scream
		HGUN M 3 A_PlaySound("archer/gib")
        HGUN N 3 A_NoBlocking
		TNT1 A 0 a_spawnitem ("bigbloodsplatter")
		TNT1 AAAAAAAA 0 a_spawnitemex ("newbloodsplatter",0,0,24)       
		//TNT1 AAAAAAAA 0 a_spawnitem ("newbloodsplatter") 
		TNT1 AAAAAAA 0 a_spawnitemex("bonegib",0,0,0,random(-30,30),random(-30,30),10)
		TNT1 AAA 0 a_spawnitemex("bonegib",0,0,0,random(-30,30),random(-30,30),10)
		ISKL AAAAA 0 a_spawnitemex("hipbonegib",0,0,32,random(-10,10),random(-10,10),10)
		ISKL AAA 0 a_spawnitemex("ribbonegib",0,0,32,random(-10,10),random(-10,10),12)
		HGUN OPQRST 5
		TNT1 A 0 a_jump (4,"GibbedDarkPortal")
        HGUN U -1
        Stop
	GibbedDarkPortal:
		TNT1 A 0
		HGUN U random(50,180) 
		TNT1 A 0 a_playsound ("Darkportal/form",0)
		HGUN U 3 Thing_SetTranslation(0, 4242)
		HWRP ABCD 1
		TNT1 A 1 a_spawnitemex ("WeakPortal")
		stop		
	Death.superkick:	
		HGUN H 1 A_Scream 
		HGUN H 1 a_scalevelocity (0.1)
 		HGUN H 1 a_stop
		HGUN H 1 A_NoBlocking
		TNT1 A 0 a_changeflag ("NOCLIP",1)
		TNT1 A 0 a_changeflag ("NOGRAVITY",1)
		HGUN I 1 a_facetarget
		TNT1 A 0 thrustthingz (0,80,0,1)
		TNT1 A 0 ThrustThing(angle*256/360+128, 110, 1, 0)
		TNT1 A 0 a_spawnitemex ("kickdeathsound")
        HGUN I 3
		HGUN J 3
	kickfly:
		HGUN KKKKKKK 1 a_spawnitemex ("KustamParticle",random(-8,8),random(-8,8),random(-10,10),random(-120,120)/15.0,random(-130,130)/12.0,random(-110,110)/17.0,0)
		TNT1 A 0 a_fadeout (0.02)
		loop
	Death.SentinelArm:
        HGUN H 2 A_Scream 
		HGUN H 1 A_NoBlocking
		HGUN H 1 a_facetarget
		TNT1 A 0 thrustthingz (0,60,0,1)
        HGUN I 1
		HGUN J 2
		HGUN J 2
		TNT1 A 0 a_nogravity
		TNT1 A 0 a_stop
		TNT1 A 0 a_playsound ("Kustam/OCKill",CHAN_VOICE,1,0,0.4)
		TNT1 A 0 a_playsound ("Kustam/OCKill",5,1,0,0.6)
		TNT1 A 0 a_playsound ("Kustam/OCKill",6,1,0,0.6)
		TNT1 A 0 a_playsound ("Kustam/OCKill",7,1,0,0.6)
		OCKL ABCDEF 2 bright
		stop
		
	Raise:
        HGUN LKJIH 3
		TNT1 A 0 a_jump (60,"chaosexplode")
        Goto See
	chaosexplode:
		TNT1 A 0
		TNT1 A 0 A_ChangeFlag("NOPAIN", 1)
    	HGUN A 8
        HGUN G 6 A_Pain
    	HGUN A 8
        HGUN G 6 A_Pain
    	HGUN A 8
        HGUN G 6 A_Pain
        TNT1 A 0 a_scream
        TNT1 A 0 A_NoBlocking
		TNT1 A 0 a_radiusgive ("chaoslaugh",650,RGF_MONSTERS)
		TNT1 A 0 a_spawnitemex("skellytun",0,0,12,random(-6,6),random(-8,8),random(6,10),0,SXF_NOCHECKPOSITION)
		TNT1 A 0 a_playsound ("bonelord/explode",0,1,0,0.6)
		TNT1 A 0 Radius_Quake (4,20,0,32,0)
		TNT1 A 0 a_spawnitem ("bigbloodsplatter")
		TNT1 AAAAAAAAAAAA 0 a_spawnitem ("newbloodsplatter") 
		TNT1 AAAAAAAA 0 a_spawnitemex("bonegib",0,0,0,random(-30,30),random(-30,30),10)
		ISKL AAAAAAA 0 a_spawnitemex("hipbonegib",0,0,32,random(-10,10),random(-10,10),10)
		ISKL AAAAA 0 a_spawnitemex("ribbonegib",0,0,32,random(-10,10),random(-10,10),12)
		TNT1 AAA 0 a_spawnitemex("bonegib",0,0,0,random(-30,30),random(-30,30),10)
		TNT1 A 20
		stop
	}
}
	
	
	
ACTOR HoodPuff : BulletPuff
{
	+NOBLOCKMAP
	+NOGRAVITY
	+ALLOWPARTICLES
	+RANDOMIZE
	+bright
	+puffonactors
	+alwayspuff
	RenderStyle Translucent
	Alpha 0.8
	scale 0.4
	VSpeed 0
	Mass 5
	States
	{
	Spawn:
		VEKF F 2
		VEKF G 4 a_playsound ("archer/hit",0) 
		VEKF HI 4
		Stop
	}
}

ACTOR FireHoodPuff : HoodPuff
{
	translation "0:255=%[0,0,0]:[2,1,0]"
	states
	{
	Spawn:
		VEKF F 2
		TNT1 AAAA 0 a_spawnitemex("firebomblet",0,0,0,random(-10,10),random(-10,10),10,0,SXF_NOCHECKPOSITION) 
		VEKF G 4 a_playsound ("archer/hit",0) 
		VEKF HI 4
		Stop
	}
}

actor IceHoodPuff : HoodPuff
{
	damagetype "icearrow"
	states
	{
	Spawn:
		VEKH F 2
		VEKH G 4 a_playsound ("archer/hit",0) 
		VEKH HI 4
		Stop
	}
}

	

