Actor SawSelected: Inventory
{
inventory.maxamount 1
}

Actor Chain_saw : Chainsaw replaces Chainsaw
{
weapon.selectionorder 220
inventory.pickupsound "weapons/chainsaw/draw"
inventory.pickupsound "none"
	Weapon.UpSound "none"
weapon.readysound "weapons/chainsaw/idle"
    +WEAPON.NOAUTOAIM
states
	{
	Select:
	    	TNT1 A 0 A_Takeinventory("FistsSelected",1)
	TNT1 A 0 A_Giveinventory("SawSelected",1)
	TNT1 A 0 A_Takeinventory("ShotgunSelected",1)
	TNT1 A 0 A_Takeinventory("SSGSelected",1)
	TNT1 A 0 A_Takeinventory("MinigunSelected",1)
	TNT1 A 0 A_Takeinventory("PlasmaGunSelected",1)
	TNT1 A 0 A_Takeinventory("RocketLauncherSelected",1)
    TNT1 A 0 A_Takeinventory("GrenadeLauncherSelected",1)
	TNT1 A 0 A_Takeinventory("BFGSelected",1)
	TNT1 A 0 A_Takeinventory("BFG10kSelected",1)
	TNT1 A 0 A_Takeinventory("RailGunSelected",1)
	TNT1 A 0 A_Takeinventory("SubMachineGunSelected",1)
	TNT1 A 0 A_Takeinventory("RevenantLauncherSelected",1)
	TNT1 A 0 A_Takeinventory("LostSoulSelected",1)
	TNT1 A 0 A_Takeinventory("FlameCannonSelected",1)
	TNT1 A 0 A_Takeinventory("HasBarrel",1)
		KICK A 0 A_Takeinventory("PowerBloodOnVisor",1)
		KICK A 0 A_Takeinventory("PowerBlueBloodOnVisor",1)
		KICK A 0 A_Takeinventory("PowerGreenBloodOnVisor",1)
		TNT1 A 0 A_Raise
		Wait
	Deselect:
	    TNT1 A 0 A_Takeinventory("SawSelected",1)
		TNT1 A 0 A_StopsoundEx("Weapon")
		TNT1 A 0 A_Lower
		SAWN A 1 A_Lower
		goto deselect+1


	Ready:
        SAWS AB 1
        TNT1 A 0 A_PlaySound("DSSAWZIP")
        SAWS BCDEFEDCB 2
		SAWS A 17 A_playsound("weapons/chainsaw/draw")

        TNT1 AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 0

        TNT1 A 0 A_JumpIfInventory("PowerBloodOnVisor",1,"Ready.Blood")
        TNT1 A 0 A_JumpIfInventory("PowerBlueBloodOnVisor",1,"Ready.BlueBlood")
        TNT1 A 0 A_JumpIfInventory("PowerGreenBloodOnVisor",1,"Ready.GreenBlood")
        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_FireCustomMissile("SmokeSpawner",0,0,0,5)
		TNT1 A 0 A_playsound("weapons/chainsaw/idle")
		SAWG A 2 A_weaponready
        SAWG B 2 A_weaponready
		goto ready+35
	Fire:
        TNT1 A 0 A_JumpIfInventory("PowerBloodOnVisor",1,"Fire.Blood")
        TNT1 A 0 A_JumpIfInventory("PowerBlueBloodOnVisor",1,"Fire.BlueBlood")
         TNT1 A 0 A_JumpIfInventory("PowerGreenBloodOnVisor",1,"Fire.GreenBlood")
		TNT1 A 0 A_playsound("weapons/chainsaw/start")
		SAWG ABCD 1
	Hold:
TNT1 A 0 A_JumpIfInventory("PowerBloodOnVisor",1,"Hold.Blood")
        TNT1 A 0 A_JumpIfInventory("PowerBlueBloodOnVisor",1,"Hold.BlueBlood")
 TNT1 A 0 A_JumpIfInventory("PowerGreenBloodOnVisor",1,"Hold.GreenBlood")
        //TNT1 A 0 A_FireCustomMissile("SmokeSpawner",0,0,0,5)
		TNT1 A 0 A_PlaySoundEx("weapons/chainsaw/loop","Weapon",0)
		SAWF A 1 A_CustomPunch(5,1,1,"SSawPuff")
		SAWF B 1
		SAWF C 1 A_custompunch(5,1,1,"SSawPuff")
		SAWF D 1
		TNT1 A 0 A_Refire
		TNT1 A 0 A_StopsoundEx("Weapon")
		TNT1 A 0 A_Playsound("weapons/chainsaw/stop")
		SAWG DC 1
		goto ready+35




	Ready.Blood:
        TNT1 A 0 A_JumpIfInventory("Kicking",1,"DoKick")
        TNT1 A 0 A_JumpIfInventory("Taunting",1,"Taunt")
		TNT1 A 0 A_playsound("weapons/chainsaw/idle")
		SAW2 A 2 A_weaponready
        SAW2 B 2 A_weaponready
		Goto Ready+35
	Fire.Blood:
		TNT1 A 0 A_playsound("weapons/chainsaw/start")
		SAW2 ABCD 1
	Hold.Blood:
        //TNT1 A 0 A_FireCustomMissile("SmokeSpawner",0,0,0,5)
		KICK A 0 A_Takeinventory("PowerBlueBloodOnVisor",1)
		KICK A 0 A_Takeinventory("PowerGreenBloodOnVisor",1)
		TNT1 A 0 A_PlaySoundEx("weapons/chainsaw/loop","Weapon",0)
		SAW2 E 1 A_custompunch(7,1,1,"SSawPuff")
		SAW2 F 1
		SAW2 G 1 A_custompunch(7,1,1,"SSawPuff")
		SAW2 H 1
        TNT1 A 0 A_JumpIfInventory("PowerBlueBloodOnVisor",1,"Hold.BlueBlood")
        TNT1 A 0 A_JumpIfInventory("PowerGreenBloodOnVisor",1,"Hold.GreenBlood")
		TNT1 A 0 A_Refire
		TNT1 A 0 A_StopsoundEx("Weapon")
		TNT1 A 0 A_Playsound("weapons/chainsaw/stop")
		SAW2 DC 1
		goto ready.blood


	Ready.BlueBlood:
        TNT1 A 0 A_JumpIfInventory("Kicking",1,"DoKick")
        TNT1 A 0 A_JumpIfInventory("Taunting",1,"Taunt")
		TNT1 A 0 A_playsound("weapons/chainsaw/idle")
		SAW3 A 2 A_weaponready
        SAW3 B 2 A_weaponready
		Goto Ready+35
	Fire.BlueBlood:
		TNT1 A 0 A_playsound("weapons/chainsaw/start")
		SAW3 CD 1
	Hold.BlueBlood:
        //TNT1 A 0 A_FireCustomMissile("SmokeSpawner",0,0,0,5)
		KICK A 0 A_Takeinventory("PowerBloodOnVisor",1)
		KICK A 0 A_Takeinventory("PowerGreenBloodOnVisor",1)
		TNT1 A 0 A_playsoundEx("weapons/chainsaw/loop","Weapon",0)
		SAW3 E 1 A_custompunch(7,1,1,"SSawPuff")
		SAW3 F 1
		SAW3 G 1 A_custompunch(7,1,1,"SSawPuff")
		SAW3 H 1
        TNT1 A 0 A_JumpIfInventory("PowerBloodOnVisor",1,"Hold.Blood")
        TNT1 A 0 A_JumpIfInventory("PowerGreenBloodOnVisor",1,"Hold.GreenBlood")
		TNT1 A 0 A_Refire
		TNT1 A 0 A_StopsoundEx("Weapon")
		TNT1 A 0 A_Playsound("weapons/chainsaw/stop")
		SAW3 DC 1
		goto ready+35


	Ready.GreenBlood:
        TNT1 A 0 A_JumpIfInventory("Kicking",1,"DoKick")
        TNT1 A 0 A_JumpIfInventory("Taunting",1,"Taunt")
		TNT1 A 0 A_playsound("weapons/chainsaw/idle")
		SAW4 A 2 A_weaponready
        SAW4 B 2 A_weaponready
		Goto Ready+35
	Fire.GreenBlood:
		TNT1 A 0 A_playsound("weapons/chainsaw/start")
		SAW4 CD 1
	Hold.GreenBlood:
        //TNT1 A 0 A_FireCustomMissile("SmokeSpawner",0,0,0,5)
		KICK A 0 A_Takeinventory("PowerBloodOnVisor",1)
		KICK A 0 A_Takeinventory("PowerBlueBloodOnVisor",1)
		TNT1 A 0 A_playsoundEx("weapons/chainsaw/loop","Weapon",1)
		SAW4 E 1 A_custompunch(7,1,1,"SSawPuff")
		SAW4 F 1
		SAW4 G 1 A_custompunch(7,1,1,"SSawPuff")
		SAW4 H 1
        TNT1 A 0 A_JumpIfInventory("PowerBloodOnVisor",1,"Hold.Blood")
        TNT1 A 0 A_JumpIfInventory("PowerBlueBloodOnVisor",1,"Hold.BlueBlood")
		TNT1 A 0 A_Refire
		TNT1 A 0 A_StopsoundEx("Weapon")
		TNT1 A 0 A_Playsound("weapons/chainsaw/stop")
		SAW4 DC 1
		goto ready+35


        DoKick:
	    TNT1 A 0
		TNT1 A 0 A_Takeinventory("Zoomed",1)
        TNT1 A 0 A_ZoomFactor(1.0)
		TNT1 A 0 A_Takeinventory("ADSmode",1)
		NULL A 0 A_JumpIf (momZ > 0, "AirKick")
		NULL A 0 A_JumpIf (momZ < 0, "AirKick")
		
        TNT1 A 0 A_jumpifinventory("PowerStrength",1,"BerserkerKick")
		TNT1 A 0 A_PlaySound("KICK")
		TNT1 A 0 SetPlayerProperty(0,1,0)
		KICK BCD 1
		RIFF A 0 A_FireCustomMissile("KickAttack", 0, 0, 0, -7)
        KICK H 4
		KICK A 0 A_Takeinventory("Kicking",1)
		KICK IGFEDCBA 1 
		TNT1 A 0 SetPlayerProperty(0,0,0)
		Goto Ready+35
    BerserkerKick:
		TNT1 A 0 A_PlaySound("KICK")
		TNT1 A 0 SetPlayerProperty(0,1,0)
		KICK ABCDEFG 1
        RIFF A 0 A_FireCustomMissile("SuperKickAttack", 0, 0, 0, -7)
        KICK H 3
		KICK A 0 A_Takeinventory("Kicking",1)
		KICK IGFEDCBA 1 
		TNT1 A 0 SetPlayerProperty(0,0,0)
		Goto Ready+35
	
	AirKick:
	    TNT1 A 0 A_jumpifinventory("PowerStrength",1,"SuperAirKick")
		TNT1 A 0 A_PlaySound("KICK")
		TNT1 A 0 A_Recoil (-6)
		KICK JKLMN 1
        RIFF A 0 A_FireCustomMissile("AirKickAttack", 0, 0, 0, -31)
        KICK O 3
		KICK A 0 A_Takeinventory("Kicking",1)
		KICK PQRST 2
		Goto Ready+35
		
	SuperAirKick:
		TNT1 A 0 A_PlaySound("KICK")
		TNT1 A 0 A_Recoil (-6)
		KICK JKLMN 1
        RIFF A 0 A_FireCustomMissile("SuperAirKickAttack", 0, 0, 0, -31)
        KICK O 3
		KICK A 0 A_Takeinventory("Kicking",1)
		KICK PQRST 2
		Goto Ready+35
    Taunt:
        TNT1 A 5
		FUCK A 2
        FUCK B 2 A_PlaySound("FUCK", 1)
        FUCK C 2 A_AlertMonsters
		FUCK D 15 A_Takeinventory("Taunting",1)
        FUCK CBA 5
        TNT1 A 5
		goto ready+35
	Salute:
	    TNT1 A 0 SetPlayerProperty(0,1,0)
		TNT1 A 0 A_ALertMonsters
		SALU ABCDEDCDEDCDEDCBA 4
		TNT1 A 0 A_TakeInventory("Salute1",1)
		TNT1 A 0 A_TakeInventory("Salute2",1)
		TNT1 A 0 SetPlayerProperty(0,0,0)
		Goto Ready
	}
}

