actor WidowMaker : Guardian 
{
Monster
Health 750
Height 60
Radius 22
Speed 10
Painchance 60
Painchance "CadaverRocket", 0
+NODROPOFF
+AVOIDMELEE
+MISSILEMORE
+MissileEvenMore
+QUICKTORETALIATE
+DONTHURTSPECIES
+DONTHARMSPECIES
+DONTHARMCLASS
Species "Skeletons"
DamageFactor "CadaverRocket", 0.0
Dropitem "Minigun " 255
DropItem "LifeEssence" 150
DropItem "ArmorBonusMax" 150
Dropitem "BackPack" 30
SeeSound "widowmaker/sight"
ActiveSound "widowmaker/act"
PainSound "widowmaker/pain"
DeathSound "widowmaker/death"
Obituary "%o was perforated by a Widow maker."
Tag "\cmWidow Maker\c-"
States
	{
	Spawn:
		WDMK O 10 A_Look
		Loop
	Idle:
		TNT1 A 0 A_StopSound(6)
		WDMK O 10 A_Look
		WDMK O 10 A_Look
		WDMK O 10 A_Look
		WDMK O 10 A_Look
		Loop
	See:
		TNT1 A 0 A_StopSound(6)
		WDMK AAABBB 2 A_Chase
		TNT1 A 0 A_SpawnItem("BonyStep",0,0,0,0)
		WDMK CCCDDD 2 A_Chase
		TNT1 A 0 A_SpawnItem("BonyStep",0,0,0,0)
		Loop
	Melee:
		"####" "#" 0 A_StopSound(6)
		"####" "#" 0 A_FaceTarget
		"####" "#" 0 A_PlaySound("player/normjump")
		"####" "#" 8 A_Recoil(25)
		"####" "#" 0 A_PlaySound("plyrland")
		Goto Normal
	Missile:
		TNT1 A 0
		TNT1 A 0 A_Jump(128,"SeekMissile","SeekMissile2")
		Goto Normal
	Normal:
		TNT1 A 0
		TNT1 A 0 A_PlaySound("weapons/mgunspinstart",6,1.0,0)
		WDMK EEEEEEEEEE 1 A_FaceTarget
		TNT1 A 0 A_PlaySound("weapons/mgunspin",6,1.0,1)
	Refire:
		TNT1 A 0 A_CustomMissile("MonsterTracer",Random(30,34),0,Random(5,-5),0)
		TNT1 A 0 A_SpawnItemEx("RifleCasing",12,6,28,Random(2,6),0,Random(1,3),Random(-80,-90),128)
		TNT1 A 0 A_PlaySound("weapons/minigunfire",CHAN_WEAPON)
		WDMK F 2 Bright A_CustomBulletAttack(22.5,0,1,random(1,5)*3,"WMPuff",0,CBAF_NORANDOM)
		WDMK E 1 A_FaceTarget
		TNT1 A 0 A_CustomMissile("MonsterTracer",Random(30,34),0,Random(5,-5),0)
		TNT1 A 0 A_SpawnItemEx("RifleCasing",12,6,30,Random(2,6),0,Random(1,3),Random(-80,-90),128)
		TNT1 A 0 A_PlaySound("weapons/minigunfire",CHAN_WEAPON)
		WDMK F 2 Bright A_CustomBulletAttack(22.5,0,1,random(1,5)*3,"WMPuff",0,CBAF_NORANDOM)
		WDMK E 1 A_FaceTarget
		TNT1 A 0 A_Jump(11,"Pause","SeekMissile")
		TNT1 A 0 A_CPosRefire
		Loop
	Pause:
		TNT1 A 0
		TNT1 A 0 A_StopSound(6)
		WDMK EEEEEEEEEE 1 A_FaceTarget
		Goto See
	SeekMissile:
		TNT1 A 0
		TNT1 A 0 A_StopSound(6)
		WDMK EEEE 3 A_FaceTarget
		WDMK F 4 Bright A_CustomMissile("HellFireRocket",40,0,0)
		WDMK E 3 A_FaceTarget
		WDMK F 4 Bright A_CustomMissile("HellFireRocket",40,0,0)
		WDMK E 3 Bright
		Goto see
	SeekMissile2:
		TNT1 A 0 A_JumpIf(ceilingz-floorz<=175,"SeekMissile")
		WDMK G 1 A_FaceTarget
		WDMK G 5 
		WDMK G 1 A_FaceTarget
		WDMK G 3 A_PlaySound("widowmaker/beep")
		WDMK G 1 A_FaceTarget
		WDMK G 3 A_PlaySound("widowmaker/beep")
		WDMK G 1 A_FaceTarget
		WDMK G 3 A_PlaySound("widowmaker/beep")
		WDMK G 1 A_FaceTarget
		TNT1 A 0 A_PlaySound("widowmaker/launch")
		WDMK H 4 Bright
		TNT1 A 0 Bright A_CustomMissile("widowmakerMiniRockets",55,40,-25,90) 
		TNT1 A 0 Bright A_CustomMissile("widowmakerMiniRockets",55,25,0,90) 
		TNT1 A 0 Bright A_CustomMissile("widowmakerMiniRockets",55,10,25,90) 
		WDMK H 2 Bright A_FaceTarget
		WDMK G 2
		Goto See
	Pain:
		TNT1 A 0
		TNT1 A 0 A_StopSound(6)
		TNT1 A 0 A_Jump(80,"PainMissile")
		WDMK I 5
		WDMK I 5 A_Pain
		Goto See
	PainMissile:
		WDMK I 5
		WDMK I 5 A_Pain
		Goto Missile
	XDeath:
	Death:
		TNT1 A 0
		TNT1 AAA 0 A_StopSound(6)
		WDMK I 7 A_Scream 
		WDMK I 2 Bright 
		TNT1 AA 0 A_SpawnItemEx("GibbedGenerator",0,0,0,0,0,0,0,128,0)
		TNT1 AA 0 A_CustomMissile("SmokeFX2",0,0,random(0,360),2,random(0,360))
		WDMK IIJJJ 1 Bright A_CustomMissile("Kaboom17", Random(10,50),0,random(0,360),2,random(0,360))
		TNT1 AA 0 A_SpawnItemEx("GibbedGenerator",0,0,0,0,0,0,0,128,0)
		TNT1 AA 0 A_CustomMissile("SmokeFX2",0,0,random(0,360),2,random(0,360))
		WDMK JJJKK 1 Bright A_CustomMissile("Kaboom17", Random(10,50),0,random(0,360),2,random(0,360))
		TNT1 AA 0 A_SpawnItemEx("GibbedGenerator",0,0,0,0,0,0,0,128,0)
		TNT1 AA 0 A_CustomMissile("SmokeFX2",0,0,random(0,360),2,random(0,360))
		WDMK KKLLL 1 Bright A_CustomMissile("Kaboom17",random(10,50),0,random(0,360),2,random(0,360))
		TNT1 AA 0 A_SpawnItemEx("GibbedGenerator",0,0,0,0,0,0,0,128,0)
		TNT1 AAAA 0 A_CustomMissile("SmokeFX2",0,0,random(0,360),2,random(0,360))
		WDMK M 6 A_NoBlocking
		WDMK N 63000 CanRaise
		Stop
	Raise:
		TNT1 A 0
		TNT1 A 0 A_SpawnItemEx("VileHealEffect",0,0,0,0,0,0,0,SXF_NOCHECKPOSITION)
		WDMK NMLKJI 6
		Goto See
	}
}

Actor WMPuff: CyNoblePuff { DamageType "CadaverRocket" }

actor widowmakerMiniRockets : Hellfirerocket
{
Radius 10
Height 10
Speed 24
Scale 0.7
Damage 6
ExplosionDamage 30
ExplosionRadius 78
+ScreenSeeker
States
	{
	Spawn:
		TNT1 A 0 Bright
		TNT1 A 0 Bright A_Jump(128,"Homing")
	Normal:
		TNT1 A 0 Bright A_CustomMissile("MissileTrail",0,Random(-2,2))
		CBRK A 1 Bright A_CustomMissile("ProjectileTrailParticleOrange",0,Random(-2,2))
		Loop
	Homing:
		TNT1 A 0 Bright A_Tracer2
		TNT1 A 0 Bright A_CustomMissile("MissileTrail",0,Random(-2,2))
		CBRK A 1 Bright A_CustomMissile("ProjectileTrailParticleOrange",0,Random(-2,2))
		TNT1 A 0 Bright A_CustomMissile("MissileTrail",0,Random(-2,2))
		CBRK A 1 Bright A_CustomMissile("ProjectileTrailParticleOrange",0,Random(-2,2))
		TNT1 A 0 Bright A_CustomMissile("MissileTrail",0,Random(-2,2))
		CBRK A 1 Bright A_CustomMissile("ProjectileTrailParticleOrange",0,Random(-2,2))
		TNT1 A 0 Bright A_CustomMissile("MissileTrail",0,Random(-2,2))
		CBRK A 1 Bright A_CustomMissile("ProjectileTrailParticleOrange",0,Random(-2,2))
		TNT1 A 0 Bright A_Tracer2
		TNT1 A 0 Bright A_CustomMissile("MissileTrail",0,Random(-2,2))
		CBRK A 1 Bright A_CustomMissile("ProjectileTrailParticleOrange",0,Random(-2,2))
		TNT1 A 0 Bright A_CustomMissile("MissileTrail",0,Random(-2,2))
		CBRK A 1 Bright A_CustomMissile("ProjectileTrailParticleOrange",0,Random(-2,2))
		TNT1 A 0 Bright A_CustomMissile("MissileTrail",0,Random(-2,2))
		CBRK A 1 Bright A_CustomMissile("ProjectileTrailParticleOrange",0,Random(-2,2))
		TNT1 A 0 Bright A_CustomMissile("MissileTrail",0,Random(-2,2))
		CBRK A 1 Bright A_CustomMissile("ProjectileTrailParticleOrange",0,Random(-2,2))		
		TNT1 A 0 Bright A_PlaySound("monster/homingrockbeep")
		Loop
	Death:
		TNT1 A 0 Bright
		TNT1 A 0 Bright A_SpawnItemEx("OrangeParticleSpawner",0,0,0,0,0,0,0,128) 
		TNT1 AAA 0 Bright A_CustomMissile("Kaboom3",0,0,random(0,360),2,random(0,360))
		TNT1 AAA 0 Bright A_CustomMissile("SmokeFX2",0,0,random(0,360),2,random(0,360))
		TNT1 AAAA 0 Bright A_SpawnItemEx("Debris",0,0,0,Random(4,-4),Random(4,-4),Random(4,8),0,128)
		TNT1 A 0 Bright A_Explode
		TNT1 A 1 Bright A_SpawnItem("RocketEx")
		Stop
	}
}