Actor NailGunMG : Weapon 22053
{
  Weapon.AmmoUse 1
  Weapon.AmmoGive 25
  Weapon.KickBack 40
  Weapon.AmmoType "Clip"
  Weapon.SlotNumber 4
  Inventory.PickupSound "Misc/W_PkUp"
  Inventory.PickupMessage "You got the NailGun!"
  Obituary "%o was nailed by %k."
  States
  {
  Spawn:
    NLMG F -1
    Loop
  Select:
    NLMG A 1 A_Raise
    Loop
  Deselect:
    NLMG A 1 A_Lower
    Loop
  Ready:
    NLMG A 1 A_WeaponReady
    Loop
  Fire:
    NLMG B 0 A_PlayWeaponSound("Weapons/NailMGFire")
    NLMG B 2 A_FireCustomMissile("MGNail", Random(4, -4), 1, -3, 0, 0, Random(2, -2))
    NLMG B 0 Bright A_Light2
    NLMG C 1
    NLMG A 1
    NLMG D 0 A_PlayWeaponSound("Weapons/NailMGFire")
    NLMG D 2 A_FireCustomMissile("MGNail", Random(4, -4), 1, 3, 0, 0, Random(2, -2))
    NLMG D 0 Bright A_Light2
    NLMG E 1
    NLMG A 1
    NLMG E 0 A_Light0
    Goto Ready
  }
}

Actor Nails : Ammo 22054
{
  Radius 16
  Height 8
  Inventory.PickupMessage "Picked up a Box of Nails"
  Inventory.Icon "NLPJI0"
  Inventory.Amount 25
  Inventory.MaxAmount 125
  Ammo.BackpackAmount 25
  Ammo.BackpackMaxAmount 250
  States
  {
  Spawn:
    NBOX A -1
    Stop
  }
}

Actor MGNail
{
  Projectile
  Radius 3
  Height 3
  Speed 44
  Damage 4
  Scale 0.5
  +BloodSplatter
  SeeSound ""
  DeathSound ""
  Decal BulletChip
  States
  {
  Spawn:
    NLPJ A 1 A_SpawnItemEx("NailBlur", 0, 0, 0, 1, 0, 0, 180, 128)
    NLPJ A 0 A_PlaySound("Weapons/NailFlight")
    Loop
  Crash:
  Death:
    NLPJ B 0 A_PlaySound("Weapons/NailHit")
    NLPJ BCDEFG 2
    Stop
  XDeath:
    NLPJ B 0 A_PlaySound("Weapons/NailHitBleed")
    NLPJ BCDEFG 2
    Stop
  }
}

Actor NailBlur       
{
  Height 8
  Radius 1
  Damage 0
  Scale 0.6
  Speed 0.2
  RenderStyle Translucent
  Alpha 0.5
  +NoGravity
  +DropOff
  +NoTeleport
  States
  {
  Spawn:
    NLPJ A 1 A_FadeOut(0.4)
    Loop
  }
}
