// --------------------------------------------------------------------------
//
// Knife (Demo weapon "Appears on weapons training, duh!")
//
// --------------------------------------------------------------------------




ACTOR "Knife_RAT" : Knife //5010
{
	+POWERED_UP 
	Weapon.SisterWeapon Knife

	Weapon.SelectionOrder 1900
	obituary "%k killed %o with Knife."
	+WEAPON.WIMPY_WEAPON
	+WEAPON.MELEEWEAPON
	+INVENTORY.UNDROPPABLE
	Inventory.Pickupmessage "Picked up a knife!"
	Tag "Knife"
	Weapon.UpSound "KNIFE/Ready"
	//AttackSound "Knife/Slash" 
	Scale 0.18

	States
	{



	Fire:
		TNT1 A 1 A_PlayWeaponSound("Knife/Slash")
	TNT1 A 0 A_JUMP(256, 1, "FIRE2")
		TNT1 A 1 

		Goto Fire1

	Fire1:
		W19D A 1 A_CustomPunch(65, true, 0, "KnifePuff", 96)//A_GunFlash
		W19D BCDEFGHIJKLM 1 A_WeaponReady(WRF_NOFIRE)

		W19D N 1 A_WEAPONREADY
        TNT1 A 0 A_JumpIfInventory("IsAltFire",1,"Altfire")

		W19D O 1 A_WEAPONREADY
        TNT1 A 0 A_JumpIfInventory("IsAltFire",1,"Altfire")

		W19D P 1 A_WEAPONREADY
        TNT1 A 0 A_JumpIfInventory("IsAltFire",1,"Altfire")


		W19D Q 1 A_WEAPONREADY
        TNT1 A 0 A_JumpIfInventory("IsAltFire",1,"Altfire")

		W19D R 1 A_WEAPONREADY
        TNT1 A 0 A_JumpIfInventory("IsAltFire",1,"Altfire")

		W19D S 1 A_WEAPONREADY
        TNT1 A 0 A_JumpIfInventory("IsAltFire",1,"Altfire")

		W19D T 1 A_WEAPONREADY
        TNT1 A 0 A_JumpIfInventory("IsAltFire",1,"Altfire")

		W19D U 1 A_WEAPONREADY
        TNT1 A 0 A_JumpIfInventory("IsAltFire",1,"Altfire")

		W19D V 1 A_WEAPONREADY
        TNT1 A 0 A_JumpIfInventory("IsAltFire",1,"Altfire")

		W19D W 1 A_WEAPONREADY
        TNT1 A 0 A_JumpIfInventory("IsAltFire",1,"Altfire")

		W19D X 1 A_WEAPONREADY
        TNT1 A 0 A_JumpIfInventory("IsAltFire",1,"Altfire")

		W19D Y 1 A_WEAPONREADY
        TNT1 A 0 A_JumpIfInventory("IsAltFire",1,"Altfire")

		W19D Z 1 A_WEAPONREADY
        TNT1 A 0 A_JumpIfInventory("IsAltFire",1,"Altfire")

		
		
		
		
				W19E A 1 A_WEAPONREADY
        TNT1 A 0 A_JumpIfInventory("IsAltFire",1,"Altfire")

		W19E B 1 A_WEAPONREADY
        TNT1 A 0 A_JumpIfInventory("IsAltFire",1,"Altfire")

		W19E C 1 A_WEAPONREADY
        TNT1 A 0 A_JumpIfInventory("IsAltFire",1,"Altfire")

		W19E D 1 A_WEAPONREADY
        TNT1 A 0 A_JumpIfInventory("IsAltFire",1,"Altfire")

		W19E E 1 A_WEAPONREADY
        TNT1 A 0 A_JumpIfInventory("IsAltFire",1,"Altfire")

		W19E F 1 A_WEAPONREADY
        TNT1 A 0 A_JumpIfInventory("IsAltFire",1,"Altfire")

		W19E G 1 A_WEAPONREADY
        TNT1 A 0 A_JumpIfInventory("IsAltFire",1,"Altfire")

		W19E H 1 A_WEAPONREADY
        TNT1 A 0 A_JumpIfInventory("IsAltFire",1,"Altfire")

		W19E I 1 A_WEAPONREADY
        TNT1 A 0 A_JumpIfInventory("IsAltFire",1,"Altfire")

		W19E J 1 A_WEAPONREADY
        TNT1 A 0 A_JumpIfInventory("IsAltFire",1,"Altfire")

		W19E K 1 A_WEAPONREADY
        TNT1 A 0 A_JumpIfInventory("IsAltFire",1,"Altfire")

		W19E L 1 A_WEAPONREADY
        TNT1 A 0 A_JumpIfInventory("IsAltFire",1,"Altfire")

		W19E M 1 A_WEAPONREADY
        TNT1 A 0 A_JumpIfInventory("IsAltFire",1,"Altfire")

		W19E N 1 A_WEAPONREADY
        TNT1 A 0 A_JumpIfInventory("IsAltFire",1,"Altfire")
		Goto Ready

	Fire2:
		W19F A 1 A_CustomPunch(65, true, 0, "KnifePuff", 96)//A_GunFlash
		W19F BCDEFGHIJKLM 1 A_WeaponReady(WRF_NOFIRE)

		W19F N 1 A_WEAPONREADY
        TNT1 A 0 A_JumpIfInventory("IsAltFire",1,"Altfire")

		W19F O 1 A_WEAPONREADY
        TNT1 A 0 A_JumpIfInventory("IsAltFire",1,"Altfire")

		W19F P 1 A_WEAPONREADY
        TNT1 A 0 A_JumpIfInventory("IsAltFire",1,"Altfire")

		W19F Q 1 A_WEAPONREADY
        TNT1 A 0 A_JumpIfInventory("IsAltFire",1,"Altfire")

		W19F R 1 A_WEAPONREADY
        TNT1 A 0 A_JumpIfInventory("IsAltFire",1,"Altfire")

		W19F S 1 A_WEAPONREADY
        TNT1 A 0 A_JumpIfInventory("IsAltFire",1,"Altfire")

		W19F T 1 A_WEAPONREADY
        TNT1 A 0 A_JumpIfInventory("IsAltFire",1,"Altfire")

		W19F U 1 A_WEAPONREADY
        TNT1 A 0 A_JumpIfInventory("IsAltFire",1,"Altfire")

		W19F V 1 A_WEAPONREADY
        TNT1 A 0 A_JumpIfInventory("IsAltFire",1,"Altfire")

		W19F W 1 A_WEAPONREADY
        TNT1 A 0 A_JumpIfInventory("IsAltFire",1,"Altfire")

		W19F X 1 A_WEAPONREADY
        TNT1 A 0 A_JumpIfInventory("IsAltFire",1,"Altfire")

		W19F Y 1 A_WEAPONREADY
        TNT1 A 0 A_JumpIfInventory("IsAltFire",1,"Altfire")

		W19F Z 1 A_WEAPONREADY
        TNT1 A 0 A_JumpIfInventory("IsAltFire",1,"Altfire")



		W19G A 1 A_WEAPONREADY
        TNT1 A 0 A_JumpIfInventory("IsAltFire",1,"Altfire")

		W19G B 1 A_WEAPONREADY
        TNT1 A 0 A_JumpIfInventory("IsAltFire",1,"Altfire")

		W19G C 1 A_WEAPONREADY
        TNT1 A 0 A_JumpIfInventory("IsAltFire",1,"Altfire")

		W19G D 1 A_WEAPONREADY
        TNT1 A 0 A_JumpIfInventory("IsAltFire",1,"Altfire")

		W19G E 1 A_WEAPONREADY
        TNT1 A 0 A_JumpIfInventory("IsAltFire",1,"Altfire")

		W19G F 1 A_WEAPONREADY
        TNT1 A 0 A_JumpIfInventory("IsAltFire",1,"Altfire")

		W19G G 1 A_WEAPONREADY
        TNT1 A 0 A_JumpIfInventory("IsAltFire",1,"Altfire")

		W19G H 1 A_WEAPONREADY
        TNT1 A 0 A_JumpIfInventory("IsAltFire",1,"Altfire")

		W19G I 1 A_WEAPONREADY
        TNT1 A 0 A_JumpIfInventory("IsAltFire",1,"Altfire")

		W19G J 1 A_WEAPONREADY
        TNT1 A 0 A_JumpIfInventory("IsAltFire",1,"Altfire")

		W19G K 1 A_WEAPONREADY
        TNT1 A 0 A_JumpIfInventory("IsAltFire",1,"Altfire")

		W19G L 1 A_WEAPONREADY
        TNT1 A 0 A_JumpIfInventory("IsAltFire",1,"Altfire")

		W19G M 1 A_WEAPONREADY
        TNT1 A 0 A_JumpIfInventory("IsAltFire",1,"Altfire")

		W19G N 1 A_WEAPONREADY
        TNT1 A 0 A_JumpIfInventory("IsAltFire",1,"Altfire")

		W19G O 1 A_WEAPONREADY
        TNT1 A 0 A_JumpIfInventory("IsAltFire",1,"Altfire")
		
		
		Goto Ready


	AltFire:
		TNT1 A 0 A_PlayWeaponSound("Knife/Slash")
		W19H ABC 1 A_WeaponReady(WRF_NOFIRE)
		W19H D 1 A_CustomPunch(90, true, 0, "KnifePuff2", 128)//, 0.175, 50)//A_GunFlash
		W19H EFGHIJKLMNOPQRSQRSQRSTUVWXYZ 1 A_WeaponReady(WRF_NOFIRE)
		W19I ABCDEFGHI 1 A_WeaponReady(WRF_NOFIRE)
        TNT1 A 0 A_JumpIfInventory("IsAltFire",1,"Altfire")
		W19I JK 1 A_WEAPONREADY//(WRF_NOFIRE)
        TNT1 A 0 A_JumpIfInventory("IsAltFire",1,"Altfire")
		W19I LM 1 A_WEAPONREADY//(WRF_NOFIRE)
        TNT1 A 0 A_JumpIfInventory("IsAltFire",1,"Altfire")
		Goto Ready






	}
}

