ACTOR BasicAmmoPickup : Ammo
{
	scale 1.0
	radius 20
	height 16
	+FORCEXYBILLBOARD
	+MOVEWITHSECTOR
	-COUNTITEM
	-INVENTORY.ALWAYSPICKUP
	Inventory.Amount 0
	Inventory.MaxAmount 99999
	+Quiet
}

// Backpack ---------------------------------------------------------------

ACTOR AmmoSupply : BackpackItem Replaces Backpack
{
	Height 26
	Inventory.PickupMessage "$GOTBACKPACK"
	Inventory.PickupSound "BACKPACK"
	+INVENTORY.NOSCREENFLASH
	-INVENTORY.ALWAYSPICKUP
	States
	{
	Spawn:
		TNT1 A 0
		BPAK A -1
		Stop
	}
}

// Slot2 ---------------------------------------------------------------

ACTOR Clip1 : Ammo
{
	Inventory.PickupMessage "Picked up a Pistol Magazine."
	Inventory.PickupSound "CLIPICK"
	Inventory.Amount 15
	Inventory.MaxAmount 200
	Ammo.BackpackAmount 15
	Ammo.BackpackMaxAmount 400
	Inventory.Icon "CLIPC0"
	Scale 0.9
	VisibleToPlayerClass BDoomer, Doomer2, Doomer3, ArcadeDoomer, ArcadeDoomer2, ArcadeDoomer3, TacticalDoomer
	Inventory.ForbiddenTo Purist
	+INVENTORY.NOSCREENFLASH
	States
	{
	Spawn:
		CLIP C -1
		Stop
	}
}

ACTOR Clip1Spawner: BasicAmmoPickup 2037
{
	//$Category BD Ammo Spawners
	//$Icon "ammo"
	//$Colour rgb(180, 150, 50)
	//$Sprite CLIPC0
	//$NotAngled
    States
    {
	Spawn:
		TNT1 A 0
		TNT1 A 0 A_SpawnItemEx("Clip1",0,0,0,0,0,0,0,0,0)
		TNT1 A 0 A_SpawnItemEx("ClipPurist",0,0,0,0,0,0,0,0,0)
		TNT1 A 1
		TNT1 A -1
		Stop
    }
}

ACTOR Clip1Drop: BasicAmmoPickup
{
    States
    {
	Spawn:
		TNT1 A 0
		TNT1 A 0 A_SpawnItemEx("Clip1",0,0,0,0,0,0,0,0,0)
		TNT1 A 0 A_SpawnItemEx("ClipPurist",0,0,0,0,0,0,0,0,0)
		TNT1 A 1
		TNT1 A -1
		Stop
    }
}

ACTOR Mauser9mm : Ammo 2057
{
	Inventory.PickupMessage "Picked up a Mauser 9mm Magazine for the MP40."
	Inventory.PickupSound "CLIPICK"
	Inventory.Amount 32
	Inventory.MaxAmount 200
	Ammo.BackpackAmount 32
	Ammo.BackpackMaxAmount 400
	Inventory.Icon "CLIPB0"
	Scale 0.6
	+INVENTORY.NOSCREENFLASH
	//$Category BD Ammo Spawners
	//$Icon "ammo"
	//$Colour rgb(180, 150, 50)
	//$Sprite CLIPB0
	//$NotAngled
	States
	{
	Spawn:
		CLIP B -1
		Stop
	}
}

Actor ClipReplacer : BasicAmmoPickup Replaces Clip
{
    States
    {
	Spawn:
		TNT1 A 0
		MARN A 0 ACS_NamedExecuteAlways("BDDisableNewGuns", 0, 0, 0, 0)//Check if advanced decorations are disabled.
		TNT1 A 2
		TNT1 A 0 A_Jump(4, "Spawn3") // Mauser 9mm
		TNT1 A 0 A_Jump(16, "Spawn2") // Pistol Ammo

	Vanilla:
	Spawn1:
		TNT1 A 0
		TNT1 A 0 A_SpawnItemEx ("Clip2Spawner",0,0,0,0,0,0,0,0,0)
		TNT1 A 1
		TNT1 A -1
		Stop

	Spawn2:
		TNT1 A 0
		TNT1 A 0 A_SpawnItemEx ("Clip1Spawner",0,0,0,0,0,0,0,0,0)
		TNT1 A 1
		TNT1 A -1
		Stop

	Spawn3:
		TNT1 A 0
		TNT1 A 0 A_SpawnItemEx ("Mauser9mm",0,0,0,0,0,0,0,0,0)
		TNT1 A 1
		TNT1 A -1
		Stop
    }
}

ACTOR PistolAmmoBox: Clip1
{
	Scale 0.9
	Inventory.PickupMessage "Picked up a box of pistol ammunition!"
	Inventory.PickupSound "CBOXPICK"
	+INVENTORY.NOSCREENFLASH
	Inventory.Amount 50
	States
	{
	Spawn:
	4M0K A -1
	Stop
	}
}

ACTOR PistolAmmoBoxSpawner: BasicAmmoPickup 2098
{
	//$Category BD Ammo Spawners
	//$Icon "ammo"
	//$Colour rgb(180, 150, 50)
	//$Sprite 4M0KA0
	//$NotAngled
    States
    {
	Spawn:
		TNT1 A 0
		TNT1 A 0 A_SpawnItemEx("PistolAmmoBox",0,0,0,0,0,0,0,0,0)
		TNT1 A 0 A_SpawnItemEx("ClipBoxPurist",0,0,0,0,0,0,0,0,0)
		TNT1 A 1
		TNT1 A -1
		Stop
    }
}

// Slot3 ---------------------------------------------------------------

ACTOR AmmoShell : Ammo
{
	Inventory.PickupMessage "$GOTSHELLS"
	Inventory.Pickupsound "SHELPK1"
	Inventory.Amount 4
	Inventory.MaxAmount 50
	Ammo.BackpackAmount 4
	Ammo.BackpackMaxAmount 100
	Inventory.Icon "SHELA0"
	+INVENTORY.NOSCREENFLASH
	Scale 0.9
	VisibleToPlayerClass BDoomer, Doomer2, Doomer3, ArcadeDoomer, ArcadeDoomer2, ArcadeDoomer3, TacticalDoomer
	Inventory.ForbiddenTo Purist
	//$Category BD Ammo Spawners
	//$Icon "ammo"
	//$Colour rgb(180, 150, 50)
	//$Sprite SHELA0
	//$NotAngled
	States
	{
	Spawn:
		SHEL A -1
		Stop
	}
}

ACTOR ShellPurist : Ammo
{
	Inventory.PickupMessage "$GOTSHELLS"
	Inventory.Pickupsound "SHELPK1"
	Inventory.Amount 4
	Inventory.MaxAmount 50
	Ammo.BackpackAmount 4
	Ammo.BackpackMaxAmount 100
	Inventory.Icon "SHELA0"
	VisibleToPlayerClass Purist
	Inventory.ForbiddenTo BDoomer, Doomer2, Doomer3, ArcadeDoomer, ArcadeDoomer2, ArcadeDoomer3, TacticalDoomer
	+INVENTORY.NOSCREENFLASH
	Scale 0.9
	States
	{
	Spawn:
		SHEL A -1
		Stop
	}
}

ACTOR ShellSpawner: BasicAmmoPickup 2038
{
	//$Category BD Ammo Spawners
	//$Icon "ammo"
	//$Colour rgb(180, 150, 50)
	//$Sprite SHELA0
	//$NotAngled
    States
    {
	Spawn:
		TNT1 A 0
		TNT1 A 0 A_SpawnItemEx("AmmoShell",0,0,0,0,0,0,0,0,0)
		TNT1 A 0 A_SpawnItemEx("ShellPurist",0,0,0,0,0,0,0,0,0)
		TNT1 A 1
		TNT1 A -1
		Stop
    }
}

ACTOR AmmoSlug : Ammo
{
	Inventory.PickupMessage "$GOTSLUGS"
	Inventory.Pickupsound "SHELPK1"
	Inventory.Amount 4
	Inventory.MaxAmount 50
	Ammo.BackpackAmount 4
	Ammo.BackpackMaxAmount 100
	Inventory.Icon "SHELB0"
	+INVENTORY.NOSCREENFLASH
	Scale 0.9
	VisibleToPlayerClass BDoomer, Doomer2, Doomer3, ArcadeDoomer, ArcadeDoomer2, ArcadeDoomer3, TacticalDoomer
	Inventory.ForbiddenTo Purist
	States
	{
	Spawn:
		SHEL B -1
		Stop
	}
}

ACTOR AmmoSlugSpawner: BasicAmmoPickup 2058
{
	//$Category BD Ammo Spawners
	//$Icon "ammo"
	//$Colour rgb(180, 150, 50)
	//$Sprite SHELB0
	//$NotAngled
    States
    {
	Spawn:
		TNT1 A 0
		TNT1 A 0 A_SpawnItemEx("AmmoSlug",0,0,0,0,0,0,0,0,0)
		TNT1 A 0 A_SpawnItemEx("ShellPurist",0,0,0,0,0,0,0,0,0)
		TNT1 A 1
		TNT1 A -1
		Stop
    }
}

ACTOR AmmoMagnum : Ammo
{
	Inventory.PickupMessage "Picked up some magnum rounds."
	Inventory.PickupSound "CBOXPICK"
	Inventory.Amount 6
	Inventory.MaxAmount 30
	Ammo.BackpackAmount 6
	Ammo.BackpackMaxAmount 60
	Inventory.Icon "MAGAA0"
	+INVENTORY.NOSCREENFLASH
	Scale 0.6
	VisibleToPlayerClass BDoomer, Doomer2, Doomer3, ArcadeDoomer, ArcadeDoomer2, ArcadeDoomer3, TacticalDoomer
	Inventory.ForbiddenTo Purist
	States
	{
	Spawn:
		MAGA A -1
		Stop
	}
}

ACTOR AmmoMagnumSpawner: BasicAmmoPickup 2068
{
	//$Category BD Ammo Spawners
	//$Icon "ammo"
	//$Colour rgb(180, 150, 50)
	//$Sprite MAGAA0
	//$NotAngled
    States
    {
	Spawn:
		TNT1 A 0
		TNT1 A 0 A_SpawnItemEx("AmmoMagnum",0,0,0,0,0,0,0,0,0)
		TNT1 A 0 A_SpawnItemEx("ShellPurist",0,0,0,0,0,0,0,0,0)
		TNT1 A 1
		TNT1 A -1
		Stop
    }
}

ACTOR AmmoShellReplacer : BasicAmmoPickup Replaces Shell
{
	States
	{
	Spawn:
		TNT1 A 0
		MARN A 0 ACS_NamedExecuteAlways("BDDisableNewGuns", 0, 0, 0, 0)//Check if advanced decorations are disabled.
		TNT1 A 2
		TNT1 A 0 A_Jump(4, "Spawn3") // Magnum Ammo
		TNT1 A 0 A_Jump(32, "Spawn2") // Slug Ammo
		TNT1 A 2

	Vanilla:
	Spawn1:
		TNT1 A 0
		TNT1 A 0 A_SpawnItemEx ("ShellSpawner",0,0,0,0,0,0,0,0,0)
		TNT1 A 1
		TNT1 A -1
		Stop

	Spawn2:
		TNT1 A 0
		TNT1 A 0 A_SpawnItemEx ("AmmoSlugSpawner",0,0,0,0,0,0,0,0,0)
		TNT1 A 1
		TNT1 A -1
		Stop

	Spawn3:
		TNT1 A 0
		TNT1 A 0 A_SpawnItemEx ("AmmoMagnumSpawner",0,0,0,0,0,0,0,0,0)
		TNT1 A 1
		TNT1 A -1
		Stop
	}
}

ACTOR AmmoShellBox : AmmoShell
{
	Inventory.PickupMessage "$GOTSHELLBOX"
	Inventory.Pickupsound "SHELPK2"
	Inventory.Amount 20
	Scale 0.9
	//$Category BD Ammo Spawners
	//$Icon "ammo"
	//$Colour rgb(180, 150, 50)
	//$Sprite SBOXA0
	//$NotAngled
	States
	{
	Spawn:
		SBOX A -1
		Stop
	}
}

ACTOR ShellBoxPurist : ShellPurist
{
	Inventory.PickupMessage "$GOTSHELLBOX"
	Inventory.Amount 20
	Scale 0.9
	States
	{
	Spawn:
		SBOX A -1
		Stop
	}
}

ACTOR ShellBoxSpawner: BasicAmmoPickup 2059
{
	//$Category BD Ammo Spawners
	//$Icon "ammo"
	//$Colour rgb(180, 150, 50)
	//$Sprite SBOXA0
	//$NotAngled
    States
    {
	Spawn:
		TNT1 A 0
		TNT1 A 0 A_SpawnItemEx("AmmoShellBox",0,0,0,0,0,0,0,0,0)
		TNT1 A 0 A_SpawnItemEx("ShellBoxPurist",0,0,0,0,0,0,0,0,0)
		TNT1 A 1
		TNT1 A -1
		Stop
    }
}

ACTOR AmmoSlugBox : AmmoSlug
{
	Inventory.PickupMessage "$GOTSLUGBOX"
	Inventory.Pickupsound "SHELPK2"
	Inventory.Amount 20
	Scale 0.9
	States
	{
	Spawn:
		SLSU A -1
		Stop
	}
}

ACTOR SlugBoxSpawner: BasicAmmoPickup 2069
{
	//$Category BD Ammo Spawners
	//$Icon "ammo"
	//$Colour rgb(180, 150, 50)
	//$Sprite SLSUA0
	//$NotAngled
    States
    {
	Spawn:
		TNT1 A 0
		TNT1 A 0 A_SpawnItemEx("AmmoSlugBox",0,0,0,0,0,0,0,0,0)
		TNT1 A 0 A_SpawnItemEx("ShellBoxPurist",0,0,0,0,0,0,0,0,0)
		TNT1 A 1
		TNT1 A -1
		Stop
    }
}

ACTOR AmmoMagnumBox : AmmoMagnum
{
	Inventory.PickupMessage "Picked up a box of magnum rounds."
	Inventory.Pickupsound "CBOXPICK"
	Inventory.Amount 20
	Scale 0.9
	States
	{
	Spawn:
		MBOX A -1
		Stop
	}
}

ACTOR MagnumBoxSpawner: BasicAmmoPickup 2089
{
	//$Category BD Ammo Spawners
	//$Icon "ammo"
	//$Colour rgb(180, 150, 50)
	//$Sprite MBOXA0
	//$NotAngled
    States
    {
	Spawn:
		TNT1 A 0
		TNT1 A 0 A_SpawnItemEx("AmmoMagnumBox",0,0,0,0,0,0,0,0,0)
		TNT1 A 0 A_SpawnItemEx("ShellBoxPurist",0,0,0,0,0,0,0,0,0)
		TNT1 A 1
		TNT1 A -1
		Stop
    }
}

ACTOR AmmoShellBoxReplacer : BasicAmmoPickup Replaces ShellBox
{
	States
	{
	Spawn:
		TNT1 A 0
		MARN A 0 ACS_NamedExecuteAlways("BDDisableNewGuns", 0, 0, 0, 0)//Check if advanced decorations are disabled.
		TNT1 A 2
		TNT1 A 0 A_Jump(4, "Spawn3") // Magnum Ammo Box
		TNT1 A 0 A_Jump(32, "Spawn2") // Slug Ammo Box
		TNT1 A 2

	Vanilla:
	Spawn1:
		TNT1 A 0
		TNT1 A 0 A_SpawnItemEx ("ShellBoxSpawner",0,0,0,0,0,0,0,0,0)
		TNT1 A 1
		TNT1 A -1
		Stop

	Spawn2:
		TNT1 A 0
		TNT1 A 0 A_SpawnItemEx ("SlugBoxSpawner",0,0,0,0,0,0,0,0,0)
		TNT1 A 1
		TNT1 A -1
		Stop

	Spawn3:
		TNT1 A 0
		TNT1 A 0 A_SpawnItemEx ("MagnumBoxSpawner",0,0,0,0,0,0,0,0,0)
		TNT1 A 1
		TNT1 A -1
		Stop
	}
}

// Slot4 ---------------------------------------------------------------

ACTOR Clip2 : Ammo
{
	Inventory.PickupMessage "Picked up a Rifle Magazine."
	Inventory.PickupSound "CLIPICK2"
	Inventory.Amount 30
	Inventory.MaxAmount 300
	Ammo.BackpackAmount 30
	Ammo.BackpackMaxAmount 600
	Inventory.Icon "CLIPA0"
	+INVENTORY.NOSCREENFLASH
	VisibleToPlayerClass BDoomer, Doomer2, Doomer3, ArcadeDoomer, ArcadeDoomer2, ArcadeDoomer3, TacticalDoomer
	Inventory.ForbiddenTo Purist
	Scale 0.9
	States
	{
	Spawn:
		CLIP A -1
		Stop
	}
}

ACTOR ClipPurist : Ammo
{
	Inventory.PickupMessage "$GOTCLIP"
	Inventory.PickupSound "CLIPICK2"
	Inventory.Amount 10
	Inventory.MaxAmount 200
	Ammo.BackpackAmount 10
	Ammo.BackpackMaxAmount 400
	Inventory.Icon "CLIPA0"
	VisibleToPlayerClass Purist
	Inventory.ForbiddenTo BDoomer, Doomer2, Doomer3, ArcadeDoomer, ArcadeDoomer2, ArcadeDoomer3, TacticalDoomer
	+INVENTORY.NOSCREENFLASH
	Scale 0.9
	States
	{
	Spawn:
		CLIP A -1
		Stop
	}
}

ACTOR Clip2Spawner: BasicAmmoPickup 2027
{
	//$Category BD Ammo Spawners
	//$Icon "ammo"
	//$Colour rgb(180, 150, 50)
	//$Sprite CLIPA0
	//$NotAngled
    States
    {
	Spawn:
		TNT1 A 0
		TNT1 A 0 A_SpawnItemEx("Clip2",0,0,0,0,0,0,0,0,0)
		TNT1 A 0 A_SpawnItemEx("ClipPurist",0,0,0,0,0,0,0,0,0)
		TNT1 A 1
		TNT1 A -1
		Stop
    }
}

ACTOR ClipBox2 : Clip2
{
	Inventory.PickupMessage "Picked up a box of rifle ammunition."
	Inventory.PickupSound "CBOXPICK"
	Inventory.Amount 50
	Scale 0.9
	//$Category BD Ammo Spawners
	//$Icon "ammo"
	//$Colour rgb(180, 150, 50)
	//$Sprite AMMOA0
	//$NotAngled
	States
	{
	Spawn:
		AMMO A -1
		Stop
	}
}

ACTOR ClipBoxPurist : ClipPurist
{
	Inventory.PickupMessage "$GOTCLIPBOX"
	Inventory.PickupSound "CBOXPICK"
	Inventory.Amount 50
	Scale 0.9
	States
	{
	Spawn:
		AMMO A -1
		Stop
	}
}

ACTOR ClipBoxSpawner: BasicAmmoPickup 2088
{
	//$Category BD Ammo Spawners
	//$Icon "ammo"
	//$Colour rgb(180, 150, 50)
	//$Sprite AMMOA0
	//$NotAngled
    States
    {
	Spawn:
		TNT1 A 0
		TNT1 A 0 A_SpawnItemEx("ClipBox2",0,0,0,0,0,0,0,0,0)
		TNT1 A 0 A_SpawnItemEx("ClipBoxPurist",0,0,0,0,0,0,0,0,0)
		TNT1 A 1
		TNT1 A -1
		Stop
    }
}

ACTOR BuzzSawAmmo : Ammo 2108
{
	Inventory.PickupMessage "Picked up a belt of MG42 ammo."
	Inventory.PickupSound "CBOXPICK"
	+INVENTORY.NOSCREENFLASH
	Inventory.Amount 50
	Inventory.MaxAmount 300
	Ammo.BackpackAmount 50
	Ammo.BackpackMaxAmount 600
	Inventory.Icon "HBUSE0"
	Scale 0.6
	//$Category BD Ammo Spawners
	//$Icon "ammo"
	//$Colour rgb(180, 150, 50)
	//$Sprite HBUSE0
	//$NotAngled
	States
	{
	Spawn:
		HBUS E -1
		Stop
	}
}

Actor ClipBoxReplacer : BasicAmmoPickup Replaces ClipBox
{
    States
    {
	Spawn:
		TNT1 A 0
		MARN A 0 ACS_NamedExecuteAlways("BDDisableNewGuns", 0, 0, 0, 0)//Check if advanced decorations are disabled.
		TNT1 A 2
		TNT1 A 0 A_Jump(4, "Spawn3") // Buzzsaw ammo
		TNT1 A 0 A_Jump(16, "Spawn2") // Pistol ammo box
		TNT1 A 2

	Vanilla:
	Spawn1:
		TNT1 A 0
		TNT1 A 0 A_SpawnItemEx ("ClipBoxSpawner",0,0,0,0,0,0,0,0,0)
		TNT1 A 1
		TNT1 A -1
		Stop

	Spawn2:
		TNT1 A 0
		TNT1 A 0 A_SpawnItemEx ("PistolAmmoBoxSpawner",0,0,0,0,0,0,0,0,0)
		TNT1 A 1
		TNT1 A -1
		Stop

	Spawn3:
		TNT1 A 0
		TNT1 A 0 A_SpawnItemEx ("BuzzSawAmmo",0,0,0,0,0,0,0,0,0)
		TNT1 A 1
		TNT1 A -1
		Stop
    }
}

// Slot5 ---------------------------------------------------------------

ACTOR AmmoRocket : Ammo
{
	Game Doom
	SpawnID 140
	Inventory.PickupMessage "$GOTROCKET"
	Inventory.Amount 1
	Inventory.MaxAmount 50
	Ammo.BackpackAmount 1
	Ammo.BackpackMaxAmount 100
	Inventory.Icon "ROCKA0"
	Inventory.Pickupsound "RCKCLIP"
	+INVENTORY.NOSCREENFLASH
	Scale 0.9
	VisibleToPlayerClass BDoomer, Doomer2, Doomer3, ArcadeDoomer, ArcadeDoomer2, ArcadeDoomer3, TacticalDoomer
	Inventory.ForbiddenTo Purist
	+NOTAUTOAIMED
	+SHOOTABLE
	+NOBLOOD
	+NORADIUSDMG
	+FORCERADIUSDMG
	damagefactor "Shrapnel", 0.0  damagefactor "Trample", 0.0
	damagefactor "Head", 0.0	damagefactor "FriendBullet", 0.0    damagefactor "Taunt", 0.0    damagefactor "KillMe", 0.0
	damagefactor "CancelTeleportFog", 0.0	damagefactor "BHFTOnBarrel", 0.0	damagefactor "GibRemoving", 0.0
	damagefactor "SpawnMarine", 0.0	damagefactor "TeleportRemover", 0.0	damagefactor "MinorHead", 0.0
	damagefactor "Decaptate", 0.0	damagefactor "MonsterKnocked", 0.0
	DamageFactor "CauseSplash", 0.0 DamageFactor "CauseObjectsToSplashSlime", 0.0 DamageFactor "CauseObjectsToSplashNukage", 0.0
	DamageFactor "CauseObjectsToSplashBlood", 0.0 DamageFactor "CauseObjectsToSplashLava", 0.0
	damagefactor "HelperMarineFatallity", 0.0	damagefactor "Leg", 0.0
	DamageFactor "KillMeBot", 0.0
	Health 20
	States
	{
	Spawn:
		ROCK A 1
		TNT1 A 0 ACS_NamedExecuteAlways("BDShootableAmmo")//Checks if shootable ammo is enabled
		ROCK A 4
		TNT1 A 0 A_JumpIfInventory("Clip1", 1, "NoShootable")
		ROCK A -1
		Stop

	NoShootable:
		ROCK A 1
		TNT1 A 0 A_ChangeFlag("SHOOTABLE", 0)
		ROCK A -1
		Stop
	Death:
		TNT1 A 0
		TNT1 A 0 A_SpawnItemEx ("ExplosionSplashSpawner", 0, 0, -20)
        TNT1 A 0 A_SpawnItemEx ("DetectFloorCrater",0,0,0,0,0,0,0,SXF_NOCHECKPOSITION,0)
	    TNT1 A 0 A_SpawnItemEx ("DetectCeilCrater",0,0,0,0,0,0,0,SXF_NOCHECKPOSITION,0)
	    TNT1 A 0 A_SpawnItemEx ("UnderwaterExplosion",0,0,0,0,0,0,0,SXF_NOCHECKPOSITION,0)
        TNT1 A 0 A_SpawnItemEx ("ExplosionFlareSpawner",0,0,0,0,0,0,0,SXF_NOCHECKPOSITION,0)
        TNT1 AAAAAAAAA 0 A_CustomMissile ("ExplosionParticleHeavy", 0, 0, random (0, 360), 2, random (0, 180))
        TNT1 AAAAAAAAAAAAAAAAAA 0 A_CustomMissile ("ExplosionParticleHeavy", 0, 0, random (0, 360), 2, random (0, 360))
		TNT1 AAAAAAAAA 0 A_CustomMissile ("ExplosionParticleVeryFast", 0, 0, random (0, 360), 2, random (0, 360))
        TNT1 AAAA 0 A_CustomMissile ("MediumExplosionFlames", 0, 0, random (0, 360), 2, random (0, 360))
        EXPL AAAA 0 A_CustomMissile ("ExplosionSmokeFast22", 0, 0, random (0, 360), 2, random (0, 360))
		EXPL A 0 A_CustomMissile ("BigNeoSmoke", 0, 0, random (0, 360), 2, random (0, 360))
		TNT1 A 0 A_SpawnItemEx ("RocketExplosion",0,0,13,0,0,0,0,SXF_NOCHECKPOSITION,0)
		//TNT1 A 0 A_SpawnItemEx ("RocketPenetrator",cos(-pitch)*42,0,0+(sin(pitch)*42),cos(-pitch)*40,0,sin(pitch)*40,0,SXF_TRANSFERPITCH)
		//TNT1 AA 0 A_SpawnItem("SuperExpensiveParticleSpawner")

		TNT1 A 2
		TNT1 A 0 A_SpawnItemEx ("LiquidExplosionEffectSpawner",0,0,0,0,0,0,0,SXF_NOCHECKPOSITION,0)
		TNT1 A 0 A_PlaySound("FAREXPL", 3)
		TNT1 A 4
		TNT1 A 0 A_Explode(100, 100)
		TNT1 A 10
		TNT1 A 0 A_PlaySound("distantexp", 5)
		TNT1 AAAAA 4 A_CustomMissile ("HeavyExplosionSmoke", 2, 0, random (0, 360), 2, random (0, 360))
		Stop
	}
}

ACTOR RocketPurist : Ammo
{
	Inventory.PickupMessage "$GOTROCKET"
	Inventory.Pickupsound "RCKCLIP"
	Inventory.Amount 1
	Inventory.MaxAmount 50
	Ammo.BackpackAmount 1
	Ammo.BackpackMaxAmount 100
	Inventory.Icon "ROCKA0"
	VisibleToPlayerClass Purist
	Inventory.ForbiddenTo BDoomer, Doomer2, Doomer3, ArcadeDoomer, ArcadeDoomer2, ArcadeDoomer3, TacticalDoomer
	+INVENTORY.NOSCREENFLASH
	Scale 0.9
	States
	{
	Spawn:
		ROCK A -1
		Stop
	}
}

ACTOR RocketSpawner: BasicAmmoPickup 2020
{
	//$Category BD Ammo Spawners
	//$Icon "ammo"
	//$Colour rgb(180, 150, 50)
	//$Sprite ROCKA0
	//$NotAngled
    States
    {
	Spawn:
		TNT1 A 0
		TNT1 A 0 A_SpawnItemEx("AmmoRocket",0,0,0,0,0,0,0,0,0)
		TNT1 A 0 A_SpawnItemEx("RocketPurist",0,0,0,0,0,0,0,0,0)
		TNT1 A 1
		TNT1 A -1
		Stop
    }
}

ACTOR AmmoRocketReplacer : BasicAmmoPickup Replaces RocketAmmo
{
	States
	{
	Spawn:
		TNT1 A 0
		MARN A 0 ACS_NamedExecuteAlways("BDDisableNewGuns", 0, 0, 0, 0)//Check if advanced decorations are disabled.
		TNT1 A 2
		TNT1 A 0 A_Jump(4, "Spawn2") // Grenade Ammo
		TNT1 A 2

	Vanilla:
	Spawn1:
		TNT1 A 0
		TNT1 A 0 A_SpawnItemEx ("RocketSpawner",0,0,0,0,0,0,0,0,0)
		TNT1 A 1
		TNT1 A -1
		Stop

	Spawn2:
		TNT1 A 0
		TNT1 A 0 A_SpawnItemEx ("GrenadeAmmo",0,0,0,0,0,0,0,0,0)
		TNT1 A 1
		TNT1 A -1
		Stop
	}
}

ACTOR AmmoRocketBox : AmmoRocket
{
	Game Doom
	SpawnID 141
	Inventory.PickupMessage "$GOTROCKBOX"
	Inventory.Amount 3
	Scale 0.9
	Inventory.Pickupsound "RCKCLIP2"
	+INVENTORY.NOSCREENFLASH
	States
	{
	Spawn:
		TNT1 A 0
		TNT1 A 0 ACS_NamedExecuteAlways("BDShootableAmmo")//Checks if shootable ammo is enabled
		BROK A 4
		TNT1 A 0 A_JumpIfInventory("Clip1", 1, "NoShootable")
		BROK A -1
		Stop

	NoShootable:
		BROK A 1
		TNT1 A 0 A_ChangeFlag("SHOOTABLE", 0)
		BROK A -1
		Stop

	Death:
		TNT1 A 0
		TNT1 A 0 A_SpawnItemEx ("ExplosionSplashSpawner", 0, 0, -20)
        TNT1 A 0 A_SpawnItemEx ("DetectFloorCrater",0,0,0,0,0,0,0,SXF_NOCHECKPOSITION,0)
	    TNT1 A 0 A_SpawnItemEx ("DetectCeilCrater",0,0,0,0,0,0,0,SXF_NOCHECKPOSITION,0)
	    TNT1 A 0 A_SpawnItemEx ("UnderwaterExplosion",0,0,0,0,0,0,0,SXF_NOCHECKPOSITION,0)
        TNT1 A 0 A_SpawnItemEx ("ExplosionFlareSpawner",0,0,0,0,0,0,0,SXF_NOCHECKPOSITION,0)
        TNT1 AAAAAAAAA 0 A_CustomMissile ("ExplosionParticleHeavy", 0, 0, random (0, 360), 2, random (0, 180))
        TNT1 AAAAAAAAAAAAAAAAAA 0 A_CustomMissile ("ExplosionParticleHeavy", 0, 0, random (0, 360), 2, random (0, 360))
		TNT1 AAAAAAAAA 0 A_CustomMissile ("ExplosionParticleVeryFast", 0, 0, random (0, 360), 2, random (0, 360))
        TNT1 AAAA 0 A_CustomMissile ("MediumExplosionFlames", 0, 0, random (0, 360), 2, random (0, 360))
        EXPL AAAA 0 A_CustomMissile ("ExplosionSmokeFast22", 0, 0, random (0, 360), 2, random (0, 360))
		EXPL A 0 A_CustomMissile ("BigNeoSmoke", 0, 0, random (0, 360), 2, random (0, 360))
		TNT1 A 0 A_SpawnItemEx ("RocketExplosion",0,0,13,0,0,0,0,SXF_NOCHECKPOSITION,0)
		//TNT1 A 0 A_SpawnItemEx ("RocketPenetrator",cos(-pitch)*42,0,0+(sin(pitch)*42),cos(-pitch)*40,0,sin(pitch)*40,0,SXF_TRANSFERPITCH)
		//TNT1 AA 0 A_SpawnItem("SuperExpensiveParticleSpawner")
		EXPL AAA 0 A_CustomMissile ("BarrelKaboom", 0, 0, random (0, 360), 2, random (0, 360))
		TNT1 A 0 A_Explode(150, 300)
		TNT1 A 2
		TNT1 A 0 A_SpawnItemEx ("LiquidExplosionEffectSpawner",0,0,0,0,0,0,0,SXF_NOCHECKPOSITION,0)
		TNT1 A 0 A_PlaySound("FAREXPL", 3)
		TNT1 A 15
		TNT1 A 0 A_PlaySound("distantexp", 5)
		TNT1 AAAAA 4 A_CustomMissile ("HeavyExplosionSmoke", 2, 0, random (0, 360), 2, random (0, 360))
		Stop
	}
}

ACTOR RocketBoxPurist : RocketPurist
{
	Inventory.PickupMessage "$GOTROCKBOX"
	Inventory.Pickupsound "RCKCLIP2"
	Inventory.Amount 5
	+INVENTORY.NOSCREENFLASH
	Scale 0.9
	States
	{
	Spawn:
		BROK A -1
		Stop
	}
}

ACTOR RocketBoxReplacer : BasicAmmoPickup Replaces RocketBox
{
    States
    {
	Spawn:
		TNT1 A 0
		TNT1 A 0 A_SpawnItemEx("AmmoRocketBox",0,0,0,0,0,0,0,0,0)
		TNT1 A 0 A_SpawnItemEx("RocketBoxPurist",0,0,0,0,0,0,0,0,0)
		TNT1 A 1
		TNT1 A -1
		Stop
    }
}

// Slot6 ---------------------------------------------------------------

ACTOR AmmoCell : Ammo
{
	Inventory.PickupMessage "$GOTCELL"
	+INVENTORY.NOSCREENFLASH
	Inventory.Amount 20
	Inventory.MaxAmount 300
	Ammo.BackpackAmount 20
	Ammo.BackpackMaxAmount 600
	Inventory.Icon "CELLA0"
	Scale 0.9
	VisibleToPlayerClass BDoomer, Doomer2, Doomer3, ArcadeDoomer, ArcadeDoomer2, ArcadeDoomer3, TacticalDoomer
	Inventory.ForbiddenTo Purist
	States
	{
	Spawn:
		CELL A -1
		Stop
	}
}

ACTOR CellPurist : Ammo
{
	Inventory.PickupMessage "$GOTCELL"
	Inventory.Amount 20
	Inventory.MaxAmount 300
	Ammo.BackpackAmount 20
	Ammo.BackpackMaxAmount 600
	Inventory.Icon "CELLA0"
	VisibleToPlayerClass Purist
	Inventory.ForbiddenTo BDoomer, Doomer2, Doomer3, ArcadeDoomer, ArcadeDoomer2, ArcadeDoomer3, TacticalDoomer
	+INVENTORY.NOSCREENFLASH
	Scale 0.9
	States
	{
	Spawn:
		CELL A -1
		Stop
	}
}

ACTOR CellSpawner: BasicAmmoPickup Replaces Cell
{
    States
    {
	Spawn:
		TNT1 A 0
		TNT1 A 0 A_SpawnItemEx("AmmoCell",0,0,0,0,0,0,0,0,0)
		TNT1 A 0 A_SpawnItemEx("CellPurist",0,0,0,0,0,0,0,0,0)
		TNT1 A 1
		TNT1 A -1
		Stop
    }
}

ACTOR AmmoCellPack : AmmoCell
{
	Inventory.PickupMessage "$GOTCELLBOX"
	Inventory.Amount 100
	Scale 0.9
	//$Category BD Ammo Spawners
	//$Icon "ammo"
	//$Colour rgb(180, 150, 50)
	//$Sprite CELPA0
	//$NotAngled
	States
	{
	Spawn:
		CELP A -1
		Stop
	}
}

ACTOR CellPackPurist : CellPurist
{
	Inventory.PickupMessage "$GOTCELLBOX"
	Inventory.Amount 100
	Scale 0.9
	States
	{
	Spawn:
		CELP A -1
		Stop
	}
}

ACTOR CellPackSpawner: BasicAmmoPickup Replaces CellPack 97
{
	//$Category BD Ammo Spawners
	//$Icon "ammo"
	//$Colour rgb(180, 150, 50)
	//$Sprite CELPA0
	//$NotAngled
    States
    {
	Spawn:
		TNT1 A 0
		TNT1 A 0 A_SpawnItemEx("AmmoCellPack",0,0,0,0,0,0,0,0,0)
		TNT1 A 0 A_SpawnItemEx("CellPackPurist",0,0,0,0,0,0,0,0,0)
		TNT1 A 1
		TNT1 A -1
		Stop
    }
}

ACTOR AmmoCellPackReplacer : BasicAmmoPickup Replaces CellPack
{
	States
	{
	Spawn:
		TNT1 A 0
		MARN A 0 ACS_NamedExecuteAlways("BDDisableNewGuns", 0, 0, 0, 0)//Check if advanced decorations are disabled.
		TNT1 A 2
		TNT1 A 0 A_Jump(2, "Spawn3") // Nuclear Missile
		TNT1 A 0 A_Jump(4, "Spawn2") // Gas
		TNT1 A 2

	Vanilla:
	Spawn1:
		TNT1 A 0
		TNT1 A 0 A_SpawnItemEx ("CellPackSpawner",0,0,0,0,0,0,0,0,0)
		TNT1 A 1
		TNT1 A -1
		Stop

	Spawn2:
		TNT1 A 0
		TNT1 A 0 A_SpawnItemEx ("GasSpawner",0,0,0,0,0,0,0,0,0)
		TNT1 A 1
		TNT1 A -1
		Stop

	Spawn3:
		TNT1 A 0
		TNT1 A 0 A_SpawnItemEx ("NukeSpawner",0,0,0,0,0,0,0,0,0)
		TNT1 A 1
		TNT1 A -1
		Stop
	}
}

// Slot7 ---------------------------------------------------------------

ACTOR Nuke : Ammo
{
	Inventory.PickupMessage "Picked up a nuclear missile."
	Inventory.Amount 1
	Inventory.MaxAmount 1
	Ammo.BackpackAmount 0
	Ammo.BackpackMaxAmount 2
	Inventory.Icon "NKLAA0"
	Inventory.PickupSound "BFGREADY"
	+INVENTORY.NOSCREENFLASH
	Scale 0.9
	VisibleToPlayerClass BDoomer, Doomer2, Doomer3, ArcadeDoomer, ArcadeDoomer2, ArcadeDoomer3, TacticalDoomer
	Inventory.ForbiddenTo Purist
	States
	{
	Spawn:
		BNUK A -1
		Stop
	}
}

ACTOR NukeSpawner: CustomInventory 117
{
	//$Category BD Ammo Spawners
	//$Icon "ammo"
	//$Colour rgb(180, 150, 50)
	//$Sprite BNUKA0
	//$NotAngled
    States
    {
	Spawn:
		TNT1 A 0
		TNT1 A 0 A_SpawnItemEx("Nuke",0,0,0,0,0,0,0,0,0)
		TNT1 A 0 A_SpawnItemEx("CellPackPurist",0,0,0,0,0,0,0,0,0)
		TNT1 A 1
		TNT1 A -1
		Stop
    }
}

// Slot8 ---------------------------------------------------------------

ACTOR Gas : Ammo
{
	Inventory.Amount 50
	Inventory.MaxAmount 300
	Ammo.BackpackAmount 50
	Ammo.BackpackMaxAmount 600
	Inventory.Icon "GSLNA0"
	Inventory.PickupMessage "Picked up a jug of Gasoline."
	Inventory.PickupSound "BFGREADY"
	+INVENTORY.NOSCREENFLASH
	Scale 0.9
	VisibleToPlayerClass BDoomer, Doomer2, Doomer3, ArcadeDoomer, ArcadeDoomer2, ArcadeDoomer3, TacticalDoomer
	Inventory.ForbiddenTo Purist
	States
	{
	Spawn:
		GSLN A -1
		Stop
	}
}

ACTOR GasSpawner: CustomInventory 107
{
	//$Category BD Ammo Spawners
	//$Icon "ammo"
	//$Colour rgb(180, 150, 50)
	//$Sprite GSLNA0
	//$NotAngled
    States
    {
	Spawn:
		TNT1 A 0
		TNT1 A 0 A_SpawnItemEx("Gas",0,0,0,0,0,0,0,0,0)
		TNT1 A 0 A_SpawnItemEx("CellPackPurist",0,0,0,0,0,0,0,0,0)
		TNT1 A 1
		TNT1 A -1
		Stop
    }
}

// Slot9 ---------------------------------------------------------------

ACTOR GrenadeAmmo : Ammo 2030
{
	Inventory.PickupMessage "Picked up a Grenade."
	Inventory.Amount 1
	Inventory.MaxAmount 3
	Ammo.BackpackAmount 1
	Ammo.BackpackMaxAmount 6
	Inventory.Icon "GRNDA"
	+INVENTORY.NOSCREENFLASH
	Scale 0.3
	//$Category BD Ammo Spawners
	//$Icon "ammo"
	//$Colour rgb(180, 150, 50)
	//$Sprite GRNDH0
	//$NotAngled
	States
	{
	Spawn:
		GRND H -1
		Stop
	}
}

ACTOR GrenadeBox : GrenadeAmmo
{
	Game Doom
	Inventory.PickupMessage "Picked up a box of grenades."
	+INVENTORY.NOSCREENFLASH
	Inventory.Amount 3
	States
	{
	Spawn:
		GRND H -1
		Stop
	}
}

// Vehicles ---------------------------------------------------------------

ACTOR TankAmmo : Ammo
{
	Inventory.PickupMessage "Picked up a Magazine."
	Inventory.Amount 10
	Inventory.MaxAmount 100
	Ammo.BackpackAmount 0
	Ammo.BackpackMaxAmount 100
	Inventory.Icon "NULL"
	States
	{
	Spawn:
		CLIP A -1
		Stop
	}
}

ACTOR MechAmmo : Ammo
{
	Inventory.PickupMessage "Picked up a Magazine."
	Inventory.Amount 10
	Inventory.MaxAmount 100
	Ammo.BackpackAmount 0
	Ammo.BackpackMaxAmount 100
	Inventory.Icon "NULL"
	States
	{
	Spawn:
		CLIP A -1
		Stop
	}
}

ACTOR HeavyMachinegunAmmo : Ammo
{
	Inventory.PickupMessage "Picked up a Magazine."
	Inventory.Amount 200
	Inventory.MaxAmount 2000
	Ammo.BackpackAmount 0
	Ammo.BackpackMaxAmount 2000
	Inventory.Icon "NULL"
	States
	{
	Spawn:
		CLIP A -1
		Stop
	}
}

ACTOR MechRocketAmmo : Ammo
{
	Inventory.PickupMessage "Picked up a Magazine."
	Inventory.Amount 6
	Inventory.MaxAmount 60
	Ammo.BackpackAmount 0
	Ammo.BackpackMaxAmount 60
	Inventory.Icon "NULL"
	States
	{
	Spawn:
		CLIP A -1
		Stop
	}
}

ACTOR AutocannonAmmo : Ammo
{
	Inventory.PickupMessage "Picked up a Magazine."
	Inventory.Amount 100
	Inventory.MaxAmount 1000
	Ammo.BackpackAmount 0
	Ammo.BackpackMaxAmount 1000
	Inventory.Icon "NULL"
	States
	{
	Spawn:
		CLIP A -1
		Stop
	}
}

ACTOR MechMOrtarAmmo : Ammo
{
	Inventory.PickupMessage "Picked up a Magazine."
	Inventory.Amount 2
	Inventory.MaxAmount 20
	Ammo.BackpackAmount 0
	Ammo.BackpackMaxAmount 20
	Inventory.Icon "NULL"
	States
	{
	Spawn:
		CLIP A -1
		Stop
	}
}

ACTOR HelicopterRocketAmmo : Ammo
{
	Inventory.PickupMessage "Picked up a Magazine."
	Inventory.Amount 10
	Inventory.MaxAmount 100
	Ammo.BackpackAmount 0
	Ammo.BackpackMaxAmount 100
	Inventory.Icon "NULL"
	States
	{
	Spawn:
		CLIP A -1
		Stop
	}
}

ACTOR HelicopterMissileAmmo : Ammo
{
	Inventory.PickupMessage "Picked up a Magazine."
	Inventory.Amount 5
	Inventory.MaxAmount 50
	Ammo.BackpackAmount 0
	Ammo.BackpackMaxAmount 50
	Inventory.Icon "NULL"
	States
	{
	Spawn:
		CLIP A -1
		Stop
	}
}