// --------------------------------------------------------------------------
//
//	KNIFE
//
// --------------------------------------------------------------------------

ACTOR Knife : BrutalWeapon
{
	tag "Knife"
scale 0.25
	Inventory.PickupSound "items/knife"
	obituary "%o was shanked by %k's combat knife."
	inventory.pickupmessage "You got the combat knife!"
	Weapon.SelectionOrder 20000
	+WEAPON.AXEBLOOD
	+WEAPON.MELEEWEAPON
	-WEAPON.CHEATNOTWEAPON
damagetype Cut //Saw

	States
	{
	Spawn:
		KNFW A -1
		stop

	Select:
		TNT1 A 0 A_JumpIfInventory("IsPlayingAsPurist",1,"PuristGun")
		TNT1 A 0 A_Giveinventory("FistsSelected",1)
		TNT1 A 0 A_Giveinventory("GoSpecial",1)
		TNT1 A 0 A_Takeinventory("Unloading",1)
		TNT1 A 0 A_Takeinventory("Reloading",1)
		TNT1 A 0 A_TakeInventory("TossGrenade",1)
		TNT1 A 0 A_Takeinventory("WeapSpecial",1)
	//	TNT1 A 0 A_Takeinventory("SwitchFlashlight",1)
		TNT1 A 0 A_Takeinventory("Taunting",1)
	TNT1 A 0 A_Giveinventory("HasCutingWeapon",1)
		TNT1 A 0 A_Takeinventory("PowerBloodOnVisor",1)
		TNT1 A 0 A_Takeinventory("PowerBlueBloodOnVisor",1)
		TNT1 A 0 A_Takeinventory("PowerGreenBloodOnVisor",1)
	//	TNT1 A 0 A_Takeinventory("IdleCounter",200)
		TNT1 A 5
		TNT1 A 0 A_Raise
		Wait
		




	CheckSprint:
				TNT1 A 0 A_JumpIfInventory("PowerBlueBloodOnVisor",1,"Blue")
TNT1 A 0 A_JumpIfInventory("PowerGreenBloodOnVisor",1,"Green")
TNT1 A 0 A_JumpIfInventory("PowerBloodOnVisor",1,"Red")
KNFS B 1  A_WeaponReady(WRF_NOFIRE)
Goto Continue
Blue:
KNLA B 1  A_WeaponReady(WRF_NOFIRE)
Goto Continue
Green:
KNGA B 1  A_WeaponReady(WRF_NOFIRE)
Goto Continue
Red:
KNBA B 1  A_WeaponReady(WRF_NOFIRE)
Goto Continue
Continue:

		UNHG A 0 A_JumpIfInventory("IsStandingStill", 1, "Ready3")
		UNHG A 0 A_JumpIfInventory("IsTacticalClass", 1, "StartSprint")
		Goto Ready
		
	StartSprint:
		TNT1 A 0 A_JumpIfInventory("PowerBlueBloodOnVisor",1,"Blue")
TNT1 A 0 A_JumpIfInventory("PowerGreenBloodOnVisor",1,"Green")
TNT1 A 0 A_JumpIfInventory("PowerBloodOnVisor",1,"Red")
KNFS B 1  A_WeaponReady(WRF_NOFIRE)
Goto Continue
Blue:
KNLA B 1  A_WeaponReady(WRF_NOFIRE)
Goto Continue
Green:
KNGA B 1  A_WeaponReady(WRF_NOFIRE)
Goto Continue
Red:
KNBA B 1  A_WeaponReady(WRF_NOFIRE)
Goto Continue
Continue:
		UNHG A 0 A_Takeinventory("Zoomed",1)
		UNHG A 0 A_Takeinventory("ADSmode",1)
		UNHG A 0 A_ZoomFactor(1.0)
		UNHG A 0 A_JumpIfInventory("UsedStamina", 40, "StopSprintTired")
		
	Sprinting:	
		UNHG A 0 offset(-9,32) 
		UNHG A 0 offset(-9,32) A_JumpIfInventory("IsStandingStill", 1, "Ready3")
		UNHG A 0 offset(-9,32) A_JumpIfInventory("UsedStamina", 100, "StopSprintTired")
		PLAY A 0 offset(-9,32) ACS_ExecuteAlways(852, 0, 0, 0, 0)//Makes player faster.
		UNHG A 0 offset(-9,32) A_JumpIfInventory("PowerStrength", 1, 2)
		UNHG A 0 offset(-9,32) A_GiveInventory("UsedStamina", 12)
		UNHG A 0 offset(-9,32)
				TNT1 A 0 A_JumpIfInventory("PowerBlueBloodOnVisor",1,"Blue")
TNT1 A 0 A_JumpIfInventory("PowerGreenBloodOnVisor",1,"Green")
TNT1 A 0 A_JumpIfInventory("PowerBloodOnVisor",1,"Red")
KNFS B 1 A_SetPitch(pitch -0.25) //-0.5
Goto Continue
Blue:
KNLA B 1 offset(-9,34) A_SetPitch(pitch -0.25) //-0.5
Goto Continue
Green:
KNGA B 1 offset(-9,34) A_SetPitch(pitch -0.25) //-0.5
Goto Continue
Red:
KNBA B 1 offset(-9,34) A_SetPitch(pitch -0.25) //-0.5
Goto Continue
Continue:

				TNT1 A 0 A_JumpIfInventory("PowerBlueBloodOnVisor",1,"Blue")
TNT1 A 0 A_JumpIfInventory("PowerGreenBloodOnVisor",1,"Green")
TNT1 A 0 A_JumpIfInventory("PowerBloodOnVisor",1,"Red")
KNFS B 1 offset(-6,36) A_SetPitch(pitch -0.25)
Goto Continue
Blue:
KNLA B 1 offset(-6,36) A_SetPitch(pitch -0.25)
Goto Continue
Green:
KNGA B 1 offset(-6,36) A_SetPitch(pitch -0.25)
Goto Continue
Red:
KNBA B 1 offset(-6,36) A_SetPitch(pitch -0.25)
Goto Continue
Continue:

				TNT1 A 0 A_JumpIfInventory("PowerBlueBloodOnVisor",1,"Blue")
TNT1 A 0 A_JumpIfInventory("PowerGreenBloodOnVisor",1,"Green")
TNT1 A 0 A_JumpIfInventory("PowerBloodOnVisor",1,"Red")
KNFS B 1 offset(-3,38) A_SetPitch(pitch -0.25)
Goto Continue
Blue:
KNLA B 1 offset(-3,38) A_SetPitch(pitch -0.25)
Goto Continue
Green:
KNGA B 1 offset(-3,38) A_SetPitch(pitch -0.25)
Goto Continue
Red:
KNBA B 1 offset(-3,38) A_SetPitch(pitch -0.25)
Goto Continue
Continue:


				TNT1 A 0 A_JumpIfInventory("PowerBlueBloodOnVisor",1,"Blue")
TNT1 A 0 A_JumpIfInventory("PowerGreenBloodOnVisor",1,"Green")
TNT1 A 0 A_JumpIfInventory("PowerBloodOnVisor",1,"Red")
KNFS B 1 offset(0,38) A_SetPitch(pitch -0.25)
Goto Continue
Blue:
KNLA B 1 offset(0,38) A_SetPitch(pitch -0.25)
Goto Continue
Green:
KNGA B 1 offset(0,38) A_SetPitch(pitch -0.25)
Goto Continue
Red:
KNBA B 1 offset(0,38) A_SetPitch(pitch -0.25)
Goto Continue
Continue:


				TNT1 A 0 A_JumpIfInventory("PowerBlueBloodOnVisor",1,"Blue")
TNT1 A 0 A_JumpIfInventory("PowerGreenBloodOnVisor",1,"Green")
TNT1 A 0 A_JumpIfInventory("PowerBloodOnVisor",1,"Red")
KNFS B 1 offset(3,36) A_SetPitch(pitch -0.25)
Goto Continue
Blue:
KNLA B 1 offset(3,36) A_SetPitch(pitch -0.25)
Goto Continue
Green:
KNGA B 1 offset(3,36) A_SetPitch(pitch -0.25)
Goto Continue
Red:
KNBA B 1 offset(3,36) A_SetPitch(pitch -0.25)
Goto Continue
Continue:

				TNT1 A 0 A_JumpIfInventory("PowerBlueBloodOnVisor",1,"Blue")
TNT1 A 0 A_JumpIfInventory("PowerGreenBloodOnVisor",1,"Green")
TNT1 A 0 A_JumpIfInventory("PowerBloodOnVisor",1,"Red")
KNFS B 1 offset(6,34) A_SetPitch(pitch -0.25)
Goto Continue
Blue:
KNLA B 1 offset(6,34) A_SetPitch(pitch -0.25)
Goto Continue
Green:
KNGA B 1 offset(6,34) A_SetPitch(pitch -0.25)
Goto Continue
Red:
KNBA B 1 offset(6,34) A_SetPitch(pitch -0.25)
Goto Continue
Continue:

				TNT1 A 0 A_JumpIfInventory("PowerBlueBloodOnVisor",1,"Blue")
TNT1 A 0 A_JumpIfInventory("PowerGreenBloodOnVisor",1,"Green")
TNT1 A 0 A_JumpIfInventory("PowerBloodOnVisor",1,"Red")
KNFS B 1 offset(9,32) A_SetPitch(pitch -0.25)
Goto Continue
Blue:
KNLA B 1 offset(9,32) A_SetPitch(pitch -0.25)
Goto Continue
Green:
KNGA B 1 offset(9,32) A_SetPitch(pitch -0.25)
Goto Continue
Red:
KNBA B 1 offset(9,32) A_SetPitch(pitch -0.25)
Goto Continue
Continue:

		UNHG A 0 offset(9,32) A_WeaponReady(WRF_NOBOB)
		UNHG A 0 A_JumpIfInventory("Kicking",1,"DoKick")
        UNHG A 0 A_JumpIfInventory("Taunting",1,"Taunt")
        UNHG A 0 A_JumpIfInventory("Reloading",1,"Reload")
		UNHG A 0 offset(-9,32) A_GiveInventory("UsedStamina", 12)
		UNHG A 0 offset(9,33) A_SpawnItemEx("FootStep", 0, 0, 2, 0, 0, -4)
						TNT1 A 0 A_JumpIfInventory("PowerBlueBloodOnVisor",1,"Blue")
TNT1 A 0 A_JumpIfInventory("PowerGreenBloodOnVisor",1,"Green")
TNT1 A 0 A_JumpIfInventory("PowerBloodOnVisor",1,"Red")
KNFS B 1 offset(9,34) A_SetPitch(pitch +0.5)
Goto Continue
Blue:
KNLA B 1 offset(9,34) A_SetPitch(pitch +0.5)
Goto Continue
Green:
KNGA B 1 offset(9,34) A_SetPitch(pitch +0.5)
Goto Continue
Red:
KNBA B 1 offset(9,34) A_SetPitch(pitch +0.5)
Goto Continue
Continue:

								TNT1 A 0 A_JumpIfInventory("PowerBlueBloodOnVisor",1,"Blue")
TNT1 A 0 A_JumpIfInventory("PowerGreenBloodOnVisor",1,"Green")
TNT1 A 0 A_JumpIfInventory("PowerBloodOnVisor",1,"Red")
KNFS B 1 offset(6,36) A_SetPitch(pitch +0.5)
Goto Continue
Blue:
KNLA B 1 offset(6,36) A_SetPitch(pitch +0.5)
Goto Continue
Green:
KNGA B 1 offset(6,36) A_SetPitch(pitch +0.5)
Goto Continue
Red:
KNBA B 1 offset(6,36) A_SetPitch(pitch +0.5)
Goto Continue
Continue:


						TNT1 A 0 A_JumpIfInventory("PowerBlueBloodOnVisor",1,"Blue")
TNT1 A 0 A_JumpIfInventory("PowerGreenBloodOnVisor",1,"Green")
TNT1 A 0 A_JumpIfInventory("PowerBloodOnVisor",1,"Red")
KNFS B 1 offset(3,38) A_SetPitch(pitch +0.5)
Goto Continue
Blue:
KNLA B 1 offset(3,38) A_SetPitch(pitch +0.5)
Goto Continue
Green:
KNGA B 1 offset(3,38) A_SetPitch(pitch +0.5)
Goto Continue
Red:
KNBA B 1 offset(3,38) A_SetPitch(pitch +0.5)
Goto Continue
Continue:


								TNT1 A 0 A_JumpIfInventory("PowerBlueBloodOnVisor",1,"Blue")
TNT1 A 0 A_JumpIfInventory("PowerGreenBloodOnVisor",1,"Green")
TNT1 A 0 A_JumpIfInventory("PowerBloodOnVisor",1,"Red")
KNFS B 1 offset(0,38) A_SetPitch(pitch +0.5)
Goto Continue
Blue:
KNLA B 1 offset(0,38) A_SetPitch(pitch +0.5)
Goto Continue
Green:
KNGA B 1 offset(0,38) A_SetPitch(pitch +0.5)
Goto Continue
Red:
KNBA B 1 offset(0,38) A_SetPitch(pitch +0.5)
Goto Continue
Continue:

								TNT1 A 0 A_JumpIfInventory("PowerBlueBloodOnVisor",1,"Blue")
TNT1 A 0 A_JumpIfInventory("PowerGreenBloodOnVisor",1,"Green")
TNT1 A 0 A_JumpIfInventory("PowerBloodOnVisor",1,"Red")
KNFS B 1 offset(-3,36) A_SetPitch(pitch +0.5)
Goto Continue
Blue:
KNLA B 1 offset(-3,36) A_SetPitch(pitch +0.5)
Goto Continue
Green:
KNGA B 1 offset(-3,36) A_SetPitch(pitch +0.5)
Goto Continue
Red:
KNBA B 1 offset(-3,36) A_SetPitch(pitch +0.5)
Goto Continue
Continue:

								TNT1 A 0 A_JumpIfInventory("PowerBlueBloodOnVisor",1,"Blue")
TNT1 A 0 A_JumpIfInventory("PowerGreenBloodOnVisor",1,"Green")
TNT1 A 0 A_JumpIfInventory("PowerBloodOnVisor",1,"Red")
KNFS B 1 offset(-6,34) A_SetPitch(pitch +0.5)
Goto Continue
Blue:
KNLA B 1 offset(-6,34) A_SetPitch(pitch +0.5)
Goto Continue
Green:
KNGA B 1 offset(-6,34) A_SetPitch(pitch +0.5)
Goto Continue
Red:
KNBA B 1 offset(-6,34) A_SetPitch(pitch +0.5)
Goto Continue
Continue:


								TNT1 A 0 A_JumpIfInventory("PowerBlueBloodOnVisor",1,"Blue")
TNT1 A 0 A_JumpIfInventory("PowerGreenBloodOnVisor",1,"Green")
TNT1 A 0 A_JumpIfInventory("PowerBloodOnVisor",1,"Red")
KNFS B 1 offset(-9,32) A_SetPitch(pitch +0.5)
Goto Continue
Blue:
KNLA B 1 offset(-9,32) A_SetPitch(pitch +0.5)
Goto Continue
Green:
KNGA B 1 offset(-9,32) A_SetPitch(pitch +0.5)
Goto Continue
Red:
KNBA B 1 offset(-9,32) A_SetPitch(pitch +0.5)
Goto Continue
Continue:


		UNHG A 0 offset(-9,32) A_WeaponReady(WRF_NOBOB)
		UNHG A 0 offset(-9,32) A_JumpIfInventory("IsRunning", 1, "Sprinting")
		Goto StopSprint
		
	StopSprintTired:
				TNT1 A 0 A_JumpIfInventory("PowerBlueBloodOnVisor",1,"Blue")
TNT1 A 0 A_JumpIfInventory("PowerGreenBloodOnVisor",1,"Green")
TNT1 A 0 A_JumpIfInventory("PowerBloodOnVisor",1,"Red")
KNFS B 1
Goto Continue
Blue:
KNLA B 1
Goto Continue
Green:
KNGA B 1
Goto Continue
Red:
KNBA B 1
Goto Continue
Continue:

		PLAY A 0 ACS_ExecuteAlways(853, 0, 0, 0, 0)//Makes player slower.
		UNHG A 0 A_PlaySound("Tired", 2)
		UNHG A 0 A_TakeInventory("UsedStamina", 2)			TNT1 A 0 A_JumpIfInventory("PowerBlueBloodOnVisor",1,"Blue")
TNT1 A 0 A_JumpIfInventory("PowerGreenBloodOnVisor",1,"Green")
TNT1 A 0 A_JumpIfInventory("PowerBloodOnVisor",1,"Red")
KNFS B 5 A_WeaponReady
Goto Continue
Blue:
KNLA B 5 A_WeaponReady 
Goto Continue
Green:
KNGA B 5 A_WeaponReady
Goto Continue
Red:
KNBA B 5 A_WeaponReady
Goto Continue
Continue:
		UNHG A 0 A_TakeInventory("UsedStamina", 2)
		TNT1 A 0 A_JumpIfInventory("PowerBlueBloodOnVisor",1,"Blue")
TNT1 A 0 A_JumpIfInventory("PowerGreenBloodOnVisor",1,"Green")
TNT1 A 0 A_JumpIfInventory("PowerBloodOnVisor",1,"Red")
KNFS B 5 A_WeaponReady
Goto Continue
Blue:
KNLA B 5 A_WeaponReady 
Goto Continue
Green:
KNGA B 5 A_WeaponReady
Goto Continue
Red:
KNBA B 5 A_WeaponReady
Goto Continue
Continue:
		UNHG A 0 A_TakeInventory("UsedStamina", 2)
		TNT1 A 0 A_JumpIfInventory("PowerBlueBloodOnVisor",1,"Blue")
TNT1 A 0 A_JumpIfInventory("PowerGreenBloodOnVisor",1,"Green")
TNT1 A 0 A_JumpIfInventory("PowerBloodOnVisor",1,"Red")
KNFS B 5 A_WeaponReady
Goto Continue
Blue:
KNLA B 5 A_WeaponReady 
Goto Continue
Green:
KNGA B 5 A_WeaponReady
Goto Continue
Red:
KNBA B 5 A_WeaponReady
Goto Continue
Continue:
		UNHG A 0 A_TakeInventory("UsedStamina", 2)
		TNT1 A 0 A_JumpIfInventory("PowerBlueBloodOnVisor",1,"Blue")
TNT1 A 0 A_JumpIfInventory("PowerGreenBloodOnVisor",1,"Green")
TNT1 A 0 A_JumpIfInventory("PowerBloodOnVisor",1,"Red")
KNFS B 5 A_WeaponReady
Goto Continue
Blue:
KNLA B 5 A_WeaponReady 
Goto Continue
Green:
KNGA B 5 A_WeaponReady
Goto Continue
Red:
KNBA B 5 A_WeaponReady
Goto Continue
Continue:
		UNHG A 0 A_TakeInventory("UsedStamina", 2)
		TNT1 A 0 A_JumpIfInventory("PowerBlueBloodOnVisor",1,"Blue")
TNT1 A 0 A_JumpIfInventory("PowerGreenBloodOnVisor",1,"Green")
TNT1 A 0 A_JumpIfInventory("PowerBloodOnVisor",1,"Red")
KNFS B 5 A_WeaponReady
Goto Continue
Blue:
KNLA B 5 A_WeaponReady 
Goto Continue
Green:
KNGA B 5 A_WeaponReady
Goto Continue
Red:
KNBA B 5 A_WeaponReady
Goto Continue
Continue:
		Goto Ready3
	StopSprint:
				TNT1 A 0 A_JumpIfInventory("PowerBlueBloodOnVisor",1,"Blue")
TNT1 A 0 A_JumpIfInventory("PowerGreenBloodOnVisor",1,"Green")
TNT1 A 0 A_JumpIfInventory("PowerBloodOnVisor",1,"Red")
KNFS B 1 
Goto Continue
Blue:
KNLA B 1 
Goto Continue
Green:
KNGA B 1
Goto Continue
Red:
KNBA B 1
Goto Continue
Continue:
		UNHG A 0 A_JumpIfInventory("UsedStamina", 60, "StopSprintTired")
		PLAY A 0 ACS_ExecuteAlways(853, 0, 0, 0, 0)//Makes player slower.
		Goto Ready3



	Deselect:
		TNT1 A 0 A_PlaySound("weapons/changing")
		TNT1 A 0 A_JumpIfInventory("PowerBlueBloodOnVisor",1,21)
		TNT1 A 0 A_JumpIfInventory("PowerGreenBloodOnVisor",1,14)
		TNT1 A 0 A_JumpIfInventory("PowerBloodOnVisor",1,7)
		KNFS ABCDE 1
		TNT1 A 0 A_Jump(256,18)
		KNBS ABCDE 1
		TNT1 A 0 A_Jump(256,12)
		KNGS ABCDE 1
		TNT1 A 0 A_Jump(256,6)
		KNLS ABCDE 1
		TNT1 A 1 A_Takeinventory("FistsSelected",1)
		TNT1 A 0 A_Takeinventory("PowerBloodOnVisor",1)
		TNT1 A 0 A_Takeinventory("PowerBlueBloodOnVisor",1)
		TNT1 A 0 A_Takeinventory("PowerGreenBloodOnVisor",1)
SAWG A 0 A_Takeinventory("HasCutingWeapon",1)
		TNT1 A 0 A_Lower
		Wait
		
	Ready:
		TNT1 A 0 A_JumpIfInventory("JustStartedGame",1,"WarmUp")
		TNT1 A 0 A_JumpIfInventory("GoFatality",1,"Steady")
		TNT1 A 0 A_PlaySound("items/knife",5)
	Ready1:
		TNT1 A 0 A_JumpIfInventory("PowerBlueBloodOnVisor",1,"BlueB")
		TNT1 A 0 A_JumpIfInventory("PowerGreenBloodOnVisor",1,"GreenB")
		TNT1 A 0 A_JumpIfInventory("PowerBloodOnVisor",1,"RedB")
		KNFS EDCBA 1
		Goto Ready2
RedB:
		KNBS EDCBA 1
		Goto Ready2
GreenB:
		KNGS EDCBA 1
		Goto Ready2
BlueB:
		KNLS EDCBA 1
	Ready2:
		TNT1 A 0 A_GunFlash
	Ready3:
SAWG A 0 A_Giveinventory("HasCutingWeapon",1) //xx		
TNT1 A 0 A_JumpIfInventory("Kicking",1,"DoKick")
		TNT1 A 0 A_JumpIfInventory("Taunting",1,"Taunt")
		TNT1 A 0 A_JumpIfInventory("Salute1",1,"Salute")
		TNT1 A 0 A_JumpIfInventory("Salute2",1,"Salute")
		TNT1 A 0 A_JumpIfInventory("TossGrenade",1,"TossGrenade")
TNT1 A 0 A_JumpIfInventory("IsRunning",1,"CheckSprint")		
//TNT1 A 0 A_JumpIfInventory("IdleCounter",200,"PlayerIsIdle")
		TNT1 A 0 A_JumpIfInventory("PowerBlueBloodOnVisor",1,"BlueReady")
		TNT1 A 0 A_JumpIfInventory("PowerGreenBloodOnVisor",1,"GreenReady")
		TNT1 A 0 A_JumpIfInventory("PowerBloodOnVisor",1,"RedReady")
		KNFA A 1 A_WeaponReady
		Goto Ready3
RedReady:
		KNBA A 1 A_WeaponReady
SAWG A 0 A_TakeInventory("PowerBlueBloodOnVisor", 1)
SAWG A 0 A_TakeInventory("PowerGreenBloodOnVisor", 1)
		Goto Ready3
GreenReady:
		KNGA A 1 A_WeaponReady
SAWG A 0 A_TakeInventory("PowerBlueBloodOnVisor", 1)
SAWG A 0 A_TakeInventory("PowerBloodOnVisor", 1)
		Goto Ready3
BlueReady:
		KNLA A 1 A_WeaponReady
SAWG A 0 A_TakeInventory("PowerBloodOnVisor", 1)
SAWG A 0 A_TakeInventory("PowerGreenBloodOnVisor", 1)
		Goto Ready3

// --------------------------------------------------------------------------
//
//	Normal Attack
//
// --------------------------------------------------------------------------

	Fire:
		TNT1 A 0 A_JumpIfInventory("FireSeq",2,"Fire3")
		TNT1 A 0 A_JumpIfInventory("FireSeq",1,"Fire2")
		TNT1 A 0 A_GiveInventory("FireSeq",1)
		TNT1 A 0 A_JumpIfInventory("PowerBloodOnVisor",1,"FireBlood")
		TNT1 A 0 A_JumpIfInventory("PowerGreenBloodOnVisor",1,"FireGreenBlood")
		TNT1 A 0 A_JumpIfInventory("PowerBlueBloodOnVisor",1,"FireBlueBlood")
		KNFA BC 1
		TNT1 A 0 A_PlaySound("weapons/wiff")
		KNFA DEFG 1
		TNT1 A 0 A_CustomPunch(Random(10,40),1,0,"knifePuff")
		KNFA HI 1
		TNT1 A 3
		TNT1 A 0 A_JumpIfInventory("PowerWeaponLevel2",1,2)
		TNT1 A 2
		TNT1 A 0 A_Refire
		TNT1 A 0 A_TakeInventory("FireSeq",3)
		goto Ready1
		
	FireBlood:
		KNBA BC 1
		TNT1 A 0 A_PlaySound("weapons/wiff")
		KNBA DEFG 1
		TNT1 A 0 A_CustomPunch(Random(10,40),1,0,"knifePuff")
		KNBA HI 1
		TNT1 A 3
		TNT1 A 0 A_JumpIfInventory("PowerWeaponLevel2",1,2)
		TNT1 A 2
		TNT1 A 0 A_JumpIfInventory("PowerGreenBloodOnVisor",1,"RemoveRed")
		TNT1 A 0 A_JumpIfInventory("PowerBlueBloodOnVisor",1,"RemoveRed")
		TNT1 A 0 A_Refire
		TNT1 A 0 A_TakeInventory("FireSeq",3)
		goto Ready1

	FireGreenBlood:
		KNGA BC 1
		TNT1 A 0 A_PlaySound("weapons/wiff")
		KNGA DEFG 1
		TNT1 A 0 A_CustomPunch(Random(10,40),1,0,"knifePuff")
		KNGA HI 1
		TNT1 A 3
		TNT1 A 0 A_JumpIfInventory("PowerWeaponLevel2",1,2)
		TNT1 A 2
		TNT1 A 0 A_JumpIfInventory("PowerBloodOnVisor",1,"RemoveGreen")
		TNT1 A 0 A_JumpIfInventory("PowerBlueBloodOnVisor",1,"RemoveGreen")
		TNT1 A 0 A_Refire
		TNT1 A 0 A_TakeInventory("FireSeq",3)
		goto Ready1
		
	FireBlueBlood:
		KNLA BC 1
		TNT1 A 0 A_PlaySound("weapons/wiff")
		KNLA DEFG 1
		TNT1 A 0 A_CustomPunch(Random(10,40),1,0,"knifePuff")
		KNLA HI 1
		TNT1 A 3
		TNT1 A 0 A_JumpIfInventory("PowerWeaponLevel2",1,2)
		TNT1 A 2
		TNT1 A 0 A_JumpIfInventory("PowerBloodOnVisor",1,"RemoveBlue")
		TNT1 A 0 A_JumpIfInventory("PowerGreenBloodOnVisor",1,"RemoveBlue")
		TNT1 A 0 A_Refire
		TNT1 A 0 A_TakeInventory("FireSeq",3)
		goto Ready1

	Fire2:
		TNT1 A 0 A_GiveInventory("FireSeq",1)
		TNT1 A 0 A_PlaySound("weapons/wiff")
		TNT1 A 0 A_JumpIfInventory("PowerBloodOnVisor",1,"FireBlood2")
		TNT1 A 0 A_JumpIfInventory("PowerGreenBloodOnVisor",1,"FireGreenBlood2")
		TNT1 A 0 A_JumpIfInventory("PowerBlueBloodOnVisor",1,"FireBlueBlood2")
		KNFA NOP 1
		TNT1 A 0 A_CustomPunch(Random(10,40),1,0,"knifePuff")
		KNFA QRS 1
		TNT1 A 0 A_JumpIfInventory("Kicking",1,"KickLeft")
		TNT1 A 3
		TNT1 A 0 A_JumpIfInventory("PowerWeaponLevel2",1,2)
		TNT1 A 2
		TNT1 A 0 A_Refire
		TNT1 A 0 A_TakeInventory("FireSeq",3)
		goto Ready1
		
	FireBlood2:
		KNBA NOP 1
		TNT1 A 0 A_CustomPunch(Random(10,40),1,0,"knifePuff")
		KNBA QRS 1
		TNT1 A 0 A_JumpIfInventory("Kicking",1,"KickLeft")
		TNT1 A 3
		TNT1 A 0 A_JumpIfInventory("PowerWeaponLevel2",1,2)
		TNT1 A 2
		TNT1 A 0 A_JumpIfInventory("PowerGreenBloodOnVisor",1,"RemoveRed")
		TNT1 A 0 A_JumpIfInventory("PowerBlueBloodOnVisor",1,"RemoveRed")
		TNT1 A 0 A_Refire
		TNT1 A 0 A_TakeInventory("FireSeq",3)
		goto Ready1
		
	FireGreenBlood2:
		KNGA NOP 1
		TNT1 A 0 A_CustomPunch(Random(10,40),1,0,"knifePuff")
		KNGA QRS 1
		TNT1 A 0 A_JumpIfInventory("Kicking",1,"KickLeft")
		TNT1 A 3
		TNT1 A 0 A_JumpIfInventory("PowerWeaponLevel2",1,2)
		TNT1 A 2
		TNT1 A 0 A_JumpIfInventory("PowerBloodOnVisor",1,"RemoveGreen")
		TNT1 A 0 A_JumpIfInventory("PowerBlueBloodOnVisor",1,"RemoveGreen")
		TNT1 A 0 A_Refire
		TNT1 A 0 A_TakeInventory("FireSeq",3)
		goto Ready1

	FireBlueBlood2:
		KNLA NOP 1
		TNT1 A 0 A_CustomPunch(Random(10,40),1,0,"knifePuff")
		KNLA QRS 1
		TNT1 A 0 A_JumpIfInventory("Kicking",1,"KickLeft")
		TNT1 A 3
		TNT1 A 0 A_JumpIfInventory("PowerWeaponLevel2",1,2)
		TNT1 A 2
		TNT1 A 0 A_JumpIfInventory("PowerBloodOnVisor",1,"RemoveBlue")
		TNT1 A 0 A_JumpIfInventory("PowerGreenBloodOnVisor",1,"RemoveBlue")
		TNT1 A 0 A_Refire
		TNT1 A 0 A_TakeInventory("FireSeq",3)
		goto Ready1

	Fire3:
		TNT1 A 0 A_TakeInventory("FireSeq",1)
		TNT1 A 0 A_JumpIfInventory("PowerBloodOnVisor",1,"FireBlood3")
		TNT1 A 0 A_JumpIfInventory("PowerGreenBloodOnVisor",1,"FireGreenBlood3")
		TNT1 A 0 A_JumpIfInventory("PowerBlueBloodOnVisor",1,"FireBlueBlood3")
		KNFA T 1
		TNT1 A 0 A_PlaySound("weapons/wiff")
		KNFA UVFG 1
		TNT1 A 0 A_CustomPunch(Random(10,40),1,0,"knifePuff")
		KNFA HI 1
		TNT1 A 3
		TNT1 A 0 A_JumpIfInventory("PowerWeaponLevel2",1,2)
		TNT1 A 2
		TNT1 A 0 A_Refire
		TNT1 A 0 A_TakeInventory("FireSeq",3)
		goto Ready1
		
	FireBlood3:
		KNBA T 1
		TNT1 A 0 A_PlaySound("weapons/wiff")
		KNBA UVFG 1
		TNT1 A 0 A_CustomPunch(Random(10,40),1,0,"knifePuff")
		KNBA HI 1
		TNT1 A 3
		TNT1 A 0 A_JumpIfInventory("PowerWeaponLevel2",1,2)
		TNT1 A 2
		TNT1 A 0 A_JumpIfInventory("PowerGreenBloodOnVisor",1,"RemoveRed")
		TNT1 A 0 A_JumpIfInventory("PowerBlueBloodOnVisor",1,"RemoveRed")
		TNT1 A 0 A_Refire
		TNT1 A 0 A_TakeInventory("FireSeq",3)
		goto Ready1

	FireGreenBlood3:
		KNGA T 1
		TNT1 A 0 A_PlaySound("weapons/wiff")
		KNGA UVFG 1
		TNT1 A 0 A_CustomPunch(Random(10,40),1,0,"knifePuff")
		KNGA HI 1
		TNT1 A 3
		TNT1 A 0 A_JumpIfInventory("PowerWeaponLevel2",1,2)
		TNT1 A 2
		TNT1 A 0 A_JumpIfInventory("PowerBloodOnVisor",1,"RemoveGreen")
		TNT1 A 0 A_JumpIfInventory("PowerBlueBloodOnVisor",1,"RemoveGreen")
		TNT1 A 0 A_Refire
		TNT1 A 0 A_TakeInventory("FireSeq",3)
		goto Ready1

	FireBlueBlood3:
		KNLA T 1
		TNT1 A 0 A_PlaySound("weapons/wiff")
		KNLA UVFG 1
		TNT1 A 0 A_CustomPunch(Random(10,40),1,0,"knifePuff")
		KNLA HI 1
		TNT1 A 3
		TNT1 A 0 A_JumpIfInventory("PowerWeaponLevel2",1,2)
		TNT1 A 2
		TNT1 A 0 A_JumpIfInventory("PowerBloodOnVisor",1,"RemoveBlue")
		TNT1 A 0 A_JumpIfInventory("PowerGreenBloodOnVisor",1,"RemoveBlue")
		TNT1 A 0 A_Refire
		TNT1 A 0 A_TakeInventory("FireSeq",3)
		goto Ready1

	RemoveRed:
		TNT1 A 0 A_TakeInventory("PowerBloodOnVisor",1)
		TNT1 A 0 A_Refire
		TNT1 A 0 A_TakeInventory("FireSeq",3)
		goto Ready1

	RemoveGreen:
		TNT1 A 0 A_TakeInventory("PowerGreenBloodOnVisor",1)
		TNT1 A 0 A_Refire
		TNT1 A 0 A_TakeInventory("FireSeq",3)
		goto Ready1
		
	RemoveBlue:
		TNT1 A 0 A_TakeInventory("PowerBlueBloodOnVisor",1)
		TNT1 A 0 A_Refire
		TNT1 A 0 A_TakeInventory("FireSeq",3)
		goto Ready1

// --------------------------------------------------------------------------
//
//	Kick combo
//
// --------------------------------------------------------------------------

	KickLeft:
		TNT1 A 0 A_PlaySound("KICK")
		TNT1 A 0 SetPlayerProperty(0,1,0)
		TNT1 A 2 A_SetPitch(-1 + pitch)
		KIK1 ABC 1 A_SetPitch(-1 + pitch)
		TNT1 A 0 A_Jumpifinventory("PowerStrength",1,3)
		TNT1 A 0 A_FireCustomMissile("KickAttack",0,0,0,-7)
		TNT1 A 0 A_Jump(256,2)
		TNT1 A 0 A_FireCustomMissile("SuperKickAttack",0,0,0,-7)
		KIK1 D 4
		TNT1 A 0 A_Takeinventory("Kicking",1)
		KIK1 ECBA 1 A_SetPitch(1 + pitch)
		TNT1 A 2
		//TNT1 A 0 A_TakeInventory("FireSeq",3)
		TNT1 A 0 SetPlayerProperty(0,0,0)
		TNT1 A 0 A_Refire
		Goto Ready1

// --------------------------------------------------------------------------
//
//	Charged attack
//
// --------------------------------------------------------------------------

	AltFire:
		TNT1 A 0 A_JumpIfInventory("PowerBlueBloodOnVisor",1,21)
		TNT1 A 0 A_JumpIfInventory("PowerGreenBloodOnVisor",1,14)
		TNT1 A 0 A_JumpIfInventory("PowerBloodOnVisor",1,7)
		KNFS ABCDE 1
		TNT1 A 0 A_Jump(256,18)
		KNBS ABCDE 1
		TNT1 A 0 A_Jump(256,12)
		KNGS ABCDE 1
		TNT1 A 0 A_Jump(256,6)
		KNLS ABCDE 1
		TNT1 A 3
	AltHold:
		TNT1 A 1 A_Giveinventory("KnifeCharge",1)
		TNT1 A 0 A_JumpIfInventory("PowerWeaponLevel2",1,2)
		TNT1 A 0 A_Refire
		TNT1 A 0 A_Giveinventory("KnifeCharge",1)
		TNT1 A 0 A_Refire
	AltAttack:
		TNT1 A 0 A_PlaySound("weapons/wiff")
		TNT1 A 0 A_JumpIfInventory("PowerBloodOnVisor",1,"AltAttackBlood")
		TNT1 A 0 A_JumpIfInventory("PowerGreenBloodOnVisor",1,"AltAttackGreenBlood")
		TNT1 A 0 A_JumpIfInventory("PowerBlueBloodOnVisor",1,"AltAttackBlueBlood")
		KNFA JKLM 1
		TNT1 A 0 A_CustomPunch(Random(20,45),1,0,"knifePuff")
		TNT1 A 0 A_JumpIfInventory("KnifeCharge",50,6)
		TNT1 A 0 A_JumpIfInventory("KnifeCharge",25,3)
		TNT1 A 0 A_FireCustomMissile("KnifeDOT1",0,0,0,0)
		TNT1 A 0 A_Jump(256,4)
		TNT1 A 0 A_FireCustomMissile("KnifeDOT2",0,0,0,0)
		TNT1 A 0 A_Jump(256,2)
		TNT1 A 0 A_FireCustomMissile("KnifeDOT3",0,0,0,0)
		KNFA LKJ 1
		TNT1 A 10
		TNT1 A 1 A_Takeinventory("KnifeCharge",60)
		goto Ready1

	AltAttackBlood:
		KNBA JKLM 1
		TNT1 A 0 A_CustomPunch(Random(20,45),1,0,"knifePuff")
		TNT1 A 0 A_JumpIfInventory("KnifeCharge",50,6)
		TNT1 A 0 A_JumpIfInventory("KnifeCharge",25,3)
		TNT1 A 0 A_FireCustomMissile("KnifeDOT1",0,0,0,0)
		TNT1 A 0 A_Jump(256,4)
		TNT1 A 0 A_FireCustomMissile("KnifeDOT2",0,0,0,0)
		TNT1 A 0 A_Jump(256,2)
		TNT1 A 0 A_FireCustomMissile("KnifeDOT3",0,0,0,0)
		KNBA LKJ 1
		TNT1 A 10
		TNT1 A 1 A_Takeinventory("KnifeCharge",60)
		TNT1 A 0 A_JumpIfInventory("PowerGreenBloodOnVisor",1,2)
		TNT1 A 0 A_JumpIfInventory("PowerBlueBloodOnVisor",1,1)
		goto Ready1
		TNT1 A 0 A_Takeinventory("PowerBloodOnVisor",1)
		goto Ready1
		
	AltAttackGreenBlood:
		KNGA JKLM 1
		TNT1 A 0 A_CustomPunch(Random(20,45),1,0,"knifePuff")
		TNT1 A 0 A_JumpIfInventory("KnifeCharge",50,6)
		TNT1 A 0 A_JumpIfInventory("KnifeCharge",25,3)
		TNT1 A 0 A_FireCustomMissile("KnifeDOT1",0,0,0,0)
		TNT1 A 0 A_Jump(256,4)
		TNT1 A 0 A_FireCustomMissile("KnifeDOT2",0,0,0,0)
		TNT1 A 0 A_Jump(256,2)
		TNT1 A 0 A_FireCustomMissile("KnifeDOT3",0,0,0,0)
		KNGA LKJ 1
		TNT1 A 10
		TNT1 A 1 A_Takeinventory("KnifeCharge",60)
		TNT1 A 0 A_JumpIfInventory("PowerBloodOnVisor",1,2)
		TNT1 A 0 A_JumpIfInventory("PowerBlueBloodOnVisor",1,1)
		goto Ready1
		TNT1 A 0 A_Takeinventory("PowerGreenBloodOnVisor",1)
		goto Ready1
		
	AltAttackBlueBlood:
		KNBA JKLM 1
		TNT1 A 0 A_CustomPunch(Random(20,45),1,0,"knifePuff")
		TNT1 A 0 A_JumpIfInventory("KnifeCharge",50,6)
		TNT1 A 0 A_JumpIfInventory("KnifeCharge",25,3)
		TNT1 A 0 A_FireCustomMissile("KnifeDOT1",0,0,0,0)
		TNT1 A 0 A_Jump(256,4)
		TNT1 A 0 A_FireCustomMissile("KnifeDOT2",0,0,0,0)
		TNT1 A 0 A_Jump(256,2)
		TNT1 A 0 A_FireCustomMissile("KnifeDOT3",0,0,0,0)
		KNBA LKJ 1
		TNT1 A 10
		TNT1 A 1 A_Takeinventory("KnifeCharge",60)
		TNT1 A 0 A_JumpIfInventory("PowerGreenBloodOnVisor",1,2)
		TNT1 A 0 A_JumpIfInventory("PowerBloodOnVisor",1,1)
		goto Ready1
		TNT1 A 0 A_Takeinventory("PowerBlueBloodOnVisor",1)
		goto Ready1

// --------------------------------------------------------------------------
//
//	Misc.
//
// --------------------------------------------------------------------------

	PuristGun:
		TNT1 A 0 A_TakeInventory("Knife",1)
		Goto Deselect

	WarmUp:
		TNT1 A 0 A_TakeInventory("JustStartedGame",1)
		TNT1 A 10 A_WeaponReady
		PUNS ABCD 1 A_WeaponReady
		TNT1 A 0 A_PlaySound("Knuckled")
		PUNS E 7 A_WeaponReady
		PUNS FGFE 3 A_WeaponReady
		PUNS DCB 1 A_WeaponReady
		TNT1 A 10 A_WeaponReady
		Goto Ready

// --------------------------------------------------------------------------
//
//	End stuff
//
// --------------------------------------------------------------------------

	Taunt:
		TNT1 A 0 //A_GunFlash("TauntFlash")
		TNT1 A 0 A_JumpIfInventory("GenderFemale", 1, 3)
		KNFF A 3 A_PlaySound("FUCK", 2)
		TNT1 A 0 A_Jump(256,2)
		KNFF A 3 A_PlaySound("FTAUNT", 2)
		KNFF B 1
		TNT1 A 0 A_FireCustomMissile("Taunter",0,0,-1,0)
		TNT1 A 0 A_FireCustomMissile("Taunter",-9,0,-1,0)
		TNT1 A 0 A_FireCustomMissile("Taunter",9,0,-1,0)
		KNFF CDE 1 A_AlertMonsters
		KNFF F 22 A_Takeinventory("Taunting",1)
		KNFF EDCB 1
		TNT1 A 0 A_Jump(256,"Ready2")
		Goto Ready2

	TauntFlash:
		TNT1 A 0 A_JumpIfInventory("PowerBloodOnVisor",1,"TauntFlashBlood")
		TNT1 A 0 A_JumpIfInventory("PowerGreenBloodOnVisor",1,"TauntFlashGreenBlood")
		TNT1 A 0 A_JumpIfInventory("PowerBlueBloodOnVisor",1,"TauntFlashBlueBlood")
		KNFF G 34
		Stop

	TauntFlashBlood:
		KNBF G 34
		Stop

	TauntFlashGreenBlood:
		KNGF G 34
		Stop

	TauntFlashBlueBlood:
		KNLF G 34
		Stop

	KickFlash:
		TNT1 A 0 A_JumpIfInventory("PowerBloodOnVisor",1,"KickFlashBlood")
		TNT1 A 0 A_JumpIfInventory("PowerGreenBloodOnVisor",1,"KickFlashGreenBlood")
		TNT1 A 0 A_JumpIfInventory("PowerBlueBloodOnVisor",1,"KickFlashBlueBlood")
		KNFK ABCD 1
		KNFK E 8
		KNFK DCBA 1
		KNFA A 1
		Stop

	KickFlashBlood:
		KNBK ABCD 1
		KNBK E 8
		KNBK DCBA 1
		KNBA A 1
		Stop

	KickFlashGreenBlood:
		KNGK ABCD 1
		KNGK E 8
		KNGK DCBA 1
		KNGA A 1
		Stop

	KickFlashBlueBlood:
		KNLK ABCD 1
		KNLK E 8
		KNLK DCBA 1
		KNLA A 1
		Stop

	AirKickFlash:
		TNT1 A 0 A_JumpIfInventory("PowerBloodOnVisor",1,"AirKickFlashBlood")
		TNT1 A 0 A_JumpIfInventory("PowerGreenBloodOnVisor",1,"AirKickFlashGreenBlood")
		TNT1 A 0 A_JumpIfInventory("PowerBlueBloodOnVisor",1,"AirKickFlashBlueBlood")
		KNFK ABCD 1
		KNFK E 10
		KNFK DCBA 1
		KNFA A 1
		Stop

	AirKickFlashBlood:
		KNBK ABCD 1
		KNBK E 10
		KNBK DCBA 1
		KNBA A 1
		Stop

	AirKickFlashGreenBlood:
		KNGK ABCD 1
		KNGK E 10
		KNGK DCBA 1
		KNGA A 1
		Stop

	AirKickFlashBlueBlood:
		KNLK ABCD 1
		KNLK E 10
		KNLK DCBA 1
		KNLA A 1
		Stop
		
	SlideKickStartFlash:
		KNFK ABCD 1
		KNFK E 17
		Stop
	
	SlideKickEndFlash:
		KNFK EDCBA 2
		KNFA A 1
		Stop

	GrenadeFlash:
		TNT1 A 0 A_JumpIfInventory("PowerBloodOnVisor",1,"GrenadeFlashBlood")
		TNT1 A 0 A_JumpIfInventory("PowerGreenBloodOnVisor",1,"GrenadeFlashGreenBlood")
		TNT1 A 0 A_JumpIfInventory("PowerBlueBloodOnVisor",1,"GrenadeFlashBlueBlood")
		KNFS ABCDE 1
		Stop

	GrenadeFlashBlood:
		KNBS ABCDE 1
		Stop

	GrenadeFlashGreenBlood:
		KNGS ABCDE 1
		Stop

	GrenadeFlashBlueBlood:
		KNLS ABCDE 1
		Stop
	}
}

ACTOR KnifePuff
{
	renderstyle Translucent
	scale 0.15
	alpha 0.7
	Radius 1
	Height 1
damagetype Saw //XX

	+NOBLOCKMAP
	+NOGRAVITY
	+NOEXTREMEDEATH
	+FORCEXYBILLBOARD
	+FORCEPAIN
	States
	{
	Spawn:
		TNT1 A 0
		TNT1 A 0 A_CustomMissile("SparkX",2,0,random(0,360),2,random(30,170))
		RSMK A 1 Bright A_PlaySound("items/knife")
		RSMK BCDE 1 Bright
		Stop
	}
}

ACTOR KnifeDOT1
{
	Game Doom
	PROJECTILE
	Scale 1.0
	Damage 0
	PoisonDamage 34, 6, 45 //14,6,45
	+ADDITIVEPOISONDAMAGE
	+ADDITIVEPOISONDURATION
	Speed 32
	Height 1
	Radius 1
	States
	{
	Spawn:
		TNT1 A 0 //Each added hit either increases duration or damage.
		TNT1 A 0 A_Jump(128,3)
		TNT1 A 0 A_ChangeFlag("ADDITIVEPOISONDAMAGE",0)
		TNT1 A 0 A_Jump(256,2)
		TNT1 A 0 A_ChangeFlag("ADDITIVEPOISONDURATION",0)
		TNT1 AA 1
		Stop
	Death:
		TNT1 A 2
		Stop
	}
}

ACTOR KnifeDOT2 : KnifeDOT1
{
	PoisonDamage 41, 8, 55 //21,8,45
}

ACTOR KnifeDOT3 : KnifeDOT1
{
	PoisonDamage 48, 10, 55 //28,10,45
}