actor WidowMaker : Guardian 
{
	health 750
	speed 10
	painchance 60
	+DONTHARMCLASS
    +DONTHARMSPECIES
	+MISSILEMORE
	+MissileEvenMore
	+AVOIDMELEE
	+QUICKTORETALIATE
	+NODROPOFF
	Radius 22
    Height 60
	DamageFactor "CadaverRocket", 0.0
	Species "Skeletons"
	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."
	states{
  Spawn:
    WDMK O 10 A_Look
    Loop
  See:
    TNT1 A 0 A_SpawnItem("BonyStep",0,0,0,0)
    WDMK AAABBB 2 A_Chase
    TNT1 A 0 A_SpawnItem("BonyStep",0,0,0,0)
    WDMK CCCDDD 2 A_Chase
    Loop
  Melee:
    "####" "#" 0 A_FaceTarget
	"####" "#" 0 A_PlaySound("player/normjump")
    "####" "#" 8 A_Recoil(25)
	"####" "#" 0 A_PlaySound("plyrland")
    Goto Normal
	Pause:
	WDMK E 10
	Goto See
  Missile:
    TNT1 A 0 A_Jump(128,"SeekMissile","SeekMissile2")
  Normal:
    TNT1 A 0 A_PlaySound("weapons/mgunspinstart")
    WDMK E 10 A_FaceTarget
	TNT1 A 0 A_PlaySoundEx("weapons/mgunspin","Voice")
	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_PlaySoundEx("weapons/minigunfire","Weapon")
    WDMK F 2 Bright A_CustomBulletAttack(22.5,0,1,random(2,5)*3,"WMPuff")
    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_PlaySoundEx("weapons/minigunfire","Weapon")
    WDMK F 2 Bright A_CustomBulletAttack(22.5,0,1,random(2,5)*3,"WMPuff")
    WDMK E 1 A_FaceTarget
	TNT1 A 0 A_Jump(11,"Pause","SeekMissile")
	TNT1 A 0 A_StopSoundEx("Voice")
    TNT1 A 0 A_CPosRefire
    Goto Normal+3
  SeekMissile:
    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:
    WDMK G 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
	WDMK H 0 Bright A_CustomMissile("widowmakerMiniRockets",55,40,-25,90) 
	WDMK H 0 Bright A_CustomMissile("widowmakerMiniRockets",55,25,0,90) 
	WDMK H 0 Bright A_CustomMissile("widowmakerMiniRockets",55,10,25,90) 
    WDMK H 2 Bright A_FaceTarget
	WDMK G 2
    Goto See
  Pain:
    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:
    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 -1
    Stop
  Raise:
    TNT1 A 0
	TNT1 A 0 A_SpawnItemEx("VileHealEffect",0,0,0,0,0,0,0,SXF_NOCHECKPOSITION)
    WDMK NMLKJI 6
    Stop
	}   
}

Actor WMPuff: CyNoblePuff
{
DamageType "CadaverRocket"
}

actor widowmakerMiniRockets : Hellfirerocket
{
	Radius 10
	Height 10
	Speed 24
	Scale 0.7
	Damage 6
	+ScreenSeeker
	ExplosionDamage 30
    ExplosionRadius 78
States
{
Spawn:
    TNT1 A 0
	TNT1 A 0 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
	TNT1 A 0 A_SpawnItemEx("OrangeParticleSpawner", 0, 0, 0, 0, 0, 0, 0, 128) 
    TNT1 AAA 0 A_CustomMissile("Kaboom3", 0, 0, random(0,360), 2, random(0,360))
	TNT1 AAA 0 A_CustomMissile("SmokeFX2", 0, 0, random(0,360), 2, random(0,360))
    TNT1 AAAA 0 A_SpawnItemEx("Debris",0,0,0,Random(4,-4),Random(4,-4),Random(4,8),0,128)
    TNT1 A 0 A_Explode
    TNT1 A 1 A_SpawnItem("RocketEx")
    Stop
    }
}