Actor Dukes: Weapon replaces Fist
{
	Weapon.SelectionOrder 9
	Weapon.AmmoUse 0
	Weapon.BobStyle InverseSmooth
	Weapon.BobRangeY 0.5
	+WEAPON.MELEEWEAPON
	+WEAPON.WIMPY_WEAPON
	+BLOODLESSIMPACT
	+NOALERT
	+THRUGHOST
	AttackSound "fists_strike"
	States
	{
	Ready:
		DUKE A 1 A_WeaponReady
		Loop
	Deselect:
		DUKE A 1 A_Lower
		Loop
	Select:
		DUKE A 0 A_SetCrosshair(10)
		DUKE A 1 A_Raise
		Loop
	Fire:
		DUKE A 4
		DUKE B 0 A_PlayWeaponSound("fists_swing")
		DUKE B 3
		DUKE C 5 A_CustomPunch(8, 0, 0, "MeleePuff")
		DUKE B 4
		DUKE A 5
		DUKE A 5 A_Refire
		Goto Ready
	AltFire:
		DUKE B 0 A_PlayWeaponSound("fists_swing")
		DUKE B 3
		DUKE C 5 A_CustomPunch(3, 0, 0, "MeleePuff")
		DUKE B 5 A_Refire
		Goto Ready
	}
}

Actor Revolver: Weapon replaces Pistol
{
	Weapon.SelectionOrder 5
	Weapon.AmmoUse 1
	Weapon.AmmoGive 6
	Weapon.AmmoGive2 6
	Weapon.BobStyle InverseSmooth
	Weapon.BobRangeY 0.5
	Weapon.AmmoType "RevolverChamber"
	Weapon.AmmoType2 "Bullets"
	+WEAPON.NOAUTOAIM
	+AMMO_OPTIONAL
	+NOALERT
	+THRUGHOST
	States
	{
	Ready:
		REVO A 1 A_WeaponReady(WRF_ALLOWRELOAD)
		Loop
	Deselect:
		REVO A 1 A_Lower
		Loop
	Select:
		REVO A 0 A_SetCrosshair(10)
		REVO A 1 A_Raise
		Loop
	Fire:
		TNT1 A 0 A_JumpIfInventory("RevolverChamber",1,3)
		REVO A 1 A_PlayWeaponSound("pistol_empty")
		REVO A 6 A_WeaponReady(14)
		Goto Ready
		
		REVO A 4
		TNT1 A 0 A_PlayWeaponSound("pistol_fire")
		TNT1 A 0 A_FireBullets(4.5,0,-1,random(20,50),"NewPuff",FBF_USEAMMO|FBF_NORANDOM)
		TNT1 A 0 A_FireCustomMissile("GunSmokeSpawner",0,0,0,1)
		TNT1 A 0 A_AlertMonsters
		REVO B 10 BRIGHT A_GunFlash
		REVO C 7
		REVO D 5
		REVO D 5 A_ReFire
		Goto Ready
	AltFire:
		TNT1 A 0 A_JumpIfInventory("RevolverChamber",1,3)
		REVO A 1 A_PlayWeaponSound("pistol_empty")
		REVO A 6 A_WeaponReady(14)
		Goto Ready
		
		TNT1 A 0 A_PlayWeaponSound("pistol_fire")
		TNT1 A 0 A_FireBullets(10,0,-1,random(20,50),"NewPuff",FBF_USEAMMO|FBF_NORANDOM)
		TNT1 A 0 A_FireCustomMissile("GunSmokeSpawner",0,0,0,1)
		TNT1 A 0 A_AlertMonsters
		TNT1 A 0 A_TakeInventory("RevolverChamber",1)
		REVO F 6 BRIGHT A_GunFlash
		REVO G 3
		REVO G 5 A_Refire
		Goto Ready
	Reload:
		TNT1 A 0 A_JumpIfInventory("RevolverChamber",6,2)
		TNT1 A 0 A_JumpIfInventory("Bullets",1,2)
		TNT1 A 0
		Goto Ready
		
		TNT1 A 0 A_TakeInventory("Bullets",1)
		TNT1 A 0 A_GiveInventory("RevolverChamber",1)
		TNT1 A 0 A_PlayWeaponSound("pistol_reload")
		REVO E 8
		Goto Ready
	Flash:
		TNT1 A 7 Bright A_Light1
		Goto LightDone
		TNT1 A 7 Bright A_Light1
		Goto LightDone
	}
}

Actor RevolverChamber : Ammo {Inventory.MaxAmount 6}

Actor Rifle: Weapon replaces Shotgun
{
	Inventory.PickupMessage "Rifle"
	Inventory.PickupSound "pickup_weapon"
	Weapon.SelectionOrder 4
	Weapon.AmmoUse 1
	Weapon.AmmoGive 0
	Weapon.AmmoGive2 12
	Weapon.BobStyle InverseSmooth
	Weapon.BobRangeY 0.5
	Weapon.AmmoType "RifleChamber"
	Weapon.AmmoType2 "Cartridges"
	Scale 0.8
	+WEAPON.NOAUTOAIM
	+AMMO_OPTIONAL
	+NOALERT
	+THRUGHOST
	+DONTGIB
	+INVENTORY.NOSCREENFLASH
	States
	{
	Spawn:
		RIFL P -1
		Stop
	Ready:
		RIFL A 0 A_JumpIfInventory("Zoomed",1,"ZoomedReady")
		RIFL A 1 A_WeaponReady(WRF_ALLOWRELOAD|WRF_ALLOWZOOM)
		Loop
	ZoomedReady:
		RIFL F 1 A_WeaponReady(WRF_NOBOB|WRF_ALLOWZOOM|WRF_ALLOWRELOAD)
		Goto Ready
	Deselect:
		RIFL A 0 A_ZoomFactor(1.00)
		RIFL A 0 A_TakeInventory("Zoomed",100)
		RIFL A 1 A_Lower
		Loop
	Select:
		RIFL A 0 A_SetCrosshair(10)
		RIFL A 0 A_TakeInventory("Zoomed",100)
		RIFL A 1 A_Raise
		Loop
	Fire:
		TNT1 A 0 A_JumpIfInventory("Zoomed",1,"ZoomedFire")
		TNT1 A 0 A_JumpIfInventory("RifleChamber",1,3)
		RIFL A 1 A_PlayWeaponSound("rifle_empty")
		RIFL A 6 A_WeaponReady(14)
		Goto Ready
		
		RIFL A 4
		TNT1 A 0 A_PlayWeaponSound("rifle_fire")
		TNT1 A 0 A_FireBullets(2.4,0,-1,15,"NewPuff")
		TNT1 A 0 A_FireCustomMissile("GunSmokeSpawner",0,0,0,1)
		TNT1 A 0 A_AlertMonsters
		RIFL B 8 BRIGHT A_GunFlash
		RIFL C 6
		RIFL A 8
		RIFL A 5 A_ReFire
		Goto Ready
	ZoomedFire:
		TNT1 A 0 A_JumpIfInventory("RifleChamber",1,3)
		RIFL F 1 A_PlayWeaponSound("rifle_empty")
		RIFL F 6 A_WeaponReady(WRF_NOBOB|WRF_NOFIRE)
		Goto Ready
		
		RIFL F 4
		TNT1 A 0 A_PlayWeaponSound("rifle_fire")
		TNT1 A 0 A_FireBullets(0,0,1,15,"NewPuff")
		TNT1 A 0 A_FireCustomMissile("GunSmokeSpawner",0,0,0,1)
		TNT1 A 0 A_AlertMonsters
		RIFL G 8 BRIGHT A_GunFlash
		RIFL F 6
		RIFL F 8
		RIFL F 5 A_ReFire
		Goto Ready
	Reload:
		TNT1 A 0 A_JumpIfInventory("Zoomed",1,"Unzoom")
		TNT1 A 0 A_JumpIfInventory("RifleChamber",12,2)
		TNT1 A 0 A_JumpIfInventory("Cartridges",1,2)
		TNT1 A 0
		Goto Ready
		
		TNT1 A 0 A_TakeInventory("Cartridges",1)
		TNT1 A 0 A_GiveInventory("RifleChamber",1)
		TNT1 A 0 A_PlayWeaponSound("rifle_reload")
		RIFL D 6
		RIFL E 6
		Goto Ready
	Zoom:
		RIFL A 0 A_JumpIfInventory("SniperScope",1,2)
		RIFL A 6 A_WeaponReady(14)
		Goto Ready
		
		RIFL A 0 A_JumpIfInventory("Zoomed",1,"Unzoom")
		
		RIFL A 0 A_GiveInventory("Zoomed",1)
		RIFL FFFFFFFFFF 1 A_ZoomFactor(3.00)
		Goto ZoomedReady
	Unzoom:
		RIFL A 0 A_TakeInventory("Zoomed",100)
		RIFL A 0 A_ZoomFactor(1.00)
		RIFL AAAAAAAAAA 1
		Goto Ready
	Flash:
		TNT1 A 7 Bright A_Light1
		Goto LightDone
		TNT1 A 7 Bright A_Light1
		Goto LightDone
	}
}

Actor RifleChamber : Ammo {Inventory.MaxAmount 12}

Actor Zoomed : Inventory {Inventory.MaxAmount 1}

Actor SniperScope : CustomInventory
{
	Inventory.PickupMessage "Rifle Scope"
	Inventory.PickupSound "pickup_ammo"
	Inventory.MaxAmount 1
	Scale 0.5
	+INVENTORY.NOSCREENFLASH
	+DONTGIB
	States
	{
	Spawn:
		SCOP A -1
		Stop
	Pickup:
		SCOP A 0
		SCOP A 1 ACS_NamedExecute("gun_getscope",0)
		Stop
	Use:
		SCOP A 0
		Fail
	}
}

Actor OlShotgun: Weapon replaces Chaingun
{
	Inventory.PickupMessage "Shotgun"
	Inventory.PickupSound "pickup_weapon"
	Weapon.SelectionOrder 3
	Weapon.AmmoUse 1
	Weapon.AmmoGive 0
	Weapon.AmmoGive2 6
	Weapon.BobStyle InverseSmooth
	Weapon.BobRangeY 0.5
	Weapon.AmmoType "ShotgunChamber"
	Weapon.AmmoType2 "Shells"
	Scale 0.8
	+WEAPON.NOAUTOAIM
	+AMMO_OPTIONAL
	+NOALERT
	+THRUGHOST
	+DONTGIB
	+INVENTORY.NOSCREENFLASH
	States
	{
	Spawn:
		SGUN P -1
		Stop
	Ready:
		SGUN A 1 A_WeaponReady(WRF_ALLOWRELOAD)
		Loop
	Deselect:
		SGUN A 1 A_Lower
		Loop
	Select:
		SGUN A 0 A_SetCrosshair(10)
		SGUN A 1 A_Raise
		Loop
	Fire:
		TNT1 A 0 A_JumpIfInventory("ShotgunChamber",1,3)
		SGUN A 1 A_PlayWeaponSound("shotguns_empty")
		SGUN A 6 A_WeaponReady(14)
		Goto Ready
		
		SGUN A 4
		TNT1 A 0 A_PlayWeaponSound("singleshot_fire")
		TNT1 A 0 A_FireBullets(7, 7, 9, 5, "NewPuff")
		TNT1 A 0 A_FireCustomMissile("GunSmokeSpawner",0,0,0,1)
		TNT1 A 0 A_AlertMonsters
		SGUN B 10 BRIGHT A_GunFlash
		SGUN C 7
		SGUN A 12
		Goto Ready
	Reload:
		TNT1 A 0 A_JumpIfInventory("ShotgunChamber",1,2)
		TNT1 A 0 A_JumpIfInventory("Shells",1,2)
		TNT1 A 0
		Goto Ready
		
		TNT1 A 0 A_TakeInventory("Shells",1)
		TNT1 A 0 A_GiveInventory("ShotgunChamber",1)
		TNT1 A 0 A_PlayWeaponSound("shotguns_reload")
		SGUN D 10
		SGUN E 10
		Goto Ready
	Flash:
		TNT1 A 7 Bright A_Light1
		Goto LightDone
		TNT1 A 7 Bright A_Light1
		Goto LightDone
	}
}

Actor ShotgunChamber : Ammo {Inventory.MaxAmount 1}

Actor DBShotgun: Weapon replaces RocketLauncher
{
	Inventory.PickupMessage "Double Barrel Shotgun"
	Inventory.PickupSound "pickup_weapon"
	Weapon.SelectionOrder 2
	Weapon.AmmoUse 1
	Weapon.AmmoGive 0
	Weapon.AmmoGive2 6
	Weapon.BobStyle InverseSmooth
	Weapon.BobRangeY 0.5
	Weapon.AmmoType "DBShotgunChamber"
	Weapon.AmmoType2 "Shells"
	Scale 0.8
	+WEAPON.NOAUTOAIM
	+AMMO_OPTIONAL
	+NOALERT
	+THRUGHOST
	+DONTGIB
	+INVENTORY.NOSCREENFLASH
	States
	{
	Spawn:
		DBRL P -1
		Stop
	Ready:
		DBRL A 1 A_WeaponReady(WRF_ALLOWRELOAD)
		Loop
	Deselect:
		DBRL A 1 A_Lower
		Loop
	Select:
		DBRL A 0 A_SetCrosshair(10)
		DBRL A 1 A_Raise
		Loop
	Fire:
		TNT1 A 0 A_JumpIfInventory("DBShotgunChamber",2,3)
		DBRL A 1 A_PlayWeaponSound("shotguns_empty")
		DBRL A 6 A_WeaponReady(14)
		Goto Ready
		
		DBRL A 4
		TNT1 A 0 A_PlayWeaponSound("doublebarrel_fire2")
		TNT1 A 0 A_FireBullets(10, 4, 9, 6, "NewPuff")
		TNT1 A 0 A_FireBullets(5, 4, 9, 6, "NewPuff")
		TNT1 A 0 A_FireCustomMissile("GunSmokeSpawner",0,0,-5,1)
		TNT1 A 0 A_FireCustomMissile("GunSmokeSpawner",0,0,5,1)
		TNT1 A 0 A_AlertMonsters
		DBRL B 10 BRIGHT A_GunFlash
		DBRL C 7
		DBRL A 14
		Goto Ready
	AltFire:
		TNT1 A 0 A_JumpIfInventory("DBShotgunChamber",2,"FirstBarrel")
		TNT1 A 0 A_JumpIfInventory("DBShotgunChamber",1,"SecondBarrel")
		DBRL A 1 A_PlayWeaponSound("shotguns_empty")
		DBRL A 6 A_WeaponReady(14)
		Goto Ready
	FirstBarrel:
		DBRL A 4
		TNT1 A 0 A_PlayWeaponSound("doublebarrel_fire1")
		TNT1 A 0 A_FireBullets(5, 5, 9, 5, "NewPuff")
		TNT1 A 0 A_FireCustomMissile("GunSmokeSpawner",0,0,5,1)
		TNT1 A 0 A_TakeInventory("DBShotgunChamber",1)
		TNT1 A 0 A_AlertMonsters
		DBRL B 8 BRIGHT A_GunFlash
		DBRL C 6
		DBRL A 8
		Goto Ready
	SecondBarrel:
		DBRL A 4
		TNT1 A 0 A_PlayWeaponSound("doublebarrel_fire1")
		TNT1 A 0 A_FireBullets(5, 5, 9, 5, "NewPuff")
		TNT1 A 0 A_FireCustomMissile("GunSmokeSpawner",0,0,-5,1)
		TNT1 A 0 A_TakeInventory("DBShotgunChamber",1)
		TNT1 A 0 A_AlertMonsters
		DBRL B 8 BRIGHT A_GunFlash
		DBRL C 6
		DBRL A 8
		Goto Ready
	Reload:
		TNT1 A 0 A_JumpIfInventory("DBShotgunChamber",1,2)
		TNT1 A 0 A_JumpIfInventory("Shells",2,2)
		TNT1 A 0
		Goto Ready
		
		TNT1 A 0 A_TakeInventory("Shells",2)
		TNT1 A 0 A_GiveInventory("DBShotgunChamber",2)
		TNT1 A 0 A_PlayWeaponSound("shotguns_reload")
		DBRL D 13
		DBRL E 13
		Goto Ready
	Flash:
		TNT1 A 7 Bright A_Light2
		Goto LightDone
		TNT1 A 7 Bright A_Light2
		Goto LightDone
	}
}

Actor DBShotgunChamber : Ammo {Inventory.MaxAmount 2}

Actor SawnOffShotgun: Weapon replaces PlasmaRifle
{
	Inventory.PickupMessage "Sawed-off Shotgun"
	Inventory.PickupSound "pickup_weapon"
	Weapon.SelectionOrder 1
	Weapon.AmmoUse 2
	Weapon.AmmoGive 0
	Weapon.AmmoGive2 6
	Weapon.BobStyle InverseSmooth
	Weapon.BobRangeY 0.5
	Weapon.AmmoType "SWShotgunChamber"
	Weapon.AmmoType2 "Shells"
	Scale 0.8
	+WEAPON.NOAUTOAIM
	+AMMO_OPTIONAL
	+NOALERT
	+THRUGHOST
	+DONTGIB
	+INVENTORY.NOSCREENFLASH
	States
	{
	Spawn:
		SAWN P -1
		Stop
	Ready:
		SAWN A 1 A_WeaponReady(WRF_ALLOWRELOAD)
		Loop
	Deselect:
		SAWN A 1 A_Lower
		Loop
	Select:
		SAWN A 0 A_SetCrosshair(10)
		SAWN A 1 A_Raise
		Loop
	Fire:
		TNT1 A 0 A_JumpIfInventory("SWShotgunChamber",2,3)
		SAWN A 1 A_PlayWeaponSound("shotguns_empty")
		SAWN A 6 A_WeaponReady(14)
		Goto Ready
		
		SAWN A 4
		TNT1 A 0 A_PlayWeaponSound("sawnoff_fire")
		TNT1 A 0 A_FireBullets(30, 5, 9, 9, "NewPuff")
		TNT1 A 0 A_FireBullets(30, 5, 9, 8, "NewPuff")
		TNT1 A 0 A_FireCustomMissile("GunSmokeSpawner",0,0,-5,1)
		TNT1 A 0 A_FireCustomMissile("GunSmokeSpawner",0,0,5,1)
		TNT1 A 0 A_AlertMonsters
		SAWN B 10 BRIGHT A_GunFlash
		SAWN C 7
		SAWN A 14
		Goto Ready
	Reload:
		TNT1 A 0 A_JumpIfInventory("SWShotgunChamber",1,2)
		TNT1 A 0 A_JumpIfInventory("Shells",2,2)
		TNT1 A 0
		Goto Ready
		
		TNT1 A 0 A_TakeInventory("Shells",2)
		TNT1 A 0 A_GiveInventory("SWShotgunChamber",2)
		TNT1 A 0 A_PlayWeaponSound("shotguns_reload")
		SAWN D 13
		SAWN E 13
		Goto Ready
	Flash:
		TNT1 A 7 Bright A_Light2
		Goto LightDone
		TNT1 A 7 Bright A_Light2
		Goto LightDone
	}
}

Actor SWShotgunChamber : Ammo {Inventory.MaxAmount 2}

Actor TNTThrower : Weapon
{
	Weapon.SelectionOrder 7
	Weapon.AmmoUse 1
	Weapon.AmmoGive 1
	Weapon.AmmoGive2 0
	Weapon.BobStyle InverseSmooth
	Weapon.BobRangeY 0.5
	Weapon.AmmoType "TNTSticks"
	Weapon.AmmoType2 "TNTThrowPower"
	+WEAPON.NOAUTOAIM
	+WEAPON.NOAUTOFIRE
	+NOALERT
	States
	{
	Ready:
		DYNA A 1 A_WeaponReady
		Loop
	Deselect:
		TNT1 A 0 A_JumpIfInventory("TNTSticks",1,2)
		TNT1 A 1 A_Lower
		Loop
		DYNA A 1 A_Lower
		Loop
	Select:
		DYNA A 0 A_SetCrosshair(10)
		DYNA A 0 A_TakeInventory("TNTThrowPower",30)
		DYNA A 1 A_Raise
		Loop
	Fire:
		DYNA A 0 A_JumpIfInventory("TNTThrowPower",1,"Buildup")
		DYNA A 4
		DYNA B 10 A_PlaySound("tnt_fuse",CHAN_AUTO,255,1)
		DYNA C 4
	Buildup:
		DYNA C 2 A_GiveInventory("TNTThrowPower",1)
		DYNA C 0 A_Refire
		
		DYNA D 2 A_PlaySound("tnt_throw",255)
		DYNA D 0 A_StopSound(CHAN_AUTO)
		
		TNT1 A 0 A_JumpIfInventory("TNTThrowPower",30,"Throw30")
		TNT1 A 0 A_JumpIfInventory("TNTThrowPower",29,"Throw29")
		TNT1 A 0 A_JumpIfInventory("TNTThrowPower",28,"Throw28")
		TNT1 A 0 A_JumpIfInventory("TNTThrowPower",27,"Throw27")
		TNT1 A 0 A_JumpIfInventory("TNTThrowPower",26,"Throw26")
		TNT1 A 0 A_JumpIfInventory("TNTThrowPower",25,"Throw25")
		TNT1 A 0 A_JumpIfInventory("TNTThrowPower",24,"Throw24")
		TNT1 A 0 A_JumpIfInventory("TNTThrowPower",23,"Throw23")
		TNT1 A 0 A_JumpIfInventory("TNTThrowPower",22,"Throw22")
		TNT1 A 0 A_JumpIfInventory("TNTThrowPower",21,"Throw21")
		TNT1 A 0 A_JumpIfInventory("TNTThrowPower",20,"Throw20")
		TNT1 A 0 A_JumpIfInventory("TNTThrowPower",19,"Throw19")
		TNT1 A 0 A_JumpIfInventory("TNTThrowPower",18,"Throw18")
		TNT1 A 0 A_JumpIfInventory("TNTThrowPower",17,"Throw17")
		TNT1 A 0 A_JumpIfInventory("TNTThrowPower",16,"Throw16")
		TNT1 A 0 A_JumpIfInventory("TNTThrowPower",15,"Throw15")
		TNT1 A 0 A_JumpIfInventory("TNTThrowPower",14,"Throw14")
		TNT1 A 0 A_JumpIfInventory("TNTThrowPower",13,"Throw13")
		TNT1 A 0 A_JumpIfInventory("TNTThrowPower",12,"Throw12")
		TNT1 A 0 A_JumpIfInventory("TNTThrowPower",11,"Throw11")
		TNT1 A 0 A_JumpIfInventory("TNTThrowPower",10,"Throw10")
		TNT1 A 0 A_JumpIfInventory("TNTThrowPower",9,"Throw9")
		TNT1 A 0 A_JumpIfInventory("TNTThrowPower",8,"Throw8")
		TNT1 A 0 A_JumpIfInventory("TNTThrowPower",7,"Throw7")
		TNT1 A 0 A_JumpIfInventory("TNTThrowPower",6,"Throw6")
		TNT1 A 0 A_JumpIfInventory("TNTThrowPower",5,"Throw5")
		TNT1 A 0 A_JumpIfInventory("TNTThrowPower",4,"Throw4")
		TNT1 A 0 A_JumpIfInventory("TNTThrowPower",3,"Throw3")
		TNT1 A 0 A_JumpIfInventory("TNTThrowPower",2,"Throw2")
		TNT1 A 0 A_JumpIfInventory("TNTThrowPower",1,"Throw1")
		
	Throw30:
		DYNA D 0 A_FireCustomMissile("TNTStick30",0,1,0,0,500)
		Goto Final
	Throw29:
		DYNA D 0 A_FireCustomMissile("TNTStick29",0,1,0,0,500)
		Goto Final
	Throw28:
		DYNA D 0 A_FireCustomMissile("TNTStick28",0,1,0,0,500)
		Goto Final
	Throw27:
		DYNA D 0 A_FireCustomMissile("TNTStick27",0,1,0,0,500)
		Goto Final
	Throw26:
		DYNA D 0 A_FireCustomMissile("TNTStick26",0,1,0,0,500)
		Goto Final
	Throw25:
		DYNA D 0 A_FireCustomMissile("TNTStick25",0,1,0,0,500)
		Goto Final
	Throw24:
		DYNA D 0 A_FireCustomMissile("TNTStick24",0,1,0,0,500)
		Goto Final
	Throw23:
		DYNA D 0 A_FireCustomMissile("TNTStick23",0,1,0,0,500)
		Goto Final
	Throw22:
		DYNA D 0 A_FireCustomMissile("TNTStick22",0,1,0,0,500)
		Goto Final
	Throw21:
		DYNA D 0 A_FireCustomMissile("TNTStick21",0,1,0,0,500)
		Goto Final
	Throw20:
		DYNA D 0 A_FireCustomMissile("TNTStick20",0,1,0,0,500)
		Goto Final
	Throw19:
		DYNA D 0 A_FireCustomMissile("TNTStick19",0,1,0,0,500)
		Goto Final
	Throw18:
		DYNA D 0 A_FireCustomMissile("TNTStick18",0,1,0,0,500)
		Goto Final
	Throw17:
		DYNA D 0 A_FireCustomMissile("TNTStick17",0,1,0,0,500)
		Goto Final
	Throw16:
		DYNA D 0 A_FireCustomMissile("TNTStick16",0,1,0,0,500)
		Goto Final
	Throw15:
		DYNA D 0 A_FireCustomMissile("TNTStick15",0,1,0,0,500)
		Goto Final
	Throw14:
		DYNA D 0 A_FireCustomMissile("TNTStick14",0,1,0,0,500)
		Goto Final
	Throw13:
		DYNA D 0 A_FireCustomMissile("TNTStick13",0,1,0,0,500)
		Goto Final
	Throw12:
		DYNA D 0 A_FireCustomMissile("TNTStick12",0,1,0,0,500)
		Goto Final
	Throw11:
		DYNA D 0 A_FireCustomMissile("TNTStick11",0,1,0,0,500)
		Goto Final
	Throw10:
		DYNA D 0 A_FireCustomMissile("TNTStick10",0,1,0,0,500)
		Goto Final
	Throw9:
		DYNA D 0 A_FireCustomMissile("TNTStick9",0,1,0,0,500)
		Goto Final
	Throw8:
		DYNA D 0 A_FireCustomMissile("TNTStick8",0,1,0,0,500)
		Goto Final
	Throw7:
		DYNA D 0 A_FireCustomMissile("TNTStick7",0,1,0,0,500)
		Goto Final
	Throw6:
		DYNA D 0 A_FireCustomMissile("TNTStick6",0,1,0,0,500)
		Goto Final
	Throw5:
		DYNA D 0 A_FireCustomMissile("TNTStick5",0,1,0,0,500)
		Goto Final
	Throw4:
		DYNA D 0 A_FireCustomMissile("TNTStick4",0,1,0,0,500)
		Goto Final
	Throw3:
		DYNA D 0 A_FireCustomMissile("TNTStick3",0,1,0,0,500)
		Goto Final
	Throw2:
		DYNA D 0 A_FireCustomMissile("TNTStick2",0,1,0,0,500)
		Goto Final
	Throw1:
		DYNA D 0 A_FireCustomMissile("TNTStick1",0,1,0,0,500)
		Goto Final
		
	Final:
		DYNA D 10 A_TakeInventory("TNTThrowPower",30)
		DYNA D 0 A_CheckReload
		DYNA A 4
		Goto Ready
	}
}

Actor TNTThrowPower : Ammo {Inventory.MaxAmount 30}

Actor TNTStick1
{
	Speed 1
	Mass 100
	BounceType Doom
	+THRUACTORS
	-STEPMISSILE
	+FORCERADIUSDMG
	+NOBLOCKMONST
	+DONTGIB
	BounceFactor 12
	BounceCount 2
	ReactionTime 20
	Scale 0.2
	States
	{
	Spawn:
		TNT1 A 0
		TNT1 A 0 A_PlaySound("tnt_fuse",CHAN_AUTO,128,1)
		TNT1 A 0 A_Countdown
		TNT1 A 0 A_CheckFloor("Grounded")
		DYST AB 3
		Loop
	Grounded:
		DYST CD 3
		Goto Spawn
	Death:
		TNT1 A 0
		TNT1 A 0 A_Spawnitemex("TNTExplosion",0,0,16,0,0,0,0,0,0)
		TNT1 A 1 A_AlertMonsters
		Stop
	}
}

Actor TNTStick2: TNTStick1 {Speed 2}

Actor TNTStick3: TNTStick1 {Speed 3}

Actor TNTStick4: TNTStick1 {Speed 4}

Actor TNTStick5: TNTStick1 {Speed 5}

Actor TNTStick6: TNTStick1 {Speed 6}

Actor TNTStick7: TNTStick1 {Speed 7}

Actor TNTStick8: TNTStick1 {Speed 8}

Actor TNTStick9: TNTStick1 {Speed 9}

Actor TNTStick10: TNTStick1 {Speed 10}

Actor TNTStick11: TNTStick1 {Speed 11}

Actor TNTStick12: TNTStick1 {Speed 12}

Actor TNTStick13: TNTStick1 {Speed 13}

Actor TNTStick14: TNTStick1 {Speed 14}

Actor TNTStick15: TNTStick1 {Speed 15}

Actor TNTStick16: TNTStick1 {Speed 16}

Actor TNTStick17: TNTStick1 {Speed 17}

Actor TNTStick18: TNTStick1 {Speed 18}

Actor TNTStick19: TNTStick1 {Speed 19}

Actor TNTStick20: TNTStick1 {Speed 20}

Actor TNTStick21: TNTStick1 {Speed 21}

Actor TNTStick22: TNTStick1 {Speed 22}

Actor TNTStick23: TNTStick1 {Speed 23}

Actor TNTStick24: TNTStick1 {Speed 24}

Actor TNTStick25: TNTStick1 {Speed 25}

Actor TNTStick26: TNTStick1 {Speed 26}

Actor TNTStick27: TNTStick1 {Speed 27}

Actor TNTStick28: TNTStick1 {Speed 28}

Actor TNTStick29: TNTStick1 {Speed 29}

Actor TNTStick30: TNTStick1 {Speed 30}

Actor TNTExplosion
{
	+NOBLOCKMAP
	+THRUACTORS
	+NOINTERACTION
	+NOGRAVITY
	+FLOAT
	+CANPASS
	+NOCLIP
	+FORCERADIUSDMG
	Mass 100000
	States
	{
	Spawn:
		EXPL A 0
		EXPL A 0 A_PlaySound("tnt_explode",255)
		EXPL A 0 A_Explode(500,100,0)
		EXPL A 3 bright A_Explode(500,225,0)
		EXPL BCDEFG 3 bright
		stop
	}
}

Actor KnifeThrower : Weapon
{
	Weapon.SelectionOrder 6
	Weapon.AmmoUse 1
	Weapon.AmmoGive 1
	Weapon.AmmoGive2 0
	Weapon.BobStyle InverseSmooth
	Weapon.BobRangeY 0.5
	Weapon.AmmoType "Knife"
	Weapon.AmmoType2 "ThrowPower"
	AttackSound "knife_stab"
	+WEAPON.NOAUTOAIM
	+WEAPON.NOAUTOFIRE
	+WEAPON.MELEEWEAPON
	+WEAPON.ALT_USES_BOTH
	+NOALERT
	States
	{
	Ready:
		KNIF A 1 A_WeaponReady
		Loop
	Deselect:
		TNT1 A 0 A_JumpIfInventory("Knife",1,2)
		TNT1 A 1 A_Lower
		Loop
		KNIF A 1 A_Lower
		Loop
	Select:
		KNIF A 0 A_SetCrosshair(10)
		KNIF A 0 A_TakeInventory("ThrowPower",30)
		KNIF A 1 A_Raise
		Loop
	Fire:
		KNIF A 0 A_JumpIfInventory("ThrowPower",1,"Buildup")
		KNIF A 4 A_WeaponReady(WRF_NOBOB|WRF_NOFIRE|WRF_NOSWITCH)

	Buildup:
		KNIF B 2 A_GiveInventory("ThrowPower",1)
		KNIF B 0 A_Refire
		
		DYNA D 2 A_PlaySound("tnt_throw",255)
		
		TNT1 A 0 A_JumpIfInventory("ThrowPower",30,"Throw30")
		TNT1 A 0 A_JumpIfInventory("ThrowPower",29,"Throw29")
		TNT1 A 0 A_JumpIfInventory("ThrowPower",28,"Throw28")
		TNT1 A 0 A_JumpIfInventory("ThrowPower",27,"Throw27")
		TNT1 A 0 A_JumpIfInventory("ThrowPower",26,"Throw26")
		TNT1 A 0 A_JumpIfInventory("ThrowPower",25,"Throw25")
		TNT1 A 0 A_JumpIfInventory("ThrowPower",24,"Throw24")
		TNT1 A 0 A_JumpIfInventory("ThrowPower",23,"Throw23")
		TNT1 A 0 A_JumpIfInventory("ThrowPower",22,"Throw22")
		TNT1 A 0 A_JumpIfInventory("ThrowPower",21,"Throw21")
		TNT1 A 0 A_JumpIfInventory("ThrowPower",20,"Throw20")
		TNT1 A 0 A_JumpIfInventory("ThrowPower",19,"Throw19")
		TNT1 A 0 A_JumpIfInventory("ThrowPower",18,"Throw18")
		TNT1 A 0 A_JumpIfInventory("ThrowPower",17,"Throw17")
		TNT1 A 0 A_JumpIfInventory("ThrowPower",16,"Throw16")
		TNT1 A 0 A_JumpIfInventory("ThrowPower",15,"Throw15")
		TNT1 A 0 A_JumpIfInventory("ThrowPower",14,"Throw14")
		TNT1 A 0 A_JumpIfInventory("ThrowPower",13,"Throw13")
		TNT1 A 0 A_JumpIfInventory("ThrowPower",12,"Throw12")
		TNT1 A 0 A_JumpIfInventory("ThrowPower",11,"Throw11")
		TNT1 A 0 A_JumpIfInventory("ThrowPower",10,"Throw10")
		TNT1 A 0 A_JumpIfInventory("ThrowPower",9,"Throw9")
		TNT1 A 0 A_JumpIfInventory("ThrowPower",8,"Throw8")
		TNT1 A 0 A_JumpIfInventory("ThrowPower",7,"Throw7")
		TNT1 A 0 A_JumpIfInventory("ThrowPower",6,"Throw6")
		TNT1 A 0 A_JumpIfInventory("ThrowPower",5,"Throw5")
		TNT1 A 0 A_JumpIfInventory("ThrowPower",4,"Throw4")
		TNT1 A 0 A_JumpIfInventory("ThrowPower",3,"Throw3")
		TNT1 A 0 A_JumpIfInventory("ThrowPower",2,"Throw2")
		TNT1 A 0 A_JumpIfInventory("ThrowPower",1,"Throw1")
		
	Throw30:
		DYNA D 0 A_FireCustomMissile("ThrownKnife30",0,1,0,0,500)
		Goto Final
	Throw29:
		DYNA D 0 A_FireCustomMissile("ThrownKnife29",0,1,0,0,500)
		Goto Final
	Throw28:
		DYNA D 0 A_FireCustomMissile("ThrownKnife28",0,1,0,0,500)
		Goto Final
	Throw27:
		DYNA D 0 A_FireCustomMissile("ThrownKnife27",0,1,0,0,500)
		Goto Final
	Throw26:
		DYNA D 0 A_FireCustomMissile("ThrownKnife26",0,1,0,0,500)
		Goto Final
	Throw25:
		DYNA D 0 A_FireCustomMissile("ThrownKnife25",0,1,0,0,500)
		Goto Final
	Throw24:
		DYNA D 0 A_FireCustomMissile("ThrownKnife24",0,1,0,0,500)
		Goto Final
	Throw23:
		DYNA D 0 A_FireCustomMissile("ThrownKnife23",0,1,0,0,500)
		Goto Final
	Throw22:
		DYNA D 0 A_FireCustomMissile("ThrownKnife22",0,1,0,0,500)
		Goto Final
	Throw21:
		DYNA D 0 A_FireCustomMissile("ThrownKnife21",0,1,0,0,500)
		Goto Final
	Throw20:
		DYNA D 0 A_FireCustomMissile("ThrownKnife20",0,1,0,0,500)
		Goto Final
	Throw19:
		DYNA D 0 A_FireCustomMissile("ThrownKnife19",0,1,0,0,500)
		Goto Final
	Throw18:
		DYNA D 0 A_FireCustomMissile("ThrownKnife18",0,1,0,0,500)
		Goto Final
	Throw17:
		DYNA D 0 A_FireCustomMissile("ThrownKnife17",0,1,0,0,500)
		Goto Final
	Throw16:
		DYNA D 0 A_FireCustomMissile("ThrownKnife16",0,1,0,0,500)
		Goto Final
	Throw15:
		DYNA D 0 A_FireCustomMissile("ThrownKnife15",0,1,0,0,500)
		Goto Final
	Throw14:
		DYNA D 0 A_FireCustomMissile("ThrownKnife14",0,1,0,0,500)
		Goto Final
	Throw13:
		DYNA D 0 A_FireCustomMissile("ThrownKnife13",0,1,0,0,500)
		Goto Final
	Throw12:
		DYNA D 0 A_FireCustomMissile("ThrownKnife12",0,1,0,0,500)
		Goto Final
	Throw11:
		DYNA D 0 A_FireCustomMissile("ThrownKnife11",0,1,0,0,500)
		Goto Final
	Throw10:
		DYNA D 0 A_FireCustomMissile("ThrownKnife10",0,1,0,0,500)
		Goto Final
	Throw9:
		DYNA D 0 A_FireCustomMissile("ThrownKnife9",0,1,0,0,500)
		Goto Final
	Throw8:
		DYNA D 0 A_FireCustomMissile("ThrownKnife8",0,1,0,0,500)
		Goto Final
	Throw7:
		DYNA D 0 A_FireCustomMissile("ThrownKnife7",0,1,0,0,500)
		Goto Final
	Throw6:
		DYNA D 0 A_FireCustomMissile("ThrownKnife6",0,1,0,0,500)
		Goto Final
	Throw5:
		DYNA D 0 A_FireCustomMissile("ThrownKnife5",0,1,0,0,500)
		Goto Final
	Throw4:
		DYNA D 0 A_FireCustomMissile("ThrownKnife4",0,1,0,0,500)
		Goto Final
	Throw3:
		DYNA D 0 A_FireCustomMissile("ThrownKnife3",0,1,0,0,500)
		Goto Final
	Throw2:
		DYNA D 0 A_FireCustomMissile("ThrownKnife2",0,1,0,0,500)
		Goto Final
	Throw1:
		DYNA D 0 A_FireCustomMissile("ThrownKnife1",0,1,0,0,500)
		Goto Final
		
	Final:
		DYNA D 10 A_TakeInventory("ThrowPower",30)
		DYNA D 0 A_CheckReload
		KNIF A 4
		Goto Ready
		
	Altfire:
		KNIF A 0 A_PlayWeaponSound("fists_swing")
		KNIF A 3
		KNIF C 5 A_CustomPunch(8, 0, 0, "KnifePuff")
		KNIF A 5 A_Refire
		Goto Ready
	}
}

Actor ThrowPower : Ammo {Inventory.MaxAmount 30}

Actor ThrownKnife1
{
	Speed 1
	Damage (random(70,160))
	PROJECTILE
	-NOGRAVITY
	-NOBLOCKMAP
	+FORCEPAIN
	+NOEXTREMEDEATH
	+THRUGHOST
	-BLOODLESSIMPACT
	Scale 0.2
	States
	{
	Spawn:
		TKNF ABCD 3
		Loop
	Death:
		TKNF E 0 A_Gravity
		TKNF E 1 A_CheckFloor("Grounded")
		Goto Death
	Grounded:
		TKNF E 0 A_SpawnItem("Knife")
		TKNF E 0
		Stop
	XDeath:
		TNT1 A 0 A_PlaySound("knife_hit")
		TNT1 A 0
		Stop
	}
}

Actor ThrownKnife2: ThrownKnife1 {Speed 2}

Actor ThrownKnife3: ThrownKnife1 {Speed 3}

Actor ThrownKnife4: ThrownKnife1 {Speed 4}

Actor ThrownKnife5: ThrownKnife1 {Speed 5}

Actor ThrownKnife6: ThrownKnife1 {Speed 6}

Actor ThrownKnife7: ThrownKnife1 {Speed 7}

Actor ThrownKnife8: ThrownKnife1 {Speed 8}

Actor ThrownKnife9: ThrownKnife1 {Speed 9}

Actor ThrownKnife10: ThrownKnife1 {Speed 10}

Actor ThrownKnife11: ThrownKnife1 {Speed 11}

Actor ThrownKnife12: ThrownKnife1 {Speed 12}

Actor ThrownKnife13: ThrownKnife1 {Speed 13}

Actor ThrownKnife14: ThrownKnife1 {Speed 14}

Actor ThrownKnife15: ThrownKnife1 {Speed 15}

Actor ThrownKnife16: ThrownKnife1 {Speed 16}

Actor ThrownKnife17: ThrownKnife1 {Speed 17}

Actor ThrownKnife18: ThrownKnife1 {Speed 18}

Actor ThrownKnife19: ThrownKnife1 {Speed 19}

Actor ThrownKnife20: ThrownKnife1 {Speed 20}

Actor ThrownKnife21: ThrownKnife1 {Speed 21}

Actor ThrownKnife22: ThrownKnife1 {Speed 22}

Actor ThrownKnife23: ThrownKnife1 {Speed 23}

Actor ThrownKnife24: ThrownKnife1 {Speed 24}

Actor ThrownKnife25: ThrownKnife1 {Speed 25}

Actor ThrownKnife26: ThrownKnife1 {Speed 26}

Actor ThrownKnife27: ThrownKnife1 {Speed 27}

Actor ThrownKnife28: ThrownKnife1 {Speed 28}

Actor ThrownKnife29: ThrownKnife1 {Speed 29}

Actor ThrownKnife30: ThrownKnife1 {Speed 30}

Actor GatlingGun: Weapon replaces BFG9000
{
	Inventory.PickupMessage "Ash Inc. Semi-portable Gatling Gun"
	Inventory.PickupSound "pickup_weapon"
	Weapon.SelectionOrder 8
	Weapon.AmmoUse 1
	Weapon.AmmoGive 0
	Weapon.AmmoGive2 100
	Weapon.BobStyle InverseSmooth
	Weapon.BobRangeY 0.25
	Weapon.BobRangeX 0.5
	Weapon.BobSpeed 0.5
	Weapon.AmmoType "GatlingChamber"
	Weapon.AmmoType2 "GatlingBelt"
	Scale 0.7
	+WEAPON.NOAUTOAIM
	+AMMO_OPTIONAL
	+NOALERT
	+THRUGHOST
	+DONTGIB
	+INVENTORY.NOSCREENFLASH
	+INVENTORY.UNDROPPABLE
	States
	{
	Spawn:
		GATL P -1
		Stop
	Ready:
		GATL A 1 A_WeaponReady
		Loop
	Deselect:
		TNT1 A 0 ACS_NamedExecute("gun_gatlingspeed", 0, 1)
		GATL A 1 A_Lower
		Loop
	Select:
		TNT1 A 0 ACS_NamedExecute("gun_gatlingspeed", 0, 2)
		GATL A 0 A_SetCrosshair(10)
		GATL A 1 A_Raise
		Loop
	Fire:
		GATL A 0 A_JumpIfInventory("GatlingChamber",1,2)
		GATL A 0
		Goto Reload
		
		GATL A 4
	Hold:
		GATL A 0 A_JumpIfInventory("GatlingChamber",1,"TrueFire")
		GATL D 1 A_PlaySound("gatling_winddown",255)
		GATL AD 3
		GATL AD 4
		GATL AD 5
		Goto Reload
		
	TrueFire:
		TNT1 A 0 A_PlayWeaponSound("gatling_fire")
		GATL B 3 A_FireBullets(7, 7, 1, 22, "NewPuff")
		TNT1 A 0 A_FireCustomMissile("GunSmokeSpawner",0,0,0,-3)
		TNT1 A 0 A_AlertMonsters
		GATL C 3 BRIGHT A_GunFlash
		GATL C 1 BRIGHT A_Refire
		GATL D 1 A_PlaySound("gatling_winddown",255)
		GATL AD 3
		GATL AD 4
		GATL AD 5
		Goto Ready
	Reload:
		TNT1 A 0 A_JumpIfInventory("GatlingBelt",100,2)
		TNT1 A 0
		Goto Ready
		
		GATL EFGHIJKLMN 3
		TNT1 A 10
		TNT1 A 0 A_TakeInventory("GatlingBelt",100)
		TNT1 A 0 A_GiveInventory("GatlingChamber",100)
		GATL NMLKJIHGFE 3
		GATL A 4
		Goto Ready
	Flash:
		TNT1 A 7 Bright A_Light1
		Goto LightDone
		TNT1 A 7 Bright A_Light1
		Goto LightDone
	}
}

Actor GatlingChamber : Ammo {Inventory.MaxAmount 100}

//Ammunition
Actor Bullets: Ammo
{
	Inventory.PickupMessage "1 Bullet"
	Inventory.PickupSound "pickup_ammo"
	Inventory.Amount 1
	Inventory.MaxAmount 99
	Ammo.BackpackAmount 1
	Ammo.BackPackMaxAmount 100
	Scale 0.5
	+INVENTORY.NOSCREENFLASH
	+DONTGIB
	States
	{
	Spawn:
		BLIT A -1
		Stop
	}
}


Actor SmallBulletBox: Bullets replaces Clip
{
	Inventory.PickupMessage "6 Bullets"
	Inventory.Amount 6
	Scale 0.4
}

Actor BulletBox: Bullets replaces ClipBox
{
	Inventory.PickupMessage "12 Bullets"
	Inventory.Amount 12
}

Actor Cartridges: Ammo
{
	Inventory.PickupMessage "1 Cartridge"
	Inventory.PickupSound "pickup_ammo"
	Inventory.Amount 1
	Inventory.MaxAmount 99
	Ammo.BackpackAmount 1
	Ammo.BackPackMaxAmount 100
	Scale 0.5
	+INVENTORY.NOSCREENFLASH
	+DONTGIB
	States
	{
	Spawn:
		RFLB A -1
		Stop
	}
}

Actor SmallCartridgeBox: Cartridges
{
	Inventory.PickupMessage "8 Cartridges"
	Inventory.Amount 8
	Scale 0.4
}

Actor CartridgeBox: Cartridges
{
	Inventory.PickupMessage "16 Cartridges"
	Inventory.Amount 16
}

Actor Shells : Ammo
{
	Inventory.PickupMessage "1 Shell"
	Inventory.PickupSound "pickup_ammo"
	Inventory.Amount 1
	Inventory.MaxAmount 50
	Ammo.BackPackAmount 1
	Ammo.BackpackMaxAmount 50
	Scale 0.5
	+INVENTORY.NOSCREENFLASH
	+DONTGIB
	States
	{
	Spawn: 
		SHLB A -1
		Stop
	}
}

Actor SmallShellsBox: Shells
{
	Inventory.PickupMessage "4 Shells"
	Inventory.Amount 4
	Scale 0.4
}

Actor ShellsBox : Shells
{
	Inventory.PickupMessage "8 Shells"
	Inventory.Amount 8
}

Actor TNTSticks : Ammo replaces RocketAmmo
{
	Inventory.PickupMessage "Dynamite"
	Inventory.PickupSound "pickup_ammo"
	Inventory.Amount 1
	Inventory.MaxAmount 50
	Ammo.BackPackAmount 1
	Ammo.BackpackMaxAmount 50
	Scale 0.2
	+INVENTORY.NOSCREENFLASH
	+DONTGIB
	States
	{
	Spawn: 
		DYNA P -1
		Stop
	}
}

Actor TNTBox: TNTSticks replaces RocketBox
{
	Inventory.Amount 5
	Scale 0.5
	States
	{
	Spawn:
		TNTB A -1
		Stop
	}
}

Actor Knife : Ammo
{
	Inventory.PickupMessage "Knife"
	Inventory.PickupSound "pickup_ammo"
	Inventory.Amount 1
	Inventory.MaxAmount 50
	Ammo.BackPackAmount 1
	Ammo.BackpackMaxAmount 50
	Scale 0.2
	+INVENTORY.NOSCREENFLASH
	+DONTGIB
	States
	{
	Spawn: 
		TKNF P -1
		Stop
	}
}

Actor Knife2: Knife replaces Berserk{}

Actor KnifePack: Knife replaces Chainsaw
{
	Inventory.PickupMessage "3 Knives"
	Inventory.Amount 3
	Scale 0.2
	States
	{
	Spawn:
		KNIF P -1
		Stop
	}
}

Actor GatlingBelt : Ammo replaces CellPack
{
	Inventory.PickupMessage "Gatling Gun Clip"
	Inventory.PickupSound "pickup_ammo"
	Inventory.Amount 100
	Inventory.MaxAmount 500
	Ammo.BackPackAmount 100
	Ammo.BackpackMaxAmount 500
	Scale 0.5
	+INVENTORY.NOSCREENFLASH
	+DONTGIB
	States
	{
	Spawn: 
		GTLB A -1
		Stop
	}
}

Actor SmallAmmoSpawner replaces Shell
{
	States
	{
	Spawn:
		TNT1 A 0
		TNT1 A 0 A_Jump(255,"CartridgeDrop","ShellDrop")
		CartridgeDrop:
		TNT1 A 1 A_SpawnItemEx("SmallCartridgeBox",0,0,0,0,0,0,0,288)
		Stop
		ShellDrop:
		TNT1 A 1 A_SpawnItemEx("SmallShellsBox",0,0,0,0,0,0,0,288)
		Stop
	}
}

Actor BigAmmoSpawner replaces ShellBox
{
	States
	{
	Spawn:
		TNT1 A 0
		TNT1 A 0 A_Jump(255,"CartridgeDrop","ShellDrop")
		CartridgeDrop:
		TNT1 A 1 A_SpawnItemEx("CartridgeBox",0,0,0,0,0,0,0,288)
		Stop
		ShellDrop:
		TNT1 A 1 A_SpawnItemEx("ShellsBox",0,0,0,0,0,0,0,288)
		Stop
	}
}

Actor BigAmmoSpawner2 : BigAmmoSpawner replaces Cell{}

Actor AmmoBeltSpawner1
{
	States
	{
	Spawn:
		TNT1 A 0
		TNT1 A 0 A_Jump(255,"Belt1","Belt2","Belt3")
		Belt1:
		TNT1 A 1 A_SpawnItemEx("AmmoBelt1",0,0,0,0,0,0,0,288)
		Stop
		Belt2:
		TNT1 A 1 A_SpawnItemEx("AmmoBelt2",0,0,0,0,0,0,0,288)
		Stop
		Belt3:
		TNT1 A 1 A_SpawnItemEx("AmmoBelt3",0,0,0,0,0,0,0,288)
		Stop
	}
}

Actor AmmoBeltSpawner2
{
	States
	{
	Spawn:
		TNT1 A 0
		TNT1 A 0 A_Jump(255,"Belt1","Belt2","Belt1","Belt2","Belt1","Belt2","Belt1","Belt2","Belt3")
		Belt1:
		TNT1 A 1 A_SpawnItemEx("AmmoBelt9",0,0,0,0,0,0,0,288)
		Stop
		Belt2:
		TNT1 A 1 A_SpawnItemEx("AmmoBelt1",0,0,0,0,0,0,0,288)
		Stop
		Belt3:
		TNT1 A 1 A_SpawnItemEx("AmmoBelt4",0,0,0,0,0,0,0,288)
		Stop
	}
}

Actor AmmoBeltSpawner3
{
	States
	{
	Spawn:
		TNT1 A 0
		TNT1 A 0 A_Jump(255,"Belt1","Belt2","Belt3","Belt1","Belt2","Belt3","Belt1","Belt2","Belt3","Belt4")
		Belt1:
		TNT1 A 1 A_SpawnItemEx("AmmoBelt6",0,0,0,0,0,0,0,288)
		Stop
		Belt2:
		TNT1 A 1 A_SpawnItemEx("AmmoBelt7",0,0,0,0,0,0,0,288)
		Stop
		Belt3:
		TNT1 A 1 A_SpawnItemEx("AmmoBelt8",0,0,0,0,0,0,0,288)
		Stop
		Belt4:
		TNT1 A 1 A_SpawnItemEx("AmmoBelt5",0,0,0,0,0,0,0,288)
		Stop
	}
}

Actor AmmoBelt1 : CustomInventory
{
	Inventory.PickupMessage "3 Bullets\n1 Cartridge"
	Inventory.PickupSound "pickup_ammo"
	Scale 0.4
	+INVENTORY.NOSCREENFLASH
	+DONTGIB
	States
	{
	Spawn:
		ABLT A -1
		Stop
	Pickup:
		ABLT A 0
		ABLT A 0 A_JumpIfInventory("Bullets",99,"CartCheck")
		ABLT A 0 A_GiveInventory("Bullets",3)
		ABLT A 0 A_GiveInventory("Cartridges",1)
		Stop
	CartCheck:
		ABLT A 0
		ABLT A 0 A_JumpIfInventory("Cartridges",99,"NotPickup")
		ABLT A 0 A_GiveInventory("Bullets",3)
		ABLT A 0 A_GiveInventory("Cartridges",1)
		Stop
	NotPickup:
		ABLT A 0
		Fail
	}
}

Actor AmmoBelt2 : AmmoBelt1
{
	Inventory.PickupMessage "3 Bullets"
	States
	{
	Pickup:
		ABLT A 0
		ABLT A 0 A_JumpIfInventory("Bullets",99,"NotPickup")
		ABLT A 0 A_GiveInventory("Bullets",3)
		Stop
	}
}

Actor AmmoBelt3 : AmmoBelt1
{
	Inventory.PickupMessage "4 Bullets"
	States
	{
	Pickup:
		ABLT A 0
		ABLT A 0 A_JumpIfInventory("Bullets",99,"NotPickup")
		ABLT A 0 A_GiveInventory("Bullets",4)
		Stop
	}
}

Actor AmmoBelt4: AmmoBelt1
{
	Inventory.PickupMessage "4 Bullets\n3 Knives"
	States
	{
	Pickup:
		ABLT A 0
		ABLT A 0 A_JumpIfInventory("Bullets",99,"KnifeCheck")
		ABLT A 0 A_GiveInventory("Bullets",4)
		ABLT A 0 A_GiveInventory("Knife",3)
		Stop
	KnifeCheck:
		ABLT A 0
		ABLT A 0 A_JumpIfInventory("Knife",50,"NotPickup")
		ABLT A 0 A_GiveInventory("Bullets",4)
		ABLT A 0 A_GiveInventory("Knife",3)
		Stop
	NotPickup:
		ABLT A 0
		Fail
	}
}

Actor AmmoBelt5: AmmoBelt1
{
	Inventory.PickupMessage "4 Bullets\n4 Knives"
	States
	{
	Pickup:
		ABLT A 0
		ABLT A 0 A_JumpIfInventory("Bullets",99,"KnifeCheck")
		ABLT A 0 A_GiveInventory("Bullets",4)
		ABLT A 0 A_GiveInventory("Knife",4)
		Stop
	KnifeCheck:
		ABLT A 0
		ABLT A 0 A_JumpIfInventory("Knife",50,"NotPickup")
		ABLT A 0 A_GiveInventory("Bullets",4)
		ABLT A 0 A_GiveInventory("Knife",4)
		Stop
	NotPickup:
		ABLT A 0
		Fail
	}
}

Actor AmmoBelt6 : AmmoBelt1
{
	Inventory.PickupMessage "2 Cartridges"
	States
	{
	Pickup:
		ABLT A 0
		ABLT A 0 A_JumpIfInventory("Cartridges",99,"NotPickup")
		ABLT A 0 A_GiveInventory("Cartridges",2)
		Stop
	}
}

Actor AmmoBelt7 : AmmoBelt1
{
	Inventory.PickupMessage "3 Cartridges"
	States
	{
	Pickup:
		ABLT A 0
		ABLT A 0 A_JumpIfInventory("Cartridges",99,"NotPickup")
		ABLT A 0 A_GiveInventory("Cartridges",3)
		Stop
	}
}

Actor AmmoBelt8 : AmmoBelt1
{
	Inventory.PickupMessage "4 Cartridges"
	States
	{
	Pickup:
		ABLT A 0
		ABLT A 0 A_JumpIfInventory("Cartridges",99,"NotPickup")
		ABLT A 0 A_GiveInventory("Cartridges",4)
		Stop
	}
}

Actor AmmoBelt9 : AmmoBelt1
{
	Inventory.PickupMessage "1 Shell"
	States
	{
	Pickup:
		ABLT A 0
		ABLT A 0 A_JumpIfInventory("Shells",50,"NotPickup")
		ABLT A 0 A_GiveInventory("Shells",1)
		Stop
	}
}

Actor LargeAmmoBelt : AmmoBelt1 replaces SuperShotgun
{
	Inventory.PickupMessage "12 Bullets\n6 Cartridges\n6 Shells"
	States
	{
	Pickup:
		ABLT A 0
		ABLT A 0 A_JumpIfInventory("Bullets",99,"CartCheck")
		ABLT A 0 A_GiveInventory("Bullets",12)
		ABLT A 0 A_GiveInventory("Cartridges",6)
		ABLT A 0 A_GiveInventory("Shells",6)
		Stop
	CartCheck:
		ABLT A 0
		ABLT A 0 A_JumpIfInventory("Cartridges",99,"ShellCheck")
		ABLT A 0 A_GiveInventory("Bullets",12)
		ABLT A 0 A_GiveInventory("Cartridges",6)
		ABLT A 0 A_GiveInventory("Shells",6)
		Stop
	ShellCheck:
		ABLT A 0
		ABLT A 0 A_JumpIfInventory("Shells",50,"NotPickup")
		ABLT A 0 A_GiveInventory("Bullets",12)
		ABLT A 0 A_GiveInventory("Cartridges",6)
		ABLT A 0 A_GiveInventory("Shells",6)
		Stop
	NotPickup:
		ABLT A 0
		Fail
	
	}
}

Actor Satchel : CustomInventory replaces Soulsphere
{
	Inventory.PickupMessage "Satchel full of goods!"
	Inventory.PickupSound "pickup_ammo"
	Scale 0.5
	+INVENTORY.NOSCREENFLASH
	+DONTGIB
	States
	{
	Spawn:
		SATC A -1
		Stop
	Pickup:
		SATC A 0
		SATC A 0 A_JumpIfInventory("Bullets",99,"CartCheck")
		SATC A 0 A_GiveInventory("Bullets",4)
		SATC A 0 A_GiveInventory("Cartridges",4)
		SATC A 0 A_GiveInventory("Shells",4)
		SATC A 0 A_GiveInventory("DoctorBag",2)
		Stop
	CartCheck:
		SATC A 0
		SATC A 0 A_JumpIfInventory("Cartridges",99,"ShellCheck")
		SATC A 0 A_GiveInventory("Bullets",4)
		SATC A 0 A_GiveInventory("Cartridges",4)
		SATC A 0 A_GiveInventory("Shells",4)
		SATC A 0 A_GiveInventory("DoctorBag",2)
		Stop
	ShellCheck:
		SATC A 0
		SATC A 0 A_JumpIfInventory("Shells",50,"DocCheck")
		SATC A 0 A_GiveInventory("Bullets",4)
		SATC A 0 A_GiveInventory("Cartridges",4)
		SATC A 0 A_GiveInventory("Shells",4)
		SATC A 0 A_GiveInventory("DoctorBag",2)
		Stop
	DocCheck:
		SATC A 0
		SATC A 0 A_JumpIfInventory("DoctorBag",15,"NotPickup")
		SATC A 0 A_GiveInventory("Bullets",4)
		SATC A 0 A_GiveInventory("Cartridges",4)
		SATC A 0 A_GiveInventory("Shells",4)
		SATC A 0 A_GiveInventory("DoctorBag",2)
		Stop
	NotPickup:
		SATC A 0
		Fail
	}
}

Actor OlBackpack replaces Backpack
{
	States
	{
	Spawn:
		TNT1 A 0
		TNT1 A 1 ACS_NamedExecuteAlways("gun_backpack",0)
		Stop
	}
}

Actor PowerupSpawner
{
	States
	{
	Spawn:
		TNT1 A 0
		TNT1 A 0 A_Jump(255,"Power1","Power2")
		Power1:
		TNT1 A 1 A_SpawnItemEx("Satchel",0,0,0,0,0,0,0,288)
		Stop
		Power2:
		TNT1 A 1 A_SpawnItemEx("LargeAmmoBelt",0,0,0,0,0,0,0,288)
		Stop
	}
}

//Misc.
//-----------
Actor GunsmokeSpawner
{
	Radius 1
	Height 1
	Speed 25
	PROJECTILE
	States
	{
	Spawn:
		TNT1 A 0
		TNT1 A 1 A_Die
		Goto Death
	Death:
		TNT1 A 0 A_CustomMissile("GunSmoke",0,0,0)
		Stop
	}
}

Actor Gunsmoke
{
	+FORCEXYBILLBOARD
	+FLOORCLIP
	+NOBLOCKMAP
	+NOGRAVITY
	Renderstyle Add
	Alpha 0.5
	Scale 0.4
	Radius 1
	Height 1
	States
	{
	Spawn:
		SMOK ABCDEFGHIJKLMNOPQR 2
		Stop
	}
}

Actor NewPuff: BulletPuff
{
	RenderStyle Normal
	VSpeed 0
	+NOEXTREMEDEATH
	+FORCEXYBILLBOARD
	-RANDOMIZE
	-ALLOWPARTICLES
	States
	{
	Spawn:
		NPUF ABCDE 4
		Stop
	Melee:
		TNT1 A 0
		Stop
	}
}

Actor MeleePuff: NewPuff
{
	AttackSound "fists_strike"
	+BLOODLESSIMPACT
	States
	{
	Spawn:
		TNT1 A 0
		Stop
	Melee:
		TNT1 A 0
		Stop
	}
}

Actor KnifePuff: NewPuff
{
	States
	{
	Spawn:
		TNT1 A 0
		Stop
	Melee:
		TNT1 A 0
		Stop
	}
}