ACTOR GE007ThrowingKnife : Weapon
{
  Weapon.Kickback 100
  Scale 0.1
      Weapon.Ammotype "GE007ThrowingKnifes"
    Weapon.AmmoUse 1
  Weapon.AmmoGive 1
  tag "Throwing Knife"
  Inventory.PickupMessage "Picked up a Throwing Knife."
 Obituary "%k smashed his throwing knife into %o's face."
  	Inventory.PickupSound "GE007/Weapons/Knife"
  States
  {
  Spawn:
    TKA1 K -1
    Loop
  Ready:
     	TNT1 A 0 A_PlaySound ("GE007/Weapons/Knife","Weapon")
    TK11 A 1 
    TK11 B 1
    TK11 C 1
    TK11 D 1
    TK11 EFGHIJKLMNOPQRSTUV 1
    TK11 X -1 A_WeaponReady
    Goto Ready+22
  Deselect:
    TK11 VUTSRQPONMLKJIHGFEDCB 1
    TK11 A 1
    TK08 A 0 A_Lower
    wait
  Select: 
    TK08 A 0 A_Raise 
    Loop  
  Fire: 
    TK11 YZ 1
	TK12 ABCDEFGHIJ 1
	TNT1 A 10
	TNT1 A 0 A_PlaySound ("GE007/Weapons/KnifeAttack","Weapon")
	TNT1 A 8 A_FireCustomMissile("GE007ThrownKnife", 0, 1, 4, 0, 0)
    Goto Ready
		AltFire:
		TK04 A 0
		goto ReloadCheck
  }
}

actor GE007ThrownKnife
{
 Projectile
 Radius 8
 Height 8
 Damage 16
 Speed 42
 Scale 0.5
 Obituary "%k smashed his throwing knife into %o's face."
 BounceCount 3
 SeeSound "GE007/Weapons/KnifeBounce"
 +HEXENBOUNCE
 +BLOODSPLATTER
 -BLOODLESSIMPACT
 States
 {
 Spawn:
  TKNI A 0
  TKNI A 0 A_StopSound
  TKNI A 0 Thing_ChangeTID(0, 255)
  TKNI ABCD 2
  TKNI EFGH 2 A_Gravity
  TKNI A 0 A_PlaySound("GE007/Weapons/KnifeAttack")
  TKNI A 0
  goto Spawn+3
 Death:
  TNT1 A 0
  TNT1 A 0 A_SpawnItem("GE007KniveDropped", 8)
  stop
 XDeath:
  TNT1 A 0
  TNT1 A 0 A_PlaySound("FleshHit")
  TNT1 A 0 A_SpawnItem("GE007KniveDropped", 8)
  stop
 }
}

ACTOR GE007ThrowingKnifePickup : Custominventory
{
   Scale 0.1
  Inventory.PickupMessage "Picked up some Throwing Knifes."
  	Inventory.PickupSound "GE007/Weapons/Knife"
   States
   {
   Spawn:
		TKA2 A -1
	  loop
   Pickup:
	  TNT1 A 0 A_GiveInventory("GE007ThrowingKnife")
	  TNT1 A 0 A_GiveInventory("GE007ThrowingKnifes", 9)
	  stop
   }
}
