Actor NailBorg : FPlus_Monster 27800
{
spawnid 208
	OBITUARY "%o was nailed by a Nail Borg."
	Health 180
	Radius 20
	Height 56
	Mass 135
	Speed 19
	Painchance 80
	Scale 1.2
	SEESOUND "Monsters/NBSight"
	ACTIVESOUND "Monsters/NBAct"
	PAINSOUND "Monsters/NBPain"
	DEATHSOUND "Monsters/NBDeath"
	//Translation 1
	Bloodcolor "7F 3F 00"
	+FLOORCLIP
	States
	{
	Spawn:
		NLBG AB 10 A_Look
		goto Spawn
	See:
		NLBG AA 4 A_Chase
		NLBG A 0 A_PlaySound("Monsters/NBWalk")
		NLBG BBCC 4 A_Chase
		NLBG CC 0 A_PlaySound("Monsters/NBWalk")
		NLBG DD 4 A_Chase
		goto See
	Missile:
      		NLBG E 0 A_Jump(96,"Missile2")
      		NLBG E 0 A_Jump(96,"Missile3")
      		NLBG E 10 A_FaceTarget
      		NLBG E 0 A_PlaySound("weapons/nailfire")
      		NLBG F 3 BRIGHT A_CustomMissile("BorgNail1", 32, 0, Random(6, -6), 0, 1)
      		NLBG E 1 BRIGHT
                NLBG E 0 A_PlaySound("weapons/nailfire")
      		NLBG F 3 BRIGHT A_CustomMissile("BorgNail1", 32, 0, Random(6, -6), 0, 1)
      		NLBG E 1 BRIGHT A_FaceTarget
      		NLBG E 0 A_PlaySound("weapons/nailfire")
      		NLBG F 3 BRIGHT A_CustomMissile("BorgNail1", 32, 0, Random(6, -6), 0, 1)
      		NLBG E 1 BRIGHT A_FaceTarget
      		NLBG E 0 A_PlaySound("weapons/nailfire")
      		NLBG F 3 BRIGHT A_CustomMissile("BorgNail1", 32, 0, Random(6, -6), 0, 1)
      		NLBG E 1 BRIGHT A_FaceTarget
      		NLBG E 0 A_PlaySound("weapons/nailfire")
      		NLBG F 3 BRIGHT A_CustomMissile("BorgNail1", 32, 0, Random(6, -6), 0, 1)
      		NLBG E 1 BRIGHT A_FaceTarget
      		NLBG E 0 A_PlaySound("weapons/nailfire")
      		NLBG F 3 BRIGHT A_CustomMissile("BorgNail1", 32, 0, Random(6, -6), 0, 1)
      		NLBG E 1 BRIGHT A_FaceTarget
      		NLBG E 0 A_PlaySound("weapons/nailfire")
      		NLBG F 3 BRIGHT A_CustomMissile("BorgNail1", 32, 0, Random(6, -6), 0, 1)
      		NLBG E 1 BRIGHT A_FaceTarget
      		NLBG E 0 A_PlaySound("weapons/nailfire")
      		NLBG F 3 BRIGHT A_CustomMissile("BorgNail1", 32, 0, Random(6, -6), 0, 1)
      		NLBG E 1 BRIGHT
      		Goto See
		Missile2:
      		NLBG E 10 A_FaceTarget
      		NLBG E 0 A_PlaySound("weapons/nailfire")
      		NLBG F 4 A_CustomMissile("BorgNail2", 28, 0, 4, 0, 1)
      		NLBG F 0 A_CustomMissile("BorgNail2", 28, 0, -4, 0, 1)
      		NLBG F 0 A_CustomMissile("BorgNail2", 36 ,0 ,4 , 0, 1)
      		NLBG F 0 A_CustomMissile("BorgNail2", 36, 0, -4, 0, 1)
      		NLBG F 0 BRIGHT A_CustomMissile("BorgCenterNail", 32, 0, 0, 0)
      		NLBG E 15
      		Goto See
		Missile3:
      		NLBG E 10 A_FaceTarget
      		NLBG E 0 A_PlaySound("Weapons/NailBomb")
      		NLBG F 4 A_CustomMissile("BorgNailBomb", 32, 0, Random(6, -6), 0)
      		NLBG E 10
      		Goto See
	Pain:
		NLBG G 3
		NLBG G 3 A_Pain
		Goto See
	
	MonDeath:
		NLBG H 5
		NLBG I 5 A_Scream
		NLBG J 5 A_NoBlocking
		NLBG J 0 A_PlaySound("Weapons/NailBomb")
		TNT1 A 0 A_Jump(128, 2)
		TNT1 A 0 A_CustomMissile("BorgNailBombBig", 32, 0, Random(6, -6), 0)
		NLBG K 5 
    	NLBG L 1  
	goto Super::FadeOut
	
	MonXDeath:
		NLBG O 5
		NLBG P 5 A_XScream
		NLBG Q 5 A_NoBlocking
		NLBG Q 0 A_PlaySound("Weapons/NailBomb")
		TNT1 A 0 A_Jump(128, 2)
		TNT1 A 0 A_CustomMissile("BorgNailBombBig", 32, 0, Random(6, -6), 0)
		NLBG RTUV 5 
		NLBG W 1
	goto Super::FadeOut
	
	MonRaise:
		NLBG KJIH 5
		Goto See
	}
}
		
Actor BorgNailBomb
{
	Radius 24
	Height 24
	Speed 20
	Reactiontime 35
	SEESOUND "Weapons/NBBounce"
	DEATHSOUND "Weapons/NailBombExp"
	PROJECTILE
	-SHOOTABLE
	+DOOMBOUNCE
	+RANDOMIZE
	+GRENADETRAIL
	-NOGRAVITY
	+CANBOUNCEWATER
	+BOUNCEONACTORS
	+MthruSpecies
	states
	{
	Spawn:
		NBMB A 2 A_Countdown
		NBMB AB 6
		goto Spawn
	Death:
		WSMK E 0 A_CustomMissile("BorgNail1", 4, 2, 0)
		WSMK E 0 A_CustomMissile("BorgNail1", 4, 2, 40)
		WSMK E 0 A_CustomMissile("BorgNail1", 4, 2, 80)
		WSMK E 0 A_CustomMissile("BorgNail1", 4, 2, 120)
		WSMK E 0 A_CustomMissile("BorgNail1", 4, 2, 160)
		WSMK E 0 A_CustomMissile("BorgNail1", 4, 2, 200)
		WSMK E 0 A_CustomMissile("BorgNail1", 4, 2, 240)
		WSMK E 0 A_CustomMissile("BorgNail1", 4, 2, 280)
		WSMK E 0 A_CustomMissile("BorgNail1", 4, 2, 320)
		WSMK E 0 A_CustomMissile("BorgNail1", 4, 2, 350)
		WSMK ABCDE 5
		Stop
	}
}

Actor BorgNailBombBig
{
	Radius 24
	Height 24
	Speed 20
	Reactiontime 35
	SEESOUND "Weapons/NBBounce"
	DEATHSOUND "Weapons/NailBombExp"
	Scale 1.4
	PROJECTILE
	-SHOOTABLE
	+DOOMBOUNCE
	+RANDOMIZE
	+GRENADETRAIL
	-NOGRAVITY
	+CANBOUNCEWATER
	+BOUNCEONACTORS
	+MthruSpecies
	states
	{
	Spawn:
		NBMB A 2 A_Countdown
		NBMB AB 6
		goto Spawn
	Death:
		WSMK E 0 A_CustomMissile("BorgNail1", 4, 2, 0)
		WSMK E 0 A_CustomMissile("BorgNail1", 4, 2, 20)
		WSMK E 0 A_CustomMissile("BorgNail1", 4, 2, 40)
		WSMK E 0 A_CustomMissile("BorgNail1", 4, 2, 60)
		WSMK E 0 A_CustomMissile("BorgNail1", 4, 2, 80)
		WSMK E 0 A_CustomMissile("BorgNail1", 4, 2, 100)
		WSMK E 0 A_CustomMissile("BorgNail1", 4, 2, 120)
		WSMK E 0 A_CustomMissile("BorgNail1", 4, 2, 140)
		WSMK E 0 A_CustomMissile("BorgNail1", 4, 2, 160)
		WSMK E 0 A_CustomMissile("BorgNail1", 4, 2, 180)
		WSMK E 0 A_CustomMissile("BorgNail1", 4, 2, 200)
		WSMK E 0 A_CustomMissile("BorgNail1", 4, 2, 220)
		WSMK E 0 A_CustomMissile("BorgNail1", 4, 2, 240)
		WSMK E 0 A_CustomMissile("BorgNail1", 4, 2, 260)
		WSMK E 0 A_CustomMissile("BorgNail1", 4, 2, 280)
		WSMK E 0 A_CustomMissile("BorgNail1", 4, 2, 300)
		WSMK E 0 A_CustomMissile("BorgNail1", 4, 2, 320)
		WSMK E 0 A_CustomMissile("BorgNail1", 4, 2, 340)
		WSMK ABCDE 5
		Stop
	}
}

Actor BorgNail1
{
        Projectile
        Radius 5
        Height 8
        Speed 40
        Damage 3
        Scale 0.6
        +BLOODSPLATTER
        +PIERCEARMOR
		+MthruSpecies
        seeSound ""
        DeathSound ""
        Decal Bulletchip
        States
        {
        Spawn:
                DART A 1 A_CustomMissile("NailBlur", 0, 0, 180)
        	DART A 0 A_PlaySound("weapons/nailflight")
               	goto Spawn
        Crash:
        	DART B 0 A_PlaySound("weapons/nailhit")
        	DART BCDEFG 2
        	Stop
        XDeath:
        	DART B 0 A_PlaySound("weapons/nailhitbleed")
        	DART BCDEFG 2
        	Stop
        Death:
        	DART B 0 A_PlaySound("weapons/nailhit")
        	DART BCDEFG 2
        	Stop
        }
}

Actor BorgNail2
{
        Projectile
        Radius 6
        Height 8
        Speed 40
        Damage 2
        Scale 0.6
        +BLOODSPLATTER
		+MthruSpecies
        seeSound ""
        DeathSound ""
        Decal Bulletchip
        States
        {
        Spawn:
                DART A 1 A_SpawnItemEx("NailBlur", 0, 0, 0, 0.2, 0, 0, 180, 128)
        	DART A 0 A_PlaySound("weapons/nailflight")
		DART A 1 A_SpawnItemEx("NailBlur", 0, 0, 0, 0.2, 0, 0, 180, 128)
               	goto Spawn
        Crash:
        	DART B 0 A_PlaySound("weapons/nailhit")
        	DART BCDEFG 2
        	Stop
        XDeath:
        	DART B 0 A_PlaySound("weapons/nailhitbleed")
        	DART BCDEFG 2
        	Stop
        Death:
        	DART B 0 A_PlaySound("weapons/nailhit")
        	DART BCDEFG 2
        	Stop
        }
}

Actor BorgCenterNail
{
        Projectile
        Radius 6
        Height 8
        Speed 26
        Damage 3
        +BLOODSPLATTER
        +PIERCEARMOR
		+MthruSpecies
        seeSound ""
        DeathSound ""
        Decal Bulletchip
        States
        {
        Spawn:
                DART A 1 A_SpawnItemEx("NailBlur", 0, 0, 0, 0.2, 0, 0, 180, 128)
        	DART A 0 A_PlaySound("weapons/nailflight")
		DART A 1 A_SpawnItemEx("NailBlur", 0, 0, 0, 0.2, 0, 0, 180, 128)
               	goto Spawn
        Crash:
        	DART B 0 A_PlaySound("weapons/nailhit")
        	DART BCDEFG 2
        	Stop
        XDeath:
        	DART B 0 A_PlaySound("weapons/nailhitbleed")
        	DART BCDEFG 2
        	Stop
        Death:
        	DART B 0 A_PlaySound("weapons/nailhit")
        	DART BCDEFG 2
        	Stop
        }
}

Actor NailBlur       
{
   Height 8
   Radius 1
   Damage 0
   Scale 0.6
   Speed 0.2
   RenderStyle Translucent
   +CLIENTSIDEONLY
   Alpha 0.5
   +NOGRAVITY
   +DROPOFF
   States
   {
	Spawn:
		DART A 1
		DART A 1 ACS_NamedExecuteAlways("ParticleCheck", 0 , 3)
	Loopme:
		DART A 1 A_FadeOut(0.1)
		goto Loopme
	  NoSpawn:
	  	TNT1 A 0
	  Stop
   }
}