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

ACTOR AmmoSuply : BackpackItem
{
	Game Doom
	SpawnID 144
	Height 26
	Inventory.PickupMessage "$GOTBACKPACK"
	Inventory.PickupSound "BACKPACK"
	States
	{
	Spawn:
		TNT1 A 0
		"####" "#" 0  A_ChangeFlag("XFLIP",random(0,1))
		
		Stay:
		BPAK A -1

		Stop
	}
}

ACTOR Clip2 : Ammo //Replaces Clip
{
	Inventory.PickupMessage "$GOTCLIP"
	Inventory.Amount 15
	Inventory.MaxAmount 150
	Ammo.BackpackAmount 30
	Ammo.BackpackMaxAmount 300
	Inventory.Icon "R762C0"
	Inventory.PickupSound "CLIPICK2"
	tag"7.62mm Magazine"
	Scale 0.085
	States
	{
	Spawn:
		TNT1 A 0
		"####" "#" 0  A_ChangeFlag("XFLIP",random(0,1))
		TNT1 A 0
	Stay:
		CLIP A -1
		Stop
	}
}

ACTOR DroppedClip2 : Clip2
{		
	Inventory.Amount 10
	HEALTH 3
	+VULNERABLE
	States
	{
		
	DEATH.REMOVECLIP:
	PAIN.REMOVECLIP:
	TNT1 A 1
	STOP
	}
}

ACTOR MiseryClip2 : Clip2
{
	Inventory.PickupMessage "$GOTCLIP2"
	Inventory.Amount 5
}


ACTOR DoubleRifleAmmo : Ammo
{
   Inventory.Amount 0
   Inventory.MaxAmount 62
   Ammo.BackpackAmount 0
   Ammo.BackpackMaxAmount 62
   Inventory.Icon "R762C0"
}



ACTOR Clip1 : Ammo
{
	Game Doom
	Inventory.PickupMessage "$GOT9MM"
	Inventory.Amount 9
	Inventory.MaxAmount 150
	Ammo.BackpackAmount 50
	Ammo.BackpackMaxAmount 400
	Inventory.Icon "P9MMB0"
	Inventory.PickupSound "CLIPICK"
	Scale 0.20
	tag"9mm Magazine"
	+cannotpush
	+FORCEXYBILLBOARD
	States
	{
	Spawn:
		TNT1 A 0
		"####" "#" 0  A_ChangeFlag("XFLIP",random(0,1))
		TNT1 A 0
		
		Stay:
		CLIP B -1
		Stop
	}
}

ACTOR Clip1Full : CLIP1
{
Inventory.Amount 15
}


ACTOR Clip1Drop: CustomInventory
{
 scale 0.25
 radius 24
 height 24
 +THRUACTORS +FORCEXYBILLBOARD
 Inventory.PickupMessage "$GOT9MM"
 Inventory.PickupSound "CLIPIN"
 tag"9mm Magazine"
 +FORCEXYBILLBOARD
 Mass 1
    States
    {
	 Spawn:
		TNT1 A 1
		TNT1 A 0 A_ChangeFlag("THRUACTORS", 0)
		"####" "#" 0  A_ChangeFlag("XFLIP",random(0,1))
		TNT1 A 0
	Stay:
		CLIP B 1
		CLIP B -1
		Stop
	Pickup:
	    TNT1 A 0
	PickupNormal:	
		TNT1 A 0 A_GiveInventory("Clip1", 9)
		Stop
    }
}

ACTOR ClipBox2 : Clip2
{
	Game Doom
	SpawnID 139
	Inventory.PickupMessage "$GOTCLIPBOX"
	Inventory.PickupSound "CBOXPICK"
	Inventory.Amount 80
	Scale 0.08
	tag"7.62mm ammunition box"
	+FORCEXYBILLBOARD
	States
	{
	Spawn:
		TNT1 A 0
		"####" "#" 0  A_ChangeFlag("XFLIP",random(0,1))
		Stay:
		762B A -1
		Stop
	}
}

ACTOR ClipBox3 : Clip2
{
	Game Doom
	Inventory.PickupMessage "$GOTCLIPBOX"
	Inventory.PickupSound "MGMAGIN"
	Inventory.Amount 30
	Scale 0.55
	tag"7.62mm MMG ammo box"
	+FORCEXYBILLBOARD
	States
	{
	Spawn:
		TNT1 A 0	
		"####" "#" 0  A_ChangeFlag("XFLIP",random(0,1))
		Stay:
		LMGB X -1
		Stop
	}
}

ACTOR MinigunAmmo : Ammo
{
	Inventory.PickupMessage "$GOT556"
	Inventory.PickupSound "CBOXPICK"
	Inventory.Icon "R556A0"
	Inventory.Amount 100
	Inventory.MaxAmount 200
	Ammo.BackpackAmount 50
	Ammo.BackpackMaxAmount 500
	Scale 0.1
	tag"4.73mm ammunition box"
	+FORCEXYBILLBOARD
	States
	{
	Spawn:
		TNT1 A 0
		"####" "#" 0  A_ChangeFlag("XFLIP",random(0,1))
		
		Stay:
		556B A -1
		Stop
	}
}

ACTOR CLIP3 : minigunammo
{
	Inventory.PickupMessage "$GOTCLIP3"
	Inventory.PickupSound "CLIPICK2"
	Inventory.Amount 20
	scale 0.09
	tag"4.73mm magazine"
	+FORCEXYBILLBOARD
	States
	{
	Spawn:
		TNT1 A 0
		"####" "#" 0  A_ChangeFlag("XFLIP",random(0,1))
		CLIP C -1
		Stop
	}
}

ACTOR MiseryClip3 : Clip3
{
	Inventory.PickupMessage "$GOTCLIP3E"
	Inventory.Amount 10
}

ACTOR MinigunAmmoDropped : MinigunAmmo
{
	Inventory.PickupMessage "$GOT556E"
	Inventory.PickupSound "CBOXPICK"
	Inventory.Amount 30
	tag"4.73mm ammunition box"
	+FORCEXYBILLBOARD
	States
	{
	Spawn:
		TNT1 A 0
		"####" "#" 0  A_ChangeFlag("XFLIP",random(0,1))
		556B A -1
		Stop
	}
}

ACTOR Clip1Box : Clip1
{
	Game Doom
	SpawnID 139
	Inventory.PickupMessage "$GOT9MMBOX"
	Inventory.PickupSound "CBOXPICK"
	tag"9mm ammunition box"
	Inventory.Amount 80
	Scale 0.4
	+FORCEXYBILLBOARD
	States
	{
	Spawn:
		TNT1 A 0
		"####" "#" 0  A_ChangeFlag("XFLIP",random(0,1))
		P9MM A -1
		Stop
	}
}					  

ACTOR BDSMGAmmo : Ammo
{
   Inventory.Amount 0
   Inventory.MaxAmount 41
   Ammo.BackpackAmount 0
   Ammo.BackpackMaxAmount 41
   Inventory.Icon SMGZA0
}



ACTOR BDDualSMGAmmo : Ammo
{
   Inventory.Amount 0
   Inventory.MaxAmount 82
   Ammo.BackpackAmount 0
   Ammo.BackpackMaxAmount 82
   Inventory.Icon SMGZB0
}


ACTOR AmmoRocket : Ammo
{
	Game Doom
	SpawnID 140
	Inventory.PickupMessage "$GOTROCKET"
	Inventory.Amount 1
	Inventory.MaxAmount 5
	Ammo.BackpackAmount 1
	Ammo.BackpackMaxAmount 10
	Inventory.Icon "ROCKA0"
	Inventory.Pickupsound "RCKCLIP"
	Scale 0.9
	+NOTAUTOAIMED
	+SHOOTABLE
	+NOBLOOD
	+vulnerable
	+LAXTELEFRAGDMG
	+canpass
	tag"80mm Anti-Tank Rocket"
	
	damagefactor "Shrapnel", 0.0  damagefactor "Trample", 0.0  damagefactor "headkick", 0.0 DamageFactor "use", 0.0 DamageFactor "STEALTH", 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 "Telefrag", 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
	DamageFactor "plasma", 5.0 DamageFactor "minor", 1000.0 DamageFactor "ExplosiveImpact", 3.0 DamageFactor "Explosives", 3.0 DamageFactor "beartrap", 1000.0
	DamageFactor "Fire", 1000.0 DamageFactor "Shotgun", 1000.0 DamageFactor "Ssg", 1000.0 DamageFactor "bullet", 1000.0 DamageFactor "minigun", 1000.0 DamageFactor "railgun", 1000.0
	Health 500
	States
	{
	Spawn:
		ROCK A 1
		TNT1 A 0 
		
		Stay:
		TNT1 A 0 ACS_NamedExecuteAlways("BDShootableAmmo")//Checks if shootable ammo is enabled
		ROCK A 1
		TNT1 A 0 A_JumpIfInventory("Clip1", 1, "NoShootable")
		TNT1 A 0 a_jump(127,2)
		ROCK A -1
		Stop
		TNT1 A 0 A_ChangeFlag("FORCEXYBILLBOARD",1)
		TNT1 A 0 a_jump(127,2)
		ROCK Z -1
		Stop
		TNT1 A 0 A_Changeflag("SPRITEFLIP",1)
		ROCK Z -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_Explode(1350,150,0,1,100,0,0,"hitpuff","explosiveimpact")
		//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
		
	DEATH.teleportremover:
	DEATH.telefrag:
		TNT1 A 0
		stop
	}
}

// Rocket box --------------------------------------------------------------

ACTOR AmmoRocketBox : AmmoRocket
{
	Game Doom
	SpawnID 141
	Inventory.PickupMessage "$GOTROCKBOX"
	Inventory.Amount 3
	Scale 0.45
	-nogravity
	Inventory.Pickupsound "RCKCLIP2"
	tag"AT rockets box"
	States
	{
	Spawn:
		TNT1 A 0
		TNT1 A 0 
		
		Stay:
		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))
		TNT1 AAAA 0 A_CustomMissile ("MediumExplosionFlames", 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))
		EXPL A 0 A_CustomMissile ("BigNeoSmoke", 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))
		EXPL AAA 0 A_CustomMissile ("BarrelKaboom", 0, 0, random (0, 360), 2, random (0, 360))
		EXPL AAA 0 A_CustomMissile ("BarrelKaboom", 0, 0, random (0, 360), 2, random (0, 360))
		TNT1 A 0 A_Explode(4600,190,0,1,140,0,0,"hitpuff","explosiveimpact")
		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	
		
	DEATH.teleportremover:
	DEATH.telefrag:
		TNT1 A 0
		stop
	}
}

// Cell --------------------------------------------------------------------

ACTOR AmmoCell : Ammo //Replaces Cell
{
	Game Doom
	SpawnID 75
	Height 10
	Radius 17
	Inventory.Amount 15
	Inventory.MaxAmount 300
	Ammo.BackpackAmount 20
	Ammo.BackpackMaxAmount 600
	Inventory.Icon "CELLA0"
	Inventory.PickupMessage "$GOTCELL"
	Inventory.Pickupsound "CELLGET"
	tag"Energy Cell"
	Scale 0.25
	+canpass
	+ROLLSPRITE
	+ROLLCENTER
	+FORCEXYBILLBOARD
	States
	{
	Spawn:
		TNT1 A 0 A_Jump(96,2)
		TNT1 A 0 A_SetRoll(randompick(0,90,180,270))
		CELL B -1
		STOP

	}
}

ACTOR DroppedCell : Ammocell
{		
	Inventory.Amount 5
	Radius 3
	+NOBLOOd
	+thruactors
	States
	{	
Spawn:
		CELL BBBBB 1 a_jumpifinventory("removeingredient",1,"Disappear")
		TNT1 A 0 a_changeflag("thruactors",0)
Stay:
		CELL B 1 a_jumpifinventory("removeingredient",1,"Disappear")
		loop
Disappear:
		TNT1 A 1
		stop
	}
}

ACTOR DroppedCell2 : Ammocell {Inventory.Amount 10}

// Cell pack ---------------------------------------------------------------

ACTOR AmmoCellPack : AmmoCell //Replaces CellPack
{
	Game Doom
	SpawnID 142
	Inventory.PickupMessage "$GOTCELLBOX"
	Inventory.Pickupsound "CELLBOX"
	Inventory.Amount 50
	Scale 0.6
	tag"Energy Cell Battery"
	-nogravity
	States
	{
	Spawn:
		TNT1 A 0
		TNT1 A 0 
		
		Stay:
		CELP ABCBACABC 2 A_SpawnItem("BlueFlareSmallItem",0,7)
		CELP EDEFEDFDEF 2
		loop
	}
}

ACTOR CellPack2 : AmmoCell
{
	Game Doom
	Inventory.PickupMessage "$GOTCELLBOX"
	Inventory.Pickupsound "CELLBOX"
	Inventory.Amount 50
	tag"Energy Cell Battery"
	Scale 0.6
	+canpass
	States
	{
	Spawn:
		CELP A 1
		TNT1 A 0 
		
		Stay:
		CELP ABCBACABC 3 A_SpawnItem("BlueFlareSmallItem",0,7)
		CELP EDEFEDFDEF 3
		LOOP

	}
}

// Shells ------------------------------------------------------------------

ACTOR AmmoShell : Ammo
{
	Game Doom
	SpawnID 12
	Inventory.PickupMessage "$GOTSHELLS"
	Inventory.Amount 4
	Inventory.MaxAmount 30
	Ammo.BackpackAmount 8
	Ammo.BackpackMaxAmount 60
	Inventory.Icon "BUCKA0"
	Inventory.Pickupsound "SHELPK1"
	tag"Buckshot Shells"
	+CANNOTPUSH
	Scale 0.25
	+FORCEXYBILLBOARD
	States
	{
	Spawn:
		TNT1 A 0
		"####" "#" 0  A_ChangeFlag("XFLIP",random(0,1))
		Stay:
		SHEL A -1
		Stop
	}
}


ACTOR AmmoShellSmall : AmmoShell
{
	Game Doom
	SpawnID 12
	Inventory.PickupMessage "$GOTSHELLS2"
	Inventory.Amount 2
	Inventory.Pickupsound "SHELPK1"
	Scale 0.25
	+CANNOTPUSH
	States
	{
	Spawn:
		SHEL B -1
		Stop
	}
}



ACTOR AmmoShellBox : AmmoShell
{
	Game Doom
	SpawnID 143
	Inventory.PickupMessage "$GOTSHELLBOX"
	Inventory.Amount 16
	Inventory.Pickupsound "SHELPK3"
	Scale 0.25
	+FORCEXYBILLBOARD
	States
	{
	Spawn:
		TNT1 A 0 
		"####" "#" 0  A_ChangeFlag("XFLIP",random(0,1))
		
		Stay:
		SBOX A -1
		Stop
	}
}


// SLUGS ---------------------------------------------------------------
ACTOR AmmoSlug : Ammo 30001
{
	Inventory.Amount 3
	Inventory.MaxAmount 30
	Inventory.PickupMessage "$GOTSLUGS"
	Ammo.BackpackAmount 8
	Ammo.BackpackMaxAmount 50
	Inventory.Icon "SLUGA0"
	Inventory.Pickupsound "SHELPK1"
	tag"Magnum Slug shells "
	Scale 0.3
	+FORCEXYBILLBOARD
	States
	{
	Spawn:
		TNT1 A 0
		"####" "#" 0  A_ChangeFlag("XFLIP",random(0,1))
		
		Stay:
		SLUG B -1
		Stop
	}
}

ACTOR SlugBox : AmmoSlug 30002
{
	Game Doom
	SpawnID 143
	Inventory.PickupMessage "$GOTSLUGBOX"
	Inventory.Amount 12
	Inventory.Pickupsound "SHELPK2"
	tag"Magnum Slugs box"
	Scale 0.3
	+FORCEXYBILLBOARD
	States
	{
	Spawn:
		TNT1 A 0
		"####" "#" 0  A_ChangeFlag("XFLIP",random(0,1))
		
		Stay:
		SLUG C -1
		Stop
	}
}

ACTOR SlugBox8 : Slugbox 
{
Inventory.Amount 8
}

ACTOR 50ammo : Ammo 30003
{
	Inventory.Amount 6
	Inventory.MaxAmount 30
	Inventory.PickupMessage "$GOT50AMMO"
	Ammo.BackpackAmount 12
	Ammo.BackpackMaxAmount 50
	Inventory.Icon "44AMB0"
	Inventory.Pickupsound "SHELPK1"
	tag".500 S&W bullets"
	Scale 0.3
	+FORCEXYBILLBOARD
	States
	
	{
	Spawn:
		TNT1 A 0
		"####" "#" 0  A_ChangeFlag("XFLIP",random(0,1))
		
		Stay:
		44AM A -1
		Stop
	}
}

////////////////////////

ACTOR SSGAmmo : Ammo
{
   Inventory.Amount 0
   Inventory.MaxAmount 2
   Ammo.BackpackAmount 0
   Ammo.BackpackMaxAmount 2
   Inventory.Icon "SGN2A0"
}

ACTOR PlasmaAmmo : Ammo
{
   Inventory.Amount 0
   Inventory.MaxAmount 50
   Ammo.BackpackAmount 0
   Ammo.BackpackMaxAmount 50
   Inventory.Icon "PLASA0"
}



ACTOR GLAmmo : Ammo
{
   Inventory.Amount 0
   Inventory.MaxAmount 6
   Ammo.BackpackAmount 0
   Ammo.BackpackMaxAmount 6
}

ACTOR MiniHellRocketAmmo : Ammo
{
   Inventory.Amount 0
   Inventory.MaxAmount 50
   Ammo.BackpackAmount 0
   Ammo.BackpackMaxAmount 100
}


ACTOR SoulAmmo : Ammo
{
   Inventory.Amount 0
   Inventory.MaxAmount 999
   Ammo.BackpackAmount 0
   Ammo.BackpackMaxAmount 999
}


ACTOR BuzzSawAmmo : Ammo
{
   Inventory.Amount 100
   Inventory.MaxAmount 600
   Ammo.BackpackAmount 20
   Ammo.BackpackMaxAmount 600
   Inventory.Icon "HBUSE0"
}

////////////
///////////

ACTOR GASAMMO : ammo 30007
{
  Inventory.PickupSound "GASPKUP"
  Inventory.PickupMessage "$GOTGAS"
   Inventory.Icon "GASOC0"
  	damagefactor "GibRemoving", 0.0	damagefactor "Trample", 0.0
	damagefactor "TeleportRemover", 0.0 damagefactor "Telefrag", 0.0
  	DamageFactor "CauseSplash", 0.0 DamageFactor "CauseObjectsToSplashSlime", 0.0 DamageFactor "CauseObjectsToSplashNukage", 0.0
	DamageFactor "CauseObjectsToSplashBlood", 0.0 DamageFactor "CauseObjectsToSplashLava", 0.0  damagefactor "headkick", 0.0
	DamageFactor "beartrap", 1000.0 DamageFactor "use", 0.0 DamageFactor "stealth", 0.0 DamageFactor "melee", 0.0 DamageFactor "extremepunches", 0.0 DamageFactor "kick", 0.0

	tag"Fuel Jerry Can"
	
	DamageFactor "removefuel", 2000.0 DamageFactor "plasma", 1000.0 
	DamageFactor "Fire", 1000.0 
   Inventory.Amount 20
   Inventory.MaxAmount 40
   Ammo.BackpackAmount 20
   Ammo.BackpackMaxAmount 60
  HEALTH 30
  Scale 0.7
  +LAXTELEFRAGDMG
  +THRUACTORS
  +FLOORCLIP
  +SHOOTABLE
  +vulnerable
  +noblood
 +canpass
  +FORCEXYBILLBOARD
  States
  {
  Spawn:
	TNT1 A 0
	TNT1 A 0 
	GASO A 1 A_ChangeFlag("SPRITEFLIP", random(0,1))
	GASO A 30
	TNT1 A 0 A_CHANGEFLAG("THRUACTORS",0)
	GASO A -1 
    Stop

	Pain.removefuel:
	Death.removefuel:
	TNT1 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 ("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 0 A_CustomMissile("flamethrowermissileproper",10,25,0,CMF_OFFSETPITCH,random(-10,-5))
		TNT1 A 0 A_CustomMissile("flamethrowermissileproper",10,25,-45,CMF_OFFSETPITCH,random(-10,-5))
		TNT1 A 0 A_CustomMissile("flamethrowermissileproper",10,25,-90,CMF_OFFSETPITCH,random(-10,-5))
		TNT1 A 0 A_CustomMissile("flamethrowermissileproper",10,25,45,CMF_OFFSETPITCH,random(-10,-5))
		TNT1 A 0 A_CustomMissile("flamethrowermissileproper",10,25,90,CMF_OFFSETPITCH,random(-10,-5))
		TNT1 A 0 A_CustomMissile("flamethrowermissileproper",10,25,-130,CMF_OFFSETPITCH,random(-10,-5))
		TNT1 A 0 A_CustomMissile("flamethrowermissileproper",10,25,130,CMF_OFFSETPITCH,random(-10,-5))
		TNT1 A 0 A_CustomMissile("flamethrowermissileproper",10,25,-20,CMF_OFFSETPITCH,random(-10,-5))
		TNT1 A 0 A_CustomMissile("flamethrowermissileproper",10,25,20,CMF_OFFSETPITCH,random(-10,-5))
		TNT1 A 0 A_CustomMissile("flamethrowermissileproper",10,25,-60,CMF_OFFSETPITCH,random(-10,-5))
		TNT1 A 0 A_CustomMissile("flamethrowermissileproper",10,25,60,CMF_OFFSETPITCH,random(-10,-5))
		TNT1 A 0 A_CustomMissile("flamethrowermissileproper",10,25,-160,CMF_OFFSETPITCH,random(-10,-5))
		TNT1 A 0 A_CustomMissile("flamethrowermissileproper",10,25,160,CMF_OFFSETPITCH,random(-10,-5))
		TNT1 A 0 A_CustomMissile("flamethrowermissileproper",10,25,180,CMF_OFFSETPITCH,random(-10,-5))
		TNT1 A 0 A_CustomMissile("flamethrowermissile",10,25,-160,CMF_OFFSETPITCH,-180)
		TNT1 A 0 A_CustomMissile("flamethrowermissile",10,25,160,CMF_OFFSETPITCH,-180)
		TNT1 A 0 A_CustomMissile("flamethrowermissile",10,25,180,CMF_OFFSETPITCH,-180)
		TNT1 A 0 A_CustomMissile("Durableflame", random (-32, 0), random (-60, 60), random (-32, 32), 2, random (-32, 32))
		EXPL A 0 A_CustomMissile ("FlamethrowerFireParticles", 6, 0, random (0, 360), 2, random (10, 90))
		TNT1 A 0 A_CustomMissile("Durableflame", random (-32, 0), random (-32, 32), random (-32, 32), 2, random (-32, 32))
		EXPL A 0 A_CustomMissile ("FlamethrowerFireParticles", 6, 0, random (0, 360), 2, random (10, 90))
		TNT1 A 0 A_CustomMissile("Durableflame", random (-32, 0), random (-60, 60), random (-32, 32), 2, random (-32, 32))
		EXPL A 0 A_CustomMissile ("FlamethrowerFireParticles", 6, 0, random (0, 360), 2, random (10, 90))
		TNT1 A 0 A_CustomMissile("Durableflame", random (-32, 0), random (-32, 32), random (-32, 32), 2, random (-32, 32))
		EXPL A 0 A_CustomMissile ("FlamethrowerFireParticles", 6, 0, random (0, 360), 2, random (10, 90))
		EXPL AAA 0 A_CustomMissile ("BarrelKaboom", 0, 0, random (0, 360), 2, random (0, 360))
		TNT1 A 0 A_Explode(300, 300, 0,150,0,0,0,BulletPuff, fire)
		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 Sawfuel : Ammo
{
   Inventory.Amount 0
   Inventory.MaxAmount 50
   Ammo.BackpackMaxAmount 50
   Inventory.Icon "GASOC0"
}

ACTOR Fueltankammo : Ammo
{
   Inventory.Amount 0
   Inventory.MaxAmount 100
   Ammo.BackpackMaxAmount 100
   Inventory.Icon "GASOC0"
}

////////////
///////////

ACTOR MP40Ammo : Ammo
{
   Inventory.Amount 0
   Inventory.MaxAmount 32
   Ammo.BackpackAmount 0
   Ammo.BackpackMaxAmount 32
   Inventory.Icon "MP40I0"
   
}


ACTOR DualMP40Ammo : Ammo
{
   Inventory.Amount 0
   Inventory.MaxAmount 64
   Ammo.BackpackAmount 0
   Ammo.BackpackMaxAmount 64
   Inventory.Icon "MP40J0"
   
}

ACTOR PlasmaLanceammo : Ammo
{
   Inventory.Amount 0
   Inventory.MaxAmount 50
   Ammo.BackpackAmount 0
   Ammo.BackpackMaxAmount 50
}


		
		

ACTOR GrenadeAmmo : Ammo
{
	Game Doom
	Inventory.PickupMessage "$GOTGRENADE"
	Inventory.Amount 1
	HEIGHT 3
	Inventory.MaxAmount 15
	Ammo.BackpackAmount 3
	Ammo.BackpackMaxAmount 30
	Inventory.Icon "GRH3G0"
	Inventory.Pickupsound "GRNT"
	damagefactor "Shrapnel", 0.0  damagefactor "Trample", 0.0  damagefactor "headkick", 0.0 DamageFactor "use", 0.0 DamageFactor "STEALTH", 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 "Telefrag", 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
	DamageFactor "beartrap", 1000.0
	DamageFactor "plasma", 10.0  DamageFactor "EXPLOSIVEIMPACT", 0.4
	tag"HE grenade"
	health 50
	+SHOOTABLE
	+laxtelefragdmg
	+thruactors
	+noblood
	+VULNERABLE
	Scale 0.3
	+ROLLSPRITE
	+ROLLCENTER
	+FORCEXYBILLBOARD
	States
	{
	Spawn:
		TNT1 A 0 
		TNT1 A 0 A_Jump(128,2)
		TNT1 A 0 A_SetRoll(randompick(0,180))
		TNT1 A 0
		GRH3 G 5
		TNT1 A 0 A_CHANGEFLAG("THRUACTORS",0)
		GRH3 G -1
		Stop
		
	DEATH:
		TNT1 A 0 A_SpawnItem("FragGrenadeExplosion")
		STOP
	
	DEATH.teleportremover:
	DEATH.telefrag:
		TNT1 A 0
		stop	
	}
}

ACTOR CLUSTERAmmo : Ammo
{
	Game Doom
	Inventory.PickupMessage "$GOTCLUSTER"
	Inventory.Amount 1
	HEIGHT 3
	Inventory.MaxAmount 6
	Ammo.BackpackAmount 3
	Ammo.BackpackMaxAmount 15
	Inventory.Icon "GRNDC0"
	Inventory.Pickupsound "GRNT"
	damagefactor "Shrapnel", 0.0  damagefactor "Trample", 0.0  damagefactor "headkick", 0.0 DamageFactor "use", 0.0 DamageFactor "STEALTH", 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 "Telefrag", 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
	DamageFactor "beartrap", 1000.0
	DamageFactor "plasma", 10.0  DamageFactor "EXPLOSIVEIMPACT", 0.4
	tag"Cluster Grenade"
	health 50
	+SHOOTABLE
	+laxtelefragdmg
	+noblood
	+VULNERABLE
	Scale 0.3
	+FORCEXYBILLBOARD
	+ROLLSPRITE
	+ROLLCENTER
	States
	{
	Spawn:
		TNT1 A 0
		TNT1 A 0 A_Jump(128,2)
		TNT1 A 0 A_SetRoll(randompick(0,180))
		TNT1 A 0
		GRND C -1
		Stop
		
	DEATH:
		TNT1 A 0 A_SpawnItem("CLUSTERExplosion")
		STOP
	
	DEATH.teleportremover:
	DEATH.telefrag:
		TNT1 A 0
		stop
	
	
	}
}


ACTOR GrenadeBox : GrenadeAmmo
{
	Game Doom
	SpawnID 139
	height 20
	radius 20
	Inventory.PickupMessage "$GOTGRENBOX"
	Inventory.Amount 3
	Inventory.Pickupsound "CBOXPKUP"
    damagefactor "GibRemoving", 0.0	damagefactor "Trample", 0.0 DamageFactor "use", 0.0 DamageFactor "STEALTH", 0.0
	damagefactor "TeleportRemover", 0.0 damagefactor "Telefrag", 0.0
  	DamageFactor "CauseSplash", 0.0 DamageFactor "CauseObjectsToSplashSlime", 0.0 DamageFactor "CauseObjectsToSplashNukage", 0.0
	DamageFactor "CauseObjectsToSplashBlood", 0.0 DamageFactor "CauseObjectsToSplashLava", 0.0  damagefactor "headkick", 0.0
	DamageFactor "beartrap", 1000.0
	DamageFactor "plasma", 10.0  DamageFactor "EXPLOSIVEIMPACT", 0.4
	tag"Grenade box"
	health 50
	+SHOOTABLE
	+noblood
	+laxtelefragdmg
	+VULNERABLE
	-thruactors
	scale 0.32
	States
	{
	Spawn:
		BROK C -1
		Stop
		
	DEATH:
	TNT1 A 0 A_SpawnItem("FragGrenadeExplosion")
	TNT1 AA 0 A_SpawnItemex("HandGrenade",0,0,5, random(5,10),random(5,10),random(5,10),random(0,360))
	STOP
	
	DEATH.teleportremover:
	DEATH.telefrag:
		TNT1 A 0
		stop
	}
}

ACTOR Expbox : CustomInventory 31000
{
	Game Doom
	SpawnID 139
	Inventory.PickupMessage "$GOTEXPBOX"
	Inventory.Pickupsound "CBOXPKUP"
	tag"Explosives box"
	scale 0.4
	States
	{
	Spawn:
		TNT1 A 0
		TNT1 A 0 
		BROK B -1
	Pickup:
		TNT1 A 0 A_GiveInventory("GrenadeAmmo",2)
		TNT1 A 0 A_GiveInventory("AmmoRocket",1)
		Stop
	}
}

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


ACTOR MechAmmo : Ammo
{

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




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




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


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



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



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


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


		
ACTOR BDPistolAmmo : Ammo
{
   Inventory.Amount 0
   Inventory.MaxAmount 16
   Ammo.BackpackAmount 0
   Ammo.BackpackMaxAmount 16
   Inventory.Icon PISTG0
}


ACTOR BDDualPistolAmmo : Ammo
{
   Inventory.Amount 0
   Inventory.MaxAmount 32
   Ammo.BackpackAmount 0
   Ammo.BackpackMaxAmount 32
   Inventory.Icon PISTH0
}


ACTOR Nuke : Ammo
{
	Inventory.PickupMessage "$GOTWARHEAD"
	Inventory.Amount 1
	Inventory.MaxAmount 2
	Ammo.BackpackAmount 0
	Ammo.BackpackMaxAmount 0
	Inventory.Icon "WRHDA0"
	Inventory.PickupSound "RCKCLIP"
	tag "thermobaric warhead"
	Scale 1.0
	States
	{
	Spawn:
		TNT1 A 0 nodelay A_jump(127,"Lying")
		WRHD A -1
		Stop
		
	Lying:
		TNT1 A 0 A_jump(127,2)
		TNT1 A 0 A_Changeflag("SPRITEFLIP",1)
		WRHD B -1
		stop
		
	}
}

ACTOR SentryTurretAmmo : Ammo 
{
	Inventory.PickupMessage ""
	Inventory.Amount 50
	Inventory.MaxAmount 500
	Ammo.BackpackAmount 100
	Ammo.BackpackMaxAmount 900
	Inventory.Icon "R762C0"
	Inventory.PickupSound "CLIPICK2"
	tag"Sentry Turret ammo"
	Scale 0.085
	States
	{
	Spawn:
		TNT1 A 0
		TNT1 A 0 	
	Stay:
		CLIP A -1
		Stop
	}
}


ACTOR Mauser9mm : Ammo
{
	Game Doom
	Inventory.PickupMessage "Picked up a Pistol Magazine."
	Inventory.Amount 10
	Inventory.MaxAmount 200
	Ammo.BackpackAmount 100
	Ammo.BackpackMaxAmount 400
	Inventory.Icon "CLIPB0"
	Inventory.PickupSound "CLIPICK"
	Scale 0.9
	States
	{
	Spawn:
		CLIP B -1
		Stop
	}
}