ACTOR LeadspitterPickup : CustomInventory
{
	Inventory.PickupSound "misc/w_pkup"
	Inventory.PickupMessage "Grabbed a SC-P30 ''Leadspitter'' uzi! Let there be firefight, till they all fall to the ground! (4)"
	Scale 0.85
	States
	{
		Spawn:
		UZIG X -1
		Stop
		Pickup:
		TNT1 A 0 A_JumpIfInventory("LeadspitPickupCounter",2,"CheckAmmo")
		Goto GiveItNevertheless
		CheckAmmo:
		TNT1 A 0 A_JumpIfInventory("BulletAmmo",0,"Bailure")
		GiveItNevertheless:
		TNT1 A 0 A_GiveInventory("Leadspitter")
		TNT1 A 0 A_GiveInventory("LeadspitPickupCounter")
		TNT1 A 0 A_GiveInventory("BulletAmmo",15)
		Stop
		Bailure:
		UZIG X 1
		Fail
	}
}

actor Leadspitter : Weapon
{
  Game Doom
  Weapon.AmmoUse 0
  Weapon.AmmoUse2 0
  Weapon.AmmoGive 0
  Weapon.AmmoGive2 0
  Weapon.AmmoType "UziClipRight"
  Weapon.AmmoType2 "BulletAmmo"
  Weapon.SlotNumber 4
  Weapon.SelectionOrder 3
  Weapon.UpSound "Uzi/Up"
  Weapon.Kickback 125
  Inventory.PickupSound "misc/w_pkup"
  Inventory.PickupMessage "Grabbed a SC-P30 ''Leadspitter'' uzi! Let there be firefight, till they all fall to the ground! (4)"
  Obituary "%o was turned into bullet pincushion by %k's ''Leadspitter''."
  Weapon.BobStyle InverseSmooth
  Weapon.BobSpeed 2.0
  Weapon.BobRangeY 0.6
  Weapon.BobRangeX 0.8
  Scale 0.85
  +NOALERT
  +WEAPON.AMMO_CHECKBOTH
  //+NOAUTOAIM
  States
  {
  Ready:
    TNT1 A 0 A_JumpIfInventory("LeadspitPickupCounter",2,"TwinReady")
	UZIU ABC 1
  ReadyMain:
	UZIG A 0 A_GiveInventory("SynthFireActive",1)
	UZIG A 0 ACS_NamedExecuteAlways("SynthLeft")
	UZIG A 0 ACS_NamedExecuteAlways("SynthRight")
	UZIG A 0 A_Gunflash("Dualwelding",GFF_NOEXTCHANGE)
  SingleLIdle:
    TNT1 A 0 A_JumpIfInventory("LeadspitPickupCounter",2,"LIdle")
	TNT1 A 0 A_JumpIfInventory("SynthFireZoom",1,"Punch")
    TNT1 A 1 A_WeaponReady(WRF_NOFIRE|WRF_ALLOWRELOAD|WRF_ALLOWZOOM)
	Loop
  TwinReady:
	UZ3U ABC 1
	UZ3U A 0 A_Gunflash("Dualwelding",GFF_NOEXTCHANGE)
	UZ2G A 1 A_GiveInventory("SynthFireActive",1)
	UZ2G A 0 ACS_NamedExecuteAlways("SynthLeft")
	UZ2G A 0 ACS_NamedExecuteAlways("SynthRight")
  LIdle:
	UZ2G A 0 A_JumpIfInventory("SynthFireLeft",1,"LFire")
	UZ2G A 0 A_JumpIfInventory("IsReloading",1,"LReload")
	UZ2G A 0 A_JumpIfInventory("SynthFireZoom",1,"Punch")
    UZ2G A 1 A_WeaponReady(WRF_NOFIRE|WRF_ALLOWRELOAD|WRF_ALLOWZOOM)
    Loop
  Deselect:
    TNT1 A 0 SetPlayerProperty(0, 0, PROP_INSTANTWEAPONSWITCH)
	TNT1 A 0 A_GunFlash("NullFlash")
	TNT1 A 0 A_TakeInventory("SynthFireActive",1)
	TNT1 A 0 A_TakeInventory("SynthFireLeft",1)
	TNT1 A 0 A_TakeInventory("SynthFireRight",1)
    UZIG A 0 A_JumpIfInventory("LeadspitPickupCounter",2,"TwinDeselect")
    UZIU CBA 1
    TNT1 AA 0 A_Lower
    TNT1 A 1 A_Lower
	Goto Deselect+9
  TwinDeselect:
	UZ3U CBA 1
    TNT1 AA 0 A_Lower
    TNT1 A 1 A_Lower
	Goto TwinDeselect+4
  Select:
    TNT1 A 0 SetPlayerProperty(0, 1, PROP_INSTANTWEAPONSWITCH)
  HonkaCzongka:
    TNT1 A 0 A_Raise
	TNT1 A 1 A_Raise
    Loop
  SingleLFire:
    UZ2G A 0 A_JumpIfInventory("UziClipRight",1,1)
	Goto Nope
	UZIF A 0 A_PlaySound("Uzi/Fire",1,0.7)
	UZIF A 0 A_TakeInventory("UziClipRight",1,TIF_NOTAKEINFINITE)
	UZIF A 0 A_FireCustomMissile("GunsmokeSpawner_Small_MG",0,0,13,-1)
    UZIF A 0 A_FireBullets(5.0,2.75, -1, 6, "BulletPuff")
	UZIF A 0 A_JumpIfInventory("PowerBlazing",1,3)
	UZIF A 0 A_JumpIf(Health<50,2)
	UZIF A 0 A_Jump(256,"SingleMain")
	UZIF A 0 A_TakeInventory("UziClipRight",1,TIF_NOTAKEINFINITE)
	UZIF A 0 A_FireBullets(5.0,2.75, -1, 6, "BulletPuff")
	UZIF A 0 A_JumpIfInventory("PowerBlazing",1,3)
	UZIF A 0 A_JumpIf(Health<25,2)
	UZIF A 0 A_Jump(256,"SingleMain")
	UZIF A 0 A_TakeInventory("UziClipRight",1,TIF_NOTAKEINFINITE)
	UZIF A 0 A_FireBullets(5.0,2.75, -1, 6, "BulletPuff")
  SingleMain:
	UZIF A 0 A_AlertMonsters
	UZIF A 0 A_Light1
    UZIF A 1 Bright A_SetPitch(pitch-0.15)
	UZIF B 1 Bright A_SetPitch(pitch-0.1)
	UZIF B 0 A_FireCustomMissile("BuellerCasingSpawner2",0,0,5,5)
	UZIF A 0 A_JumpIfInventory("PowerBlazing",1,3)
	UZIF A 0 A_JumpIf(Health<50,2)
	UZIF A 0 A_Jump(256,"SingleMain2")
	UZIF B 0 A_FireCustomMissile("BuellerCasingSpawner2",0,0,5,5)
	UZIF A 0 A_JumpIfInventory("PowerBlazing",1,3)
	UZIF A 0 A_JumpIf(Health<25,2)
	UZIF A 0 A_Jump(256,"SingleMain2")
	UZIF B 0 A_FireCustomMissile("BuellerCasingSpawner2",0,0,5,5)
  SingleMain2:
	UZIG A 0 A_JumpIfInventory("SynthFireLeft",1,"SingleLFire")
	UZIF C 1 A_Light2
	UZIF DE 1
	UZIG A 2 A_Light0
	UZIG A 0 A_JumpIfInventory("SynthFireLeft",1,"SingleLFire")
	Goto RightIdle
  Nope:
	UZIF A 0 A_PlaySound("Uzi/Dry",4,1.0)
	UZIF A 0 A_TakeInventory("IsReloading",1)
	UZIF EDCDE 1
    Goto RightIdle
  RightIdle:
	UZIG A 1
	RNDG A 0 A_JumpIfInventory("LeadspitPickupCounter", 2, "FlashRestart") // Restart flash to not fire both guns.
	RNDG A 0 A_JumpIfInventory("SynthFireLeft",1,"SingleLFire")
    RNDG A 0 A_JumpIfInventory("MacheteGoesFast",1,"SingleCaberToss")
	RNDG A 0 A_JumpIfInventory("IsReloading",1,"SingleReload")
	Loop
  Reload:
	UZIG A 0 A_JumpIfInventory("LeadspitPickupCounter",2,"TwinReload")
	UZIG A 0 A_GiveInventory("IsReloading",1)
	Goto SingleLIdle
  SingleReload:
    UZIG A 0 A_TakeInventory("IsReloading",1)
	UZIG A 0 A_JumpIfInventory("UziClipRight",0,"RightIdle")
	UZIG A 0 A_JumpIfInventory("BulletAmmo",1,1)
	Goto RightIdle
	UZIO A 0 A_PlaySound("Uzi/Out",5,0.7)
	TNT1 A 0 A_JumpIfInventory("PowerBlazing",1,3)
	UZIO A 1 A_JumpIf(Health<75,2)
	UZIO BC 1
	TNT1 A 0 A_JumpIfInventory("PowerBlazing",1,3)
	UZIO D 1 A_JumpIf(Health<50,2)
	UZIO EF 1
	TNT1 A 0 A_JumpIfInventory("PowerBlazing",1,3)
	UZIO G 1 A_JumpIf(Health<25,2)
	UZIO HI 1
	UZIO J 0 A_SpawnItemEx("UziClipDrop",0,0,20,0,1)
	TNT1 A 0 A_JumpIfInventory("PowerBlazing",1,2)
	UZIO J 5 A_JumpIf(Health<75,1)
	TNT1 A 0 A_JumpIfInventory("PowerBlazing",1,2)
	UZIO J 5 A_JumpIf(Health<50,1)
	TNT1 A 0 A_JumpIfInventory("PowerBlazing",1,2)
	UZIO J 5 A_JumpIf(Health<25,1)
	UZIR A 1
	TNT1 A 0 A_JumpIfInventory("PowerBlazing",1,2)
	UZIR B 1 A_JumpIf(Health<75,1)
	UZIR C 1
	TNT1 A 0 A_JumpIfInventory("PowerBlazing",1,2)
	UZIR D 1 A_JumpIf(Health<50,1)
	UZIR E 1
	TNT1 A 0 A_JumpIfInventory("PowerBlazing",1,2)
	UZIR F 1 A_JumpIf(Health<25,1)
	UZIR A 0 A_PlaySound("Uzi/In",5,0.7)
	UZIR GHI 1
	/*Before punching was added, there was a handed reload, but suddenly growing 3rd hand doesn't make sense... unless you are James Bond. (not that those uzis aren't reference to certain infamous machineguns from certain game, heh.)
	
	UZIO A 0 A_PlaySound("Uzi/Out",5,0.7)
	UZIO ABCDEFGHI 1
	UZIO J 20 A_SpawnItemEx("UziClipDrop",0,0,20,0,1)
	UZII ABCDEF 1
	UZII A 0 A_PlaySound("Uzi/In",5,0.7)
	UZII GHI 1*/
  Start:
	TNT1 A 0 A_JumpIfInventory("UziClipRight",0,"End")
	TNT1 A 0 A_JumpIfInventory("BulletAmmo",1,1)
	Goto End
	TNT1 A 0 A_TakeInventory("BulletAmmo",1,1)
	TNT1 A 0 A_GiveInventory("UziClipRight",1)
	goto Start
  End:
	/*UZII JKLMNOP 1
	UZIO CBA 1
	UZIG A 3*/
	TNT1 A 0 A_JumpIfInventory("PowerBlazing",1,2)
	UZIR J 1 A_JumpIf(Health<75,1)
	UZIR K 1
	TNT1 A 0 A_JumpIfInventory("PowerBlazing",1,2)
	UZIR L 1 A_JumpIf(Health<50,1)
	UZIR M 1
	TNT1 A 0 A_JumpIfInventory("PowerBlazing",1,2)
	UZIR N 1 A_JumpIf(Health<25,1)
	UZIR O 1
	UZIR P 1
	UZIO CBA 1
	UZIG A 3 A_TakeInventory("IsReloading",1)
	Goto RightIdle
  FlashRestart:
	TNT1 A 0 A_Gunflash("Dualwelding",GFF_NOEXTCHANGE)
	Stop
  Zoom:
    RNDG A 0 A_GiveInventory("SynthFireZoom",1)
    Goto SingleLIdle
  Punch:
    RNDG A 0 A_JumpIfInventory("LeadspitPickupCounter",2,"TwinPunch")
    FMGU F 0 A_PlaySound("Punch/Swing",6,1.0)
	SDKU A 0 A_GiveInventory("ZoomReFire",1)
	QML1 A 0 A_JumpIfInventory("PowerStrength2",1,2)
    QML1 A 0 A_Jump(256,3)
  	FML1 A 0 A_SetBlend("Orange",0.05,10)
	FML1 A 0 A_PlaySound("Melee/Firepunch",0)
	"####" A 0 A_JumpIfInventory("PowerBlazing",1,3)
	"####" A 0 A_JumpIf(Health<75,2)
	"####" A 1 A_SetPitch(pitch-0.3)
	"####" B 1 A_SetPitch(pitch-0.3)
	"####" A 0 A_JumpIfInventory("PowerBlazing",1,3)
	"####" A 0 A_JumpIf(Health<50,2)
	"####" C 1 A_SetPitch(pitch-0.3)
	"####" D 1 A_SetPitch(pitch-0.3)
	"####" A 0 A_JumpIfInventory("PowerStrength2",1,3)
	"####" A 0 A_CustomPunch(30, 1, 0, "PunchCracker", 100)
	"####" A 0 A_Jump(256,2)
	"####" A 0 A_CustomPunch(90, 1, 0, "FlamePunchCracker", 150)
	"####" A 0 A_JumpIfInventory("PowerBlazing",1,3)
	"####" A 0 A_JumpIf(Health<25,2)
	"####" E 1 A_SetPitch(pitch+0.3)
	"####" F 1 A_SetPitch(pitch+0.3)
	"####" A 0 A_JumpIfInventory("PowerBlazing",1,3)
	"####" A 0 A_JumpIf(Health<75,2)
	"####" G 1 A_SetPitch(pitch+0.3)
	"####" H 1 A_SetPitch(pitch+0.3)
	"####" A 0 A_JumpIfInventory("PowerBlazing",1,3)
	"####" A 0 A_JumpIf(Health<50,2)
	"####" I 1
	"####" J 1
	"####" A 0 A_JumpIfInventory("PowerBlazing",1,3)
	"####" A 0 A_JumpIf(Health<25,2)
	"####" K 1
	TNT1 A 5
	TNT1 A 0 A_WeaponReady(WRF_NOFIRE|WRF_NOSWITCH|WRF_ALLOWZOOM)
	RN2N A 0 A_TakeInventory("ZoomReFire",1)
    RN2N A 0 A_TakeInventory("SynthFireZoom",1)
	Goto SingleLIdle
  TwinPunch:
    FMGU F 0 A_PlaySound("Punch/Swing",6,1.0)
    FMGU F 0 A_JumpIfInventory("ZoomReFire",1,"PunchSkulls")
	UZ2U CBA 1
	SDKU A 0 A_GiveInventory("ZoomReFire",1)
  PunchSkulls:
	QML1 A 0 A_JumpIfInventory("PowerStrength2",1,2)
    QML1 A 0 A_Jump(256,3)
  	FML1 A 0 A_SetBlend("Orange",0.05,10)
	FML1 A 0 A_PlaySound("Melee/Firepunch",0)
	"####" A 0 A_JumpIfInventory("PowerBlazing",1,3)
	"####" A 0 A_JumpIf(Health<75,2)
	"####" A 1 A_SetPitch(pitch-0.3)
	"####" B 1 A_SetPitch(pitch-0.3)
	"####" A 0 A_JumpIfInventory("PowerBlazing",1,3)
	"####" A 0 A_JumpIf(Health<50,2)
	"####" C 1 A_SetPitch(pitch-0.3)
	"####" D 1 A_SetPitch(pitch-0.3)
	"####" A 0 A_JumpIfInventory("PowerStrength2",1,3)
	"####" A 0 A_CustomPunch(30, 1, 0, "PunchCracker", 100)
	"####" A 0 A_Jump(256,2)
	"####" A 0 A_CustomPunch(90, 1, 0, "FlamePunchCracker", 150)
	"####" A 0 A_JumpIfInventory("PowerBlazing",1,3)
	"####" A 0 A_JumpIf(Health<25,2)
	"####" E 1 A_SetPitch(pitch+0.3)
	"####" F 1 A_SetPitch(pitch+0.3)
	"####" A 0 A_JumpIfInventory("PowerBlazing",1,3)
	"####" A 0 A_JumpIf(Health<75,2)
	"####" G 1 A_SetPitch(pitch+0.3)
	"####" H 1 A_SetPitch(pitch+0.3)
	"####" A 0 A_JumpIfInventory("PowerBlazing",1,3)
	"####" A 0 A_JumpIf(Health<50,2)
	"####" I 1
	"####" J 1
	"####" A 0 A_JumpIfInventory("PowerBlazing",1,3)
	"####" A 0 A_JumpIf(Health<25,2)
	"####" K 1
	TNT1 A 5
	TNT1 A 0 A_WeaponReady(WRF_NOFIRE|WRF_NOSWITCH|WRF_ALLOWZOOM)
	UZ2U ABC 1
	RN2N A 0 A_TakeInventory("ZoomReFire",1)
    RN2N A 0 A_TakeInventory("SynthFireZoom",1)
	Goto LIdle
  TwinReload:
	UZ2G A 0 A_GiveInventory("IsReloading",1)
	Goto LIdle
  SingleCaberToss:
    UZIG A 1 A_JumpIfInventory("MacheteAmmo",1,1)
	Goto RightIdle
	MCHT A 0 A_TakeInventory("MacheteAmmo",1)
	UZIU CBA 1

    TNT1 A 0 A_JumpIfInventory("PowerBlazing",1,2)
	TNT1 A 1 A_JumpIf(Health<75,1)
	TNT1 A 1
    TNT1 A 0 A_JumpIfInventory("PowerBlazing",1,2)
	TNT1 A 1 A_JumpIf(Health<50,1)
	TNT1 A 1
    TNT1 A 0 A_JumpIfInventory("PowerBlazing",1,2)
	TNT1 A 1 A_JumpIf(Health<25,1)
	TNT1 A 1
    MC4S A 0 A_PlaySound("Machete1/Slash",1,0.9)
    MC4S A 0 A_PlaySound("Machete2/Slash",5,0.2)
	MCHT ABC 1
	TNT1 A 0 A_JumpIfInventory("PowerStrength2",1,3)
	MCHT A 0 A_SpawnItemEX("MacheterangProjectile",cos(-pitch)*48,0,32+(sin(-pitch)*48),cos(-pitch)*35,0,sin(-pitch)*35,0,SXF_NOCHECKPOSITION|SXF_TRANSFERPITCH)
	TNT1 A 0 A_Jump(256,2)
	MCHT A 0 A_SpawnItemEX("MacheterangBerserkProjectile",cos(-pitch)*48,0,32+(sin(-pitch)*48),cos(-pitch)*25,0,sin(-pitch)*25,0,SXF_NOCHECKPOSITION|SXF_TRANSFERPITCH)
    TNT1 A 0 A_JumpIfInventory("PowerBlazing",1,2)
	MCHT D 1 A_JumpIf(Health<75,1)
	MCHT E 1
	TNT1 A 0 A_JumpIfInventory("PowerBlazing",1,2)
	MCHT F 1 A_JumpIf(Health<50,1)
	MCHT G 1
	TNT1 A 0 A_JumpIfInventory("PowerBlazing",1,2)
	MCHT H 1 A_JumpIf(Health<25,1)
	MCHT I 1
	TNT1 A 3

	UZIU ABC 1
	Goto RightIdle
  LFire:
    UZ2G A 0 A_JumpIfInventory("UziClipLeft",1,2)
	UZ2G A 0 A_Jump(256,"LReload")
	UZ2F A 0 A_PlaySound("Uzi/Fire",6,0.7)
	UZ2F A 0 A_TakeInventory("UziClipLeft",1,TIF_NOTAKEINFINITE)
	UZ2F A 0 A_FireCustomMissile("GunsmokeSpawner_Small_MG",0,0,-13,-1)
    UZ2F A 0 A_FireBullets(5.0,2.75, -1, 6, "BulletPuff")
	TNT1 A 0 A_JumpIfInventory("PowerBlazing",1,3)
	UZ2F A 0 A_JumpIf(Health<50,2)
	UZ2F A 0 A_Jump(256,"LFireMain")
	UZIF A 0 A_TakeInventory("UziClipLeft",1,TIF_NOTAKEINFINITE)
	UZ2F A 0 A_FireBullets(5.0,2.75, -1, 6, "BulletPuff")
	TNT1 A 0 A_JumpIfInventory("PowerBlazing",1,3)
	UZ2F A 0 A_JumpIf(Health<25,2)
	UZ2F A 0 A_Jump(256,"LFireMain")
	UZIF A 0 A_TakeInventory("UziClipLeft",1,TIF_NOTAKEINFINITE)
	UZ2F A 0 A_FireBullets(5.0,2.75, -1, 6, "BulletPuff")
  LFireMain:
	UZ2F A 0 A_AlertMonsters
	UZ2F A 0 A_Light1
    UZ2F A 1 Bright A_SetPitch(pitch-0.15)
	UZ2F B 1 Bright A_SetPitch(pitch-0.1)
	UZ2F B 0 A_FireCustomMissile("BuellerCasingSpawner4",0,0,-5,5)
	UZIF A 0 A_JumpIfInventory("PowerBlazing",1,3)
	UZIF A 0 A_JumpIf(Health<50,2)
	UZIF A 0 A_Jump(256,"LFireMain2")
	UZ2F B 0 A_FireCustomMissile("BuellerCasingSpawner4",0,0,-5,5)
	UZIF A 0 A_JumpIfInventory("PowerBlazing",1,3)
	UZIF A 0 A_JumpIf(Health<25,2)
	UZIF A 0 A_Jump(256,"LFireMain2")
	UZ2F B 0 A_FireCustomMissile("BuellerCasingSpawner4",0,0,-5,5)
  LFireMain2:
	UZ2F C 0 A_JumpIfInventory("SynthFireLeft",1,"LFire")
	UZ2F C 1 A_Light2
	UZ2F DE 1
	UZ2G A 2 A_Light0
	Goto LIdle
  LNope:
	UZ2F A 0 A_PlaySound("Uzi/Dry",4,1.0)
	UZ2F A 0 A_TakeInventory("IsReloading",1)
	UZ2F EDCDE 1
    Goto LIdle
  LReload:
	UZ2G A 0 A_JumpIfInventory("UziClipLeft",0,"LBack")
	UZ2G A 0 A_JumpIfInventory("BulletAmmo",1,1)
	Goto LNope
	UZ2O A 0 A_PlaySound("Uzi/Out",5,0.7)
	TNT1 A 0 A_JumpIfInventory("PowerBlazing",1,3)
	UZ2O A 1 A_JumpIf(Health<75,2)
	UZ2O BC 1
	TNT1 A 0 A_JumpIfInventory("PowerBlazing",1,3)
	UZ2O D 1 A_JumpIf(Health<50,2)
	UZ2O EF 1
	TNT1 A 0 A_JumpIfInventory("PowerBlazing",1,3)
	UZ2O G 1 A_JumpIf(Health<25,2)
	UZ2O HI 1
	UZ2O J 0 A_SpawnItemEx("UziClipDrop2",0,0,20,0,1)
	TNT1 A 0 A_JumpIfInventory("PowerBlazing",1,2)
	UZ2O J 5 A_JumpIf(Health<75,1)
	TNT1 A 0 A_JumpIfInventory("PowerBlazing",1,2)
	UZ2O J 5 A_JumpIf(Health<50,1)
	TNT1 A 0 A_JumpIfInventory("PowerBlazing",1,2)
	UZ2O J 5 A_JumpIf(Health<25,1)
	UZ2R A 1
	TNT1 A 0 A_JumpIfInventory("PowerBlazing",1,2)
	UZ2R B 1 A_JumpIf(Health<75,1)
	UZ2R C 1
	TNT1 A 0 A_JumpIfInventory("PowerBlazing",1,2)
	UZ2R D 1 A_JumpIf(Health<50,1)
	UZ2R E 1
	TNT1 A 0 A_JumpIfInventory("PowerBlazing",1,2)
	UZ2R F 1 A_JumpIf(Health<25,1)
	UZ2R A 0 A_PlaySound("Uzi/In",5,0.7)
	UZ2R GHI 1
  LStart:
	TNT1 A 0 A_JumpIfInventory("UziClipLeft",0,"LEnd")
	TNT1 A 0 A_JumpIfInventory("BulletAmmo",1,1)
	Goto LEnd
	TNT1 A 0 A_TakeInventory("BulletAmmo",1,1)
	TNT1 A 0 A_GiveInventory("UziClipLeft",1)
	goto LStart
   LEnd:
   TNT1 A 0 A_JumpIfInventory("PowerBlazing",1,2)
	UZ2R J 1 A_JumpIf(Health<75,1)
	UZ2R K 1
	TNT1 A 0 A_JumpIfInventory("PowerBlazing",1,2)
	UZ2R L 1 A_JumpIf(Health<50,1)
	UZ2R M 1
	TNT1 A 0 A_JumpIfInventory("PowerBlazing",1,2)
	UZ2R N 1 A_JumpIf(Health<25,1)
	UZ2R O 1
	UZ2R P 1
	UZ2O CBA 1
	UZ2G A 3 A_TakeInventory("IsReloading",1)
	Goto LIdle
  LBack:
	UZ2G A 2
	UZ2G A 0 A_TakeInventory("IsReloading",1)
	Goto LIdle
	
  NullFlash:
    TNT1 A 0
	Stop
  Dualwelding:
	UZ2G A 0 A_JumpIfInventory("LeadspitPickupCounter",2,"RIdle")
	TNT1 A 0 A_JumpIfInventory("SynthFireActive",1,1)
	Stop
	TNT1 A 0 A_Light0
	Goto RightIdle
  RIdle:
	UZIG A 0 A_JumpIfInventory("MacheteGoesFast",1,"CaberToss")
	UZIG A 0 A_JumpIfInventory("SynthFireRight",1,"RFire")
    UZIG A 0 A_JumpIfInventory("IsReloading",1,"RReload")
	UZIG A 1
    Loop
  RFire:
    UZIG A 0 A_JumpIfInventory("UziClipRight",1,2)
	UZIG A 0 A_Jump(256,"RReload")
	UZIF A 0 A_PlaySound("Uzi/Fire",1,0.7)
	UZIF A 0 A_TakeInventory("UziClipRight",1,TIF_NOTAKEINFINITE)
	UZ2F A 0 A_FireCustomMissile("GunsmokeSpawner_Small_MG",0,0,13,-1)
    UZIF A 0 A_FireBullets(5.0,2.75, -1, 6, "BulletPuff")
	TNT1 A 0 A_JumpIfInventory("PowerBlazing",1,3)
	UZIF A 0 A_JumpIf(Health<50,2)
	UZIF A 0 A_Jump(256,"RFireMain")
	UZIF A 0 A_TakeInventory("UziClipRight",1,TIF_NOTAKEINFINITE)
	UZIF A 0 A_FireBullets(5.0,2.75, -1, 6, "BulletPuff")
	TNT1 A 0 A_JumpIfInventory("PowerBlazing",1,3)
	UZIF A 0 A_JumpIf(Health<25,2)
	UZIF A 0 A_Jump(256,"RFireMain")
	UZIF A 0 A_TakeInventory("UziClipRight",1,TIF_NOTAKEINFINITE)
	UZIF A 0 A_FireBullets(5.0,2.75, -1, 6, "BulletPuff")
  RFireMain:
	UZIF A 0 A_AlertMonsters
	UZIF A 0 A_Light1
    UZIF A 1 Bright A_SetPitch(pitch-0.15)
	UZIF B 1 Bright A_SetPitch(pitch-0.1)
	UZIF B 0 A_FireCustomMissile("BuellerCasingSpawner2",0,0,5,5)
	TNT1 A 0 A_JumpIfInventory("PowerBlazing",1,3)
	UZIF A 0 A_JumpIf(Health<50,2)
	UZIF A 0 A_Jump(256,"RFireMain2")
	UZIF B 0 A_FireCustomMissile("BuellerCasingSpawner2",0,0,5,5)
	UZIF A 0 A_JumpIfInventory("PowerBlazing",1,3)
	UZIF A 0 A_JumpIf(Health<25,2)
	UZIF A 0 A_Jump(256,"RFireMain2")
	UZIF B 0 A_FireCustomMissile("BuellerCasingSpawner2",0,0,5,5)
  RFireMain2:
	UZIF C 0 A_JumpIfInventory("SynthFireRight",1,"RFire")
	UZIF C 1 A_Light2
	UZIF DE 1
	UZIG A 2 A_Light0
	Goto RIdle
  RNope:
	UZIF A 0 A_PlaySound("Uzi/Dry",4,1.0)
	UZIF A 0 A_TakeInventory("IsReloading",1)
	UZIF EDCDE 1
    Goto RIdle
  RReload:
	UZIG A 0 A_JumpIfInventory("UziClipRight",0,"RBack")
	UZIG A 0 A_JumpIfInventory("BulletAmmo",1,1)
	Goto RNope
	UZIO A 0 A_PlaySound("Uzi/Out",5,0.7)
	TNT1 A 0 A_JumpIfInventory("PowerBlazing",1,3)
	UZIO A 1 A_JumpIf(Health<75,2)
	UZIO BC 1
	TNT1 A 0 A_JumpIfInventory("PowerBlazing",1,3)
	UZIO D 1 A_JumpIf(Health<50,2)
	UZIO EF 1
	TNT1 A 0 A_JumpIfInventory("PowerBlazing",1,3)
	UZIO G 1 A_JumpIf(Health<25,2)
	UZIO HI 1
	UZIO J 0 A_SpawnItemEx("UziClipDrop",0,0,20,0,1)
	TNT1 A 0 A_JumpIfInventory("PowerBlazing",1,2)
	UZIO J 5 A_JumpIf(Health<75,1)
	TNT1 A 0 A_JumpIfInventory("PowerBlazing",1,2)
	UZIO J 5 A_JumpIf(Health<50,1)
	TNT1 A 0 A_JumpIfInventory("PowerBlazing",1,2)
	UZIO J 5 A_JumpIf(Health<25,1)
	UZIR A 1
	TNT1 A 0 A_JumpIfInventory("PowerBlazing",1,2)
	UZIR B 1 A_JumpIf(Health<75,1)
	UZIR C 1
	TNT1 A 0 A_JumpIfInventory("PowerBlazing",1,2)
	UZIR D 1 A_JumpIf(Health<50,1)
	UZIR E 1
	TNT1 A 0 A_JumpIfInventory("PowerBlazing",1,2)
	UZIR F 1 A_JumpIf(Health<25,1)
	UZIR A 0 A_PlaySound("Uzi/In",5,0.7)
	UZIR GHI 1
  RStart:
	TNT1 A 0 A_JumpIfInventory("UziClipRight",0,"REnd")
	TNT1 A 0 A_JumpIfInventory("BulletAmmo",1,1)
	Goto REnd
	TNT1 A 0 A_TakeInventory("BulletAmmo",1,1)
	TNT1 A 0 A_GiveInventory("UziClipRight",1)
	goto RStart
  REnd:
	TNT1 A 0 A_JumpIfInventory("PowerBlazing",1,2)
	UZIR J 1 A_JumpIf(Health<75,1)
	UZIR K 1
	TNT1 A 0 A_JumpIfInventory("PowerBlazing",1,2)
	UZIR L 1 A_JumpIf(Health<50,1)
	UZIR M 1
	TNT1 A 0 A_JumpIfInventory("PowerBlazing",1,2)
	UZIR N 1 A_JumpIf(Health<25,1)
	UZIR O 1
	UZIR P 1
	UZIO CBA 1
	UZIG A 3 A_TakeInventory("IsReloading",1)
	Goto RIdle
  RBack:
	UZ2G A 0 A_TakeInventory("IsReloading",1)
	Goto RIdle
  Fire:
	TNT1 A 0
	Stop
  AltFire:
	TNT1 A 0
	Stop
  CaberToss:
    UZIG A 1 A_JumpIfInventory("MacheteAmmo",1,1)
	Goto RIdle
	MCHT A 0 A_TakeInventory("MacheteAmmo",1)
	UZIU CBA 1

    TNT1 A 0 A_JumpIfInventory("PowerBlazing",1,2)
	TNT1 A 1 A_JumpIf(Health<75,1)
	TNT1 A 1
    TNT1 A 0 A_JumpIfInventory("PowerBlazing",1,2)
	TNT1 A 1 A_JumpIf(Health<50,1)
	TNT1 A 1
    TNT1 A 0 A_JumpIfInventory("PowerBlazing",1,2)
	TNT1 A 1 A_JumpIf(Health<25,1)
	TNT1 A 1
    MC4S A 0 A_PlaySound("Machete1/Slash",1,0.9)
    MC4S A 0 A_PlaySound("Machete2/Slash",5,0.2)
	MCHT ABC 1
	TNT1 A 0 A_JumpIfInventory("PowerStrength2",1,3)
	MCHT A 0 A_SpawnItemEX("MacheterangProjectile",cos(-pitch)*48,0,32+(sin(-pitch)*48),cos(-pitch)*35,0,sin(-pitch)*35,0,SXF_NOCHECKPOSITION|SXF_TRANSFERPITCH)
	TNT1 A 0 A_Jump(256,2)
	MCHT A 0 A_SpawnItemEX("MacheterangBerserkProjectile",cos(-pitch)*48,0,32+(sin(-pitch)*48),cos(-pitch)*25,0,sin(-pitch)*25,0,SXF_NOCHECKPOSITION|SXF_TRANSFERPITCH)
    TNT1 A 0 A_JumpIfInventory("PowerBlazing",1,2)
	MCHT D 1 A_JumpIf(Health<75,1)
	MCHT E 1
	TNT1 A 0 A_JumpIfInventory("PowerBlazing",1,2)
	MCHT F 1 A_JumpIf(Health<50,1)
	MCHT G 1
	TNT1 A 0 A_JumpIfInventory("PowerBlazing",1,2)
	MCHT H 1 A_JumpIf(Health<25,1)
	MCHT I 1
	TNT1 A 3

	UZIU ABC 1
	Goto RIdle
  Spawn:
    UZIG X -1
    Stop
  }
}

ACTOR LeadspitPickupCounter : Inventory
{
Inventory.Icon "TNT1A0"
Inventory.PickupMessage "DOUBLE YOUR FUN, DOUBLE YOUR GUN!"
Inventory.MaxAmount 2
Inventory.Amount 1
-INVBAR
States
{
TNT1 A -1
Stop
}
}

ACTOR UziClipRight : Ammo
{
   Inventory.MaxAmount 30
   Inventory.Icon UZIGX0
   +IGNORESKILL
}

ACTOR UziClipLeft : Ammo
{
   Inventory.MaxAmount 30
   Inventory.Icon UZIGX0
   +IGNORESKILL
}