

/////////
//TAKER SPAWNER
////////

actor WeaponTaker : custominventory
{
	+Inventory.QUIET
    States
    {

	 Spawn:
		TNT1 A 0
	
	Pickup:
		TNT1 A 0 A_giveinventory ("RailgunTaker",1)
		TNT1 A 0 A_giveinventory ("FlameTaker",1)
		TNT1 A 0 A_giveinventory ("REVOLVERTaker",1)
		TNT1 A 0 A_giveinventory ("PlasmaTaker",1)
		TNT1 A 0 A_giveinventory ("BFGTaker",1)
		TNT1 A 0 A_giveinventory ("MachinegunTaker",1)
		TNT1 A 0 A_giveinventory ("GrenadeLauncherTaker",1)
		TNT1 A 0 A_giveinventory ("ShotgunTaker",1)
		TNT1 A 0 A_giveinventory ("RifleTaker",1)
		TNT1 A 0 A_giveinventory ("AssaultShotgunTaker",1)
		TNT1 A 0 A_giveinventory ("SSGTaker",1)
		TNT1 A 0 A_giveinventory ("SMGTaker",1)
		TNT1 A 0 A_giveinventory ("RocketTaker",1)
		TNT1 A 0 A_giveinventory ("MinigunTaker",1)
		TNT1 A 0 A_giveinventory ("MissileTaker",1)
		TNT1 A 0 A_giveinventory ("ShellTaker",1)
		TNT1 A 0 A_giveinventory ("Clip1Taker",1)
		TNT1 A 0 A_giveinventory ("Clip2Taker",1)
		TNT1 A 0 A_giveinventory ("50Taker",1)
		TNT1 A 0 A_giveinventory ("473Taker",1)
		TNT1 A 0 A_giveinventory ("GasLoss",1)
		TNT1 A 0 A_giveinventory ("RecombinerTaker",1)
		TNT1 A 0 A_giveinventory ("Explosivestaker",1)

		TNT1 A 1
		Stop	
}}


actor PISTOLSTART : custominventory
{
	+Inventory.QUIET
	States
	{
 Spawn:
	TNT1 A 0
	TNT1 A 1
	Loop
	
	 Pickup:
	TNT1 A 0 A_takeinventory("brutalaxe",1)
	TNT1 A 0 A_takeinventory("axedurability",100)
	TNT1 A 0 A_takeinventory("knivesammo",10)
	TNT1 A 0 A_takeinventory("knifedurability",30)
	TNT1 A 0 A_takeinventory("chain_saw",1)
	TNT1 A 0 A_takeinventory("GASAMMO",800)
	TNT1 A 0 A_takeinventory("assaultshotgun",1)
	TNT1 A 0 A_takeinventory("SSG",1)
	TNT1 A 0 A_takeinventory("shot_gun",1)
	TNT1 A 0 A_takeinventory("SHOTGUNAMMO",9)
	TNT1 A 0 A_takeinventory("SSGAMMO",2)
	TNT1 A 0 A_takeinventory("assaultshotgunammo",20)
	TNT1 A 0 A_takeinventory("ammoshell",60)
	TNT1 A 0 A_takeinventory("ammoslug",50)
	TNT1 A 0 A_takeinventory("brutalsmg",1)
	TNT1 A 0 A_takeinventory("bdsmgammo",41)
	TNT1 A 0 A_takeinventory("Revolver",1)
	TNT1 A 0 A_takeinventory("Revolverammo",6)
	TNT1 A 0 A_takeinventory("50ammo",60)
	TNT1 A 0 A_takeinventory("LitRifle",1)
	TNT1 A 0 A_takeinventory("Rifleammo",31)
	TNT1 A 0 A_takeinventory("Clip2",300)
	TNT1 A 0 A_takeinventory("Machinegun",1)
	TNT1 A 0 A_takeinventory("Minigun",1)
	TNT1 A 0 A_takeinventory("Minigunammo",600)
	TNT1 A 0 A_takeinventory("Rocket_Launcher",1)
	TNT1 A 0 A_takeinventory("GrenadeLauncher",1)
	TNT1 A 0 A_takeinventory("ammorocket",100)
	TNT1 A 0 A_takeinventory("rocketrounds",6)
	TNT1 A 0 A_takeinventory("GLammo",6)
	TNT1 A 0 A_takeinventory("Hellishmissilelauncher",1)
	TNT1 A 0 A_takeinventory("Plasma_gun",1)
	TNT1 A 0 A_takeinventory("plasmaammo",50)
	TNT1 A 0 A_takeinventory("PlasmaLance",1)
	TNT1 A 0 A_takeinventory("PlasmaLanceammo",50)
	TNT1 A 0 A_takeinventory("ammocell",600)
	TNT1 A 0 A_takeinventory("BFG11k",1)
	TNT1 A 0 A_takeinventory("FlameCannon",1)
	TNT1 A 0 A_takeinventory("Flamethrower2",1)
	TNT1 A 0 A_takeinventory("GASAMMO",600)
	TNT1 A 0 A_takeinventory("grenadeammo",10)
	TNT1 A 0 A_takeinventory("PROXBOMBammo",10)
	TNT1 A 0 A_takeinventory("hellfireammo",10)
	TNT1 A 0 A_takeinventory("acidmistammo",10)
	TNT1 A 0 A_takeinventory("minihellrocketammo",100)
	TNT1 A 0 A_takeinventory("Unmaker",1)
	TNT1 A 0 A_takeinventory("clip1",600)
	TNT1 A 0 A_giveinventory("brutalpistol",1)
	TNT1 A 0 A_giveinventory("clip1",30)
	TNT1 A 0 A_giveinventory("bdpistolammo",15)
	TNT1 A 0 A_giveinventory("pistoldurability",100)
	Stop
	}
}

//////////
//TAKERS
/////////

Actor SMGtaker : CustomInventory
{
	+Inventory.QUIET
	States
	{
 Spawn:
	TNT1 A 0
	TNT1 A 300
	Stop
	
 Pickup:
	TNT1 A 0 A_JumpIfInventory("Submachinegunselected",1,2)
	TNT1 A 0 A_JumpIfInventory("BrutalSMG",1,"Checkchances")
	TNT1 A 0 A_remove(AAPTR_DEFAULT)
	Stop

	Checkchances:
	TNT1 A 0 a_jumpif(GetCvar("Equiplossmode") == 0,"LowLoss")
	TNT1 A 0 a_jumpif(GetCvar("Equiplossmode") == 1,"StandardLoss")
	TNT1 A 0 a_jumpif(GetCvar("Equiplossmode") == 2,"HighLoss")
	stop
	
	lowloss:
	TNT1 A 0 a_jump(240, 1)
	goto Loss
	TNT1 A 0
	stop
	
	Standardloss:
	TNT1 A 0 a_jump(210, 1)
	goto Loss
	TNT1 A 0
	stop
	
	Highloss:
	TNT1 A 0 a_jump(150, 1)
	goto Loss
	TNT1 A 0
	stop
	
	
 Loss:
	TNT1 A 0
	TNT1 A 1 A_JumpIfInventory("saveweapon",1,"Safe")
	TNT1 A 0 A_JumpIfInventory("smgdurability",1,1)
	goto Rip
	TNT1 A 0 A_JumpIF(GetCVAR("firearmsdurability") == 0, 3)
	TNT1 A 0 A_Log("\cNYour \ciSMG  \cNfired a bullet too much and its mechanism gave up. Just like you with your life.")
	TNT1 A 0 A_TakeInventory("SMGDURABILITY",300)
	Stop
	TNT1 A 0 A_Log("\cNYour \cgSMG  \cNfired a bullet too much and its mechanism gave up. Just like you with your life.")
	goto Rip+1
	
 Safe:
	TNT1 A 0
 	TNT1 A 0 A_Log("\cN You were about to lose your \cqSMG \cN , but your \cqBACKPACK \cN kept it safe!")
	TNT1 A 0 A_TakeInventory("saveweapon",1)
	Stop
	
	Rip:
	TNT1 A 0 A_Log("\cNYour \cgSMG  \cN was already in a bad shape before, but now it's literally destroyed.")
	TNT1 A 0 A_TakeInventory("BrutalSMG",1)
	TNT1 A 0 A_TakeInventory("BDSMGAmmo",41)
	Stop
	}
}

Actor Shotguntaker : CustomInventory
{
	+INVENTORY.QUIET
	States
	{
 Spawn:
	TNT1 A 0
	TNT1 A 300
	Stop
	
 Pickup:
	TNT1 A 0 A_JumpIfInventory("ShotGunSelected",1,2)
	TNT1 A 0 A_JumpIfInventory("Shot_Gun",1,"Checkchances")
	TNT1 A 0 A_remove(AAPTR_DEFAULT)
	Stop
	
	Checkchances:
	TNT1 A 0 a_jumpif(GetCvar("Equiplossmode") == 0,"LowLoss")
	TNT1 A 0 a_jumpif(GetCvar("Equiplossmode") == 1,"StandardLoss")
	TNT1 A 0 a_jumpif(GetCvar("Equiplossmode") == 2,"HighLoss")
	stop
	
	lowloss:
	TNT1 A 0 a_jump(240, 1)
	goto Loss
	TNT1 A 0
	stop
	
	Standardloss:
	TNT1 A 0 a_jump(210, 1)
	goto Loss
	TNT1 A 0
	stop
	
	Highloss:
	TNT1 A 0 a_jump(150, 1)
	goto Loss
	TNT1 A 0
	stop
	
 Loss:
	TNT1 A 0
	TNT1 A 1 A_JumpIfInventory("saveweapon",1,"Safe")
	TNT1 A 0 A_JumpIfInventory("shotgundurability",1,1)
	goto Rip
	TNT1 A 0 A_JumpIF(GetCVAR("firearmsdurability") == 0, 3)
	TNT1 A 0 A_Log("\cNYour trusted \ciSHOTGUN  \cNfailed you. With it malfunctioning, You'll have to either repair it, or find a new one.")
	TNT1 A 0 A_TakeInventory("ShotGunDURABILITY",100)
	Stop
	TNT1 A 0 A_Log("\cNYour trusted \cgSHOTGUN  \cNfailed you. With it malfunctioning, You'll have to think of some new options.")
	goto Rip+1
	
Safe:
	TNT1 A 0
 	TNT1 A 0 A_Log("\cN You were about to lose your \cqSHOTGUN \cN , but your \cqBACKPACK \cN kept it safe!")
	TNT1 A 0 A_TakeInventory("saveweapon",1)
	Stop
	
	Rip:
	TNT1 A 0 A_Log("\cNYour \cgSHOTGUN  \cN was already in a bad shape, but now it's literally destroyed.")
	TNT1 A 0 A_TakeInventory("Shot_gun",1)
	TNT1 A 0 A_TakeInventory("ShotgunAmmo",9)
	Stop
	
	}
}

Actor SSGtaker : CustomInventory
{
	+Inventory.QUIET
	States
	{
 Spawn:
	TNT1 A 0
	TNT1 A 300
	Stop
	
 Pickup:
	TNT1 A 0 A_JumpIfInventory("SSGSelected",1,2)
	TNT1 A 0 A_JumpIfInventory("SSG",1,"Checkchances")
	TNT1 A 0 A_remove(AAPTR_DEFAULT)
	Stop
	
	Checkchances:
	TNT1 A 0 a_jumpif(GetCvar("Equiplossmode") == 0,"LowLoss")
	TNT1 A 0 a_jumpif(GetCvar("Equiplossmode") == 1,"StandardLoss")
	TNT1 A 0 a_jumpif(GetCvar("Equiplossmode") == 2,"HighLoss")
	stop
	
	lowloss:
	TNT1 A 0 a_jump(240, 1)
	goto Loss
	TNT1 A 0
	stop
	
	Standardloss:
	TNT1 A 0 a_jump(210, 1)
	goto Loss
	TNT1 A 0
	stop
	
	Highloss:
	TNT1 A 0 a_jump(150, 1)
	goto Loss
	TNT1 A 0
	stop
	
 Loss:
	TNT1 A 0
	TNT1 A 1 A_JumpIfInventory("saveweapon",1,"Safe")
	TNT1 A 0 A_JumpIfInventory("ssgdurability",1,1)
	goto Rip
	TNT1 A 0 A_JumpIF(GetCVAR("firearmsdurability") == 0, 3)
	TNT1 A 0 A_Log("\cNThe \ci AKRAFENA SHOTGUN  \cN you were carrying looks withered and fireless. You need to feed it some blood if you want to keep using it.")
	TNT1 A 0 A_TakeInventory("SSGDURABILITY",150)
	Stop
	TNT1 A 0 A_Log("\cNThe \cg AKRAFENA SHOTGUN  \cN you were carrying looks withered and fireless. Did you forget to feed it? Man I hope you never own pets.")
	goto Rip+1

Safe:
	TNT1 A 0
 	TNT1 A 0 A_Log("\cN You were about to lose your \cqAKRAFENA SHOTGUN \cN , but your \cqBACKPACK \cN kept it safe!")
	TNT1 A 0 A_TakeInventory("saveweapon",1)
	Stop
	
	Rip:
	TNT1 A 0 A_Log("\cNYour \cgAKRAFENA SHOTGUN \cN was already in a bad shape, but now it's literally destroyed.")
	TNT1 A 0 A_TakeInventory("SSG",1)
	TNT1 A 0 A_TakeInventory("SsgAmmo",2)
	Stop
	
	}
}

Actor RifleTaker : CustomInventory
{
	+Inventory.QUIET
	States
	{
 Spawn:
	TNT1 A 0
	TNT1 A 300
	Stop
	
Pickup:
	TNT1 A 0 A_JumpIfInventory("RIFLESelected",1,2)
	TNT1 A 0 A_JumpIfInventory("LiTRifle",1,"Checkchances")
	TNT1 A 0 A_remove(AAPTR_DEFAULT)
	Stop
	
	Checkchances:
	TNT1 A 0 a_jumpif(GetCvar("Equiplossmode") == 0,"LowLoss")
	TNT1 A 0 a_jumpif(GetCvar("Equiplossmode") == 1,"StandardLoss")
	TNT1 A 0 a_jumpif(GetCvar("Equiplossmode") == 2,"HighLoss")
	stop
	
	lowloss:
	TNT1 A 0 a_jump(240, 1)
	goto Loss
	TNT1 A 0
	stop
	
	Standardloss:
	TNT1 A 0 a_jump(210, 1)
	goto Loss
	TNT1 A 0
	stop
	
	Highloss:
	TNT1 A 0 a_jump(150, 1)
	goto Loss
	TNT1 A 0
	stop
	
 Loss:
	TNT1 A 0
	TNT1 A 1 A_JumpIfInventory("saveweapon",1,"Safe")
	TNT1 A 0 A_JumpIfInventory("rifledurability",1,1)
	goto Rip
	TNT1 A 0 A_JumpIF(GetCVAR("firearmsdurability") == 0, 3)
	TNT1 A 0 A_Log("\cNThese UAC guys don't know what a real \ciRIFLE  \cNis. The fancy one you were equipped with is falling into pieces. Repair it ASAP!")
	TNT1 A 0 A_TakeInventory("RifleDURABILITY",250)
	Stop
	TNT1 A 0 A_Log("\cNThese UAC guys don't know what a real \cgRIFLE  \cNis. The fancy one you were equipped with it has fallen into pieces.")
	goto Rip+1

Safe:
	TNT1 A 0
 	TNT1 A 0 A_Log("\cN You were about to lose your \cqRIFLE \cN , but your \cqBACKPACK \cN kept it safe!")
	TNT1 A 0 A_TakeInventory("saveweapon",1)
	Stop
	
Rip:
	TNT1 A 0 A_Log("\cNYour \cgRIFLE  \cN was already in a bad shape, but now it's literally destroyed, along with all its components.")
	TNT1 A 0 A_TakeInventory("LitRifle",1)
		BADF A 0 A_Takeinventory("plasmaenhancermounted",1)
		BADF A 0 A_Takeinventory("plasmaenhancedrifle",1)
		BADF A 0 A_Takeinventory("plasmacharges",30)
	TNT1 A 0 A_TakeInventory("RifleAmmo",31)
	Stop
	}
}

Actor AssaultShotgunTaker : CustomInventory
{
	+Inventory.QUIET
	States
	{
 Spawn:
	TNT1 A 0
	TNT1 A 300
	Stop
	
Pickup:
	TNT1 A 0 A_JumpIfInventory("AUTOSHOTUNLOADED", 1, 3)
	TNT1 A 0 A_JumpIfInventory("ASGSelected",1,2)
	TNT1 A 0 A_JumpIfInventory("AssaultShotgun",1,"Checkchances")
	TNT1 A 0 A_remove(AAPTR_DEFAULT)
	Stop
	
	Checkchances:
	TNT1 A 0 a_jumpif(GetCvar("Equiplossmode") == 0,"LowLoss")
	TNT1 A 0 a_jumpif(GetCvar("Equiplossmode") == 1,"StandardLoss")
	TNT1 A 0 a_jumpif(GetCvar("Equiplossmode") == 2,"HighLoss")
	stop
	
	lowloss:
	TNT1 A 0 a_jump(220, 1)
	goto Loss
	TNT1 A 0
	stop
	
	Standardloss:
	TNT1 A 0 a_jump(195, 1)
	goto Loss
	TNT1 A 0
	stop
	
	Highloss:
	TNT1 A 0 a_jump(135, 1)
	goto Loss
	TNT1 A 0
	stop
	
 Loss:
	TNT1 A 0
	TNT1 A 1 A_JumpIfInventory("saveweapon",1,"Safe")
	TNT1 A 0 A_JumpIfInventory("asgdurability",1,1)
	goto Rip
	TNT1 A 0 A_JumpIF(GetCVAR("firearmsdurability") == 0, 4)
	TNT1 A 0 A_Log("\cNLooks like the ammo drum of your \ciASSAULT SHOTGUN  \cNgot forever stuck in place and the trigger is not working. You can't use it anymore... along with the shells you previously loaded in it. OH YEAH!")
	TNT1 A 0 A_TakeInventory("ASGDURABILITY",150)
	TNT1 A 0 A_TakeInventory("JAMMEDASG",1)
	Stop
	TNT1 A 0 A_Log("\cNLooks like your \cgASSAULT SHOTGUN  \cNwill never assault anything anymore. Farewell, soldier.")
	goto Rip+1
	
Safe:
	TNT1 A 0
 	TNT1 A 0 A_Log("\cN You were about to lose your \cqASSAULT SHOTGUN\cN , but your \cqBACKPACK \cN kept it safe!")
	TNT1 A 0 A_TakeInventory("saveweapon",1)
	Stop
	
	Rip:
	TNT1 A 0 A_Log("\cNYour \cgASSAULT SHOTGUN  \cN was already in a bad shape, but now it's literally destroyed.")
	TNT1 A 0 A_TakeInventory("AssaultShotgun",1)
	TNT1 A 0 A_TakeInventory("AssaultShotgunAmmo",20)
	Stop
	}
}

Actor MinigunTaker : CustomInventory
{
	+Inventory.QUIET
	States
	{
 Spawn:
	TNT1 A 0
	TNT1 A 300
	Stop
	
Pickup:
	TNT1 A 0 A_JumpIfInventory("MINIGUNSelected",1,2)
	TNT1 A 0 A_JumpIfInventory("Minigun",1,"Checkchances")
	TNT1 A 0 A_remove(AAPTR_DEFAULT)
	Stop
	
	Checkchances:
	TNT1 A 0 a_jumpif(GetCvar("Equiplossmode") == 0,"LowLoss")
	TNT1 A 0 a_jumpif(GetCvar("Equiplossmode") == 1,"StandardLoss")
	TNT1 A 0 a_jumpif(GetCvar("Equiplossmode") == 2,"HighLoss")
	stop
	
	lowloss:
	TNT1 A 0 a_jump(235, 1)
	goto Loss
	TNT1 A 0
	stop
	
	Standardloss:
	TNT1 A 0 a_jump(200, 1)
	goto Loss
	TNT1 A 0
	stop
	
	Highloss:
	TNT1 A 0 a_jump(150, 1)
	goto Loss
	TNT1 A 0
	stop
	
 Loss:
	TNT1 A 0
	TNT1 A 1 A_JumpIfInventory("saveweapon",1,"Safe")
	TNT1 A 0 A_JumpIfInventory("minigundurability",1,1)
	goto Rip
	TNT1 A 0 A_JumpIF(GetCVAR("firearmsdurability") == 0, 3)
	TNT1 A 0 A_Log("\cNSomething got stuck between your \ciMINIGUN  \cNbarrels. Maybe a missing part of a demon from the last location. Either way, you can't get it out. You may have to leave the weapon behind. Well, at least you saved the ammo strap.")
	TNT1 A 0 A_TakeInventory("Minigundurability",600)
	Stop
	TNT1 A 0 A_Log("\cNSomething got stuck between your \cgMINIGUN  \cNbarrels. Maybe a missing part of a demon from the last location. Either way, you can't get it out. You may have to leave the weapon behind. Well, at least you saved the ammo strap.")
	goto Rip+1
	
 Safe:
	TNT1 A 0
 	TNT1 A 0 A_Log("\cN You were about to lose your \cqMINIGUN \cN , but your \cqBACKPACK \cN kept it safe!")
	TNT1 A 0 A_TakeInventory("saveweapon",1)
	Stop
	
	Rip:
	TNT1 A 0 A_Log("\cNYour \cgMINIGUN  \cN was already in a bad shape, but now it's literally destroyed.")
	TNT1 A 0 A_TakeInventory("Minigun",1)
	Stop
	}
}

Actor MachinegunTaker : CustomInventory
{
	+Inventory.QUIET
	States
	{
 Spawn:
	TNT1 A 0
	TNT1 A 300
	Stop
	
Pickup:
	TNT1 A 0 A_JumpIfInventory("LMGSelected",1,2)
	TNT1 A 0 A_JumpIfInventory("Machinegun",1,"Checkchances")
	TNT1 A 0 A_remove(AAPTR_DEFAULT)
	Stop
	
	Checkchances:
	TNT1 A 0 a_jumpif(GetCvar("Equiplossmode") == 0,"LowLoss")
	TNT1 A 0 a_jumpif(GetCvar("Equiplossmode") == 1,"StandardLoss")
	TNT1 A 0 a_jumpif(GetCvar("Equiplossmode") == 2,"HighLoss")
	stop
	
	lowloss:
	TNT1 A 0 a_jump(240, 1)
	goto Loss
	TNT1 A 0
	stop
	
	Standardloss:
	TNT1 A 0 a_jump(210, 1)
	goto Loss
	TNT1 A 0
	stop
	
	Highloss:
	TNT1 A 0 a_jump(150, 1)
	goto Loss
	TNT1 A 0
	stop
	
 Loss:
	TNT1 A 0
	TNT1 A 1 A_JumpIfInventory("saveweapon",1,"Safe")
	TNT1 A 0 A_JumpIfInventory("lmgdurability",1,1)
	goto Rip
	TNT1 A 0 A_JumpIF(GetCVAR("firearmsdurability") == 0, 3)
	TNT1 A 0 A_Log("\cNYour \ciHEAVY MACHINEGUN  \cNwas wounded in action by some demon's attack during last battle. Doc, can you save it?")
	TNT1 A 0 A_TakeInventory("LMGDURABILITY",300)
	Stop
	TNT1 A 0 A_Log("\cNYour \cgHEAVY MACHINEGUN  \cNwas killed in action by some demon's attack during last battle. R.I.P.")
	goto Rip+1
	
Safe:
	TNT1 A 0
 	TNT1 A 0 A_Log("\cN You were about to lose your \cqHEAVY MACHINEGUN \cN , but your \cqBACKPACK \cN kept it safe!")
	TNT1 A 0 A_TakeInventory("saveweapon",1)
	Stop
	
	Rip:
	TNT1 A 0 A_Log("\cNYour \cgHEAVY MACHINEGUN  \cN was already in a bad shape, but now it's literally destroyed.")
	TNT1 A 0 A_TakeInventory("MACHINEGUN",1)
	TNT1 A 0 A_TakeInventory("LMGAMMO",100)
	Stop
	}
}

Actor GrenadeLauncherTaker : CustomInventory
{
	+Inventory.QUIET
	States
	{
 Spawn:
	TNT1 A 0
	TNT1 A 300
	Stop
	
Pickup:
	TNT1 A 0 A_JumpIfInventory("GRENADELAUNCHERSelected",1,2)
	TNT1 A 0 A_JumpIfInventory("GrenadeLauncher",1,"Checkchances")
	TNT1 A 0 A_remove(AAPTR_DEFAULT)
	Stop
	
	Checkchances:
	TNT1 A 0 a_jumpif(GetCvar("Equiplossmode") == 0,"LowLoss")
	TNT1 A 0 a_jumpif(GetCvar("Equiplossmode") == 1,"StandardLoss")
	TNT1 A 0 a_jumpif(GetCvar("Equiplossmode") == 2,"HighLoss")
	stop
	
	lowloss:
	TNT1 A 0 a_jump(240, 1)
	goto Loss
	TNT1 A 0
	stop
	
	Standardloss:
	TNT1 A 0 a_jump(210, 1)
	goto Loss
	TNT1 A 0
	stop
	
	Highloss:
	TNT1 A 0 a_jump(150, 1)
	goto Loss
	TNT1 A 0
	stop
	
 Loss:
	TNT1 A 0
	TNT1 A 1 A_JumpIfInventory("saveweapon",1,"Safe")
	TNT1 A 0 A_JumpIfInventory("gldurability",1,1)
	goto Rip
	TNT1 A 0 A_JumpIF(GetCVAR("firearmsdurability") == 0, 3)
	TNT1 A 0 A_Log("\cNThe \ciGRENADE LAUNCHER  \cNyou were carrying seems to be about to split open. You better fix it before you attempt shooting anything dangerous with it...")
	TNT1 A 0 A_TakeInventory("GLdurability",100)
	Stop
	TNT1 A 0 A_Log("\cNThe \cgGRENADE LAUNCHER  \cNyou were carrying seems to be split open... for good. Say bye-bye to the poor thing.")
	goto Rip+1
	
Safe:
	TNT1 A 0
 	TNT1 A 0 A_Log("\cN You were about to lose your \cqGRENADE LAUNCHER \cN , but your \cqBACKPACK \cN kept it safe!")
	TNT1 A 0 A_TakeInventory("saveweapon",1)
	Stop
	
Rip:
	TNT1 A 0 A_Log("\cNYour \cgGRENADE LAUNCHER  \cN was already in a bad shape, but now it's literally destroyed.")
	TNT1 A 0 A_TakeInventory("GrenadeLauncher",1)
	TNT1 A 0 A_TakeInventory("GLammo",6)
	Stop
	}
}

Actor RocketTaker : CustomInventory
{
	+Inventory.QUIET
	States
	{
 Spawn:
	TNT1 A 0
	TNT1 A 300
	Stop
	
Pickup:
	TNT1 A 0 A_JumpIfInventory("ROCKETLAUNCHERSelected",1,2)
	TNT1 A 0 A_JumpIfInventory("Rocket_Launcher",1,"Checkchances")
	TNT1 A 0 A_remove(AAPTR_DEFAULT)
	Stop
	
	Checkchances:
	TNT1 A 0 a_jumpif(GetCvar("Equiplossmode") == 0,"LowLoss")
	TNT1 A 0 a_jumpif(GetCvar("Equiplossmode") == 1,"StandardLoss")
	TNT1 A 0 a_jumpif(GetCvar("Equiplossmode") == 2,"HighLoss")
	stop
	
	lowloss:
	TNT1 A 0 a_jump(240, 1)
	goto Loss
	TNT1 A 0
	stop
	
	Standardloss:
	TNT1 A 0 a_jump(210, 1)
	goto Loss
	TNT1 A 0
	stop
	
	Highloss:
	TNT1 A 0 a_jump(150, 1)
	goto Loss
	TNT1 A 0
	stop
	
 Loss:
	TNT1 A 0
	TNT1 A 1 A_JumpIfInventory("saveweapon",1,"Safe")
	TNT1 A 0 A_JumpIfInventory("rldurability",1,1)
	goto Rip
	TNT1 A 0 A_JumpIF(GetCVAR("firearmsdurability") == 0, 3)
	TNT1 A 0 A_Log("\cNLooks like your \ciROCKET LAUNCHER  \cNhad a taste of his own medicine. In its current condition, it won't endure one more of its own rockets.")
	TNT1 A 0 A_TakeInventory("RLdurability",100)
	Stop
	TNT1 A 0 A_Log("\cNLooks like your \cgROCKET LAUNCHER  \cNhad a taste of his own medicine. In its current condition, it's just a pile of scrap metal.")
	goto Rip+1


Safe:
	TNT1 A 0
 	TNT1 A 0 A_Log("\cN You were about to lose your \cqROCKET LAUNCHER \cN , but your \cqBACKPACK \cN kept it safe!")
	TNT1 A 0 A_TakeInventory("saveweapon",1)
	Stop

Rip:
	TNT1 A 0 A_Log("\cNYour \cgROCKET LAUNCHER  \cN was already in a bad shape, but now it's literally destroyed.")
	TNT1 A 0 A_TakeInventory("Rocket_Launcher",1)
	TNT1 A 0 A_TakeInventory("RocketRounds",1)
	Stop
	}
}

Actor PlasmaTaker : CustomInventory
{
	+Inventory.QUIET
	States
	{
 Spawn:
	TNT1 A 0
	TNT1 A 300
	Stop
	
Pickup:
	TNT1 A 0 A_JumpIfInventory("PLASMAGUNSelected",1,2)
	TNT1 A 0 A_JumpIfInventory("Plasma_Gun",1,"Checkchances")
	TNT1 A 0 A_remove(AAPTR_DEFAULT)
	Stop
	
	Checkchances:
	TNT1 A 0 a_jumpif(GetCvar("Equiplossmode") == 0,"LowLoss")
	TNT1 A 0 a_jumpif(GetCvar("Equiplossmode") == 1,"StandardLoss")
	TNT1 A 0 a_jumpif(GetCvar("Equiplossmode") == 2,"HighLoss")
	stop
	
	lowloss:
	TNT1 A 0 a_jump(220, 1)
	goto Loss
	TNT1 A 0
	stop
	
	Standardloss:
	TNT1 A 0 a_jump(190, 1)
	goto Loss
	TNT1 A 0
	stop
	
	Highloss:
	TNT1 A 0 a_jump(140, 1)
	goto Loss
	TNT1 A 0
	stop
	
 Loss:
	TNT1 A 0
	TNT1 A 1 A_JumpIfInventory("saveweapon",1,"Safe")
	TNT1 A 0 A_JumpIfInventory("plasmadurability",1,1)
	goto Rip
	TNT1 A 0 A_JumpIF(GetCVAR("firearmsdurability") == 0, 3)
	TNT1 A 0 A_Log("\cNI don't like the noise coming from your \ciPLASMA GUN \cN. I hope you know enough about this sort of science mumbo-jumbo to fix it, before it blows up in your face. ")
	TNT1 A 0 A_TakeInventory("Plasmadurability",200)
	Stop
	TNT1 A 0 A_Log("\cNI don't know man, it seems broken to me. Your \cgPLASMA GUN \cN, I mean. You better get rid of it before it explodes in your face. No, you can't toss it at your enemies like a grenade, this is not Borderlands.")
	goto Rip+1

Safe:
	TNT1 A 0
 	TNT1 A 0 A_Log("\cN You were about to lose your \cqPLASMA GUN \cN , but your \cqBACKPACK \cN kept it safe!")
	TNT1 A 0 A_TakeInventory("saveweapon",1)
	Stop
	
Rip:
	TNT1 A 0 A_Log("\cNYour \cgPLASMA GUN  \cN was already in a bad shape, but now it's literally destroyed.")
	TNT1 A 0 A_TakeInventory("Plasma_GUn",1)
	TNT1 A 0 A_TakeInventory("PlasmaAmmo",50)
	Stop
	}
}

Actor BFGTaker : CustomInventory
{
	+Inventory.QUIET
	States
	{
 Spawn:
	TNT1 A 0
	TNT1 A 300
	Stop
	
Pickup:
	TNT1 A 0 A_JumpIfInventory("BFG11KSelected",1,2)
	TNT1 A 0 A_JumpIfInventory("BFG11k",1,"Checkchances")
	TNT1 A 0 A_remove(AAPTR_DEFAULT)
	Stop
	
	Checkchances:
	TNT1 A 0 a_jumpif(GetCvar("Equiplossmode") == 0,"LowLoss")
	TNT1 A 0 a_jumpif(GetCvar("Equiplossmode") == 1,"StandardLoss")
	TNT1 A 0 a_jumpif(GetCvar("Equiplossmode") == 2,"HighLoss")
	stop
	
	lowloss:
	TNT1 A 0 a_jump(220, 1)
	goto Loss
	TNT1 A 0
	stop
	
	Standardloss:
	TNT1 A 0 a_jump(190, 1)
	goto Loss
	TNT1 A 0
	stop
	
	Highloss:
	TNT1 A 0 a_jump(140, 1)
	goto Loss
	TNT1 A 0
	stop
	
 Loss:
	TNT1 A 0
	TNT1 A 1 A_JumpIfInventory("saveweapon",1,"Safe")
	TNT1 A 0 A_JumpIfInventory("bfg11kdurability",1,1)
	goto Rip
	TNT1 A 0 A_JumpIF(GetCVAR("firearmsdurability") == 0, 3)
	TNT1 A 0 A_Log("\cNUh... I don't want to be the bringer of bad news but your \ci BFG-11000 \cN, is looking like it's seen better days. You had a plan B, didn't you? Didn't you?")
	TNT1 A 0 A_TakeInventory("BFG11kdurability",600)
	Stop
	TNT1 A 0 A_Log("\cNOh god, maybe... maybe you'll want to sit down before taking this one... Your \cg BFG-11000 \cN, is gone dude, broken, lost, dead, kaput, sayonara. Nothing you can do about it. Come on, come on don't cry... I know it's hard.")
	goto Rip+1
	
Safe:
	TNT1 A 0
 	TNT1 A 0 A_Log("\cN You were about to lose your \cqBFG-11000 \cN , but your \cqBACKPACK \cN kept it safe!")
	TNT1 A 0 A_TakeInventory("saveweapon",1)
	Stop
	
Rip:
	TNT1 A 0 A_Log("\cNYour \cgBFG-11000  \cN was already in a bad shape, but now it's literally destroyed.")
	TNT1 A 0 A_TakeInventory("BFG11k",1)
	Stop
	}
}

Actor ShellTaker : CustomInventory
{
	+Inventory.QUIET
	States
	{
 Spawn:
	TNT1 A 0
	TNT1 A 300
	Stop
	
Pickup:
	TNT1 A 0 A_JumpIfInventory("AmmoShell",1,"Checkchances")
	TNT1 A 0 A_JumpIfInventory("Ammoslug",1,"Checkchances")
	TNT1 A 0 A_remove(AAPTR_DEFAULT)
	Stop
	
	Checkchances:
	TNT1 A 0 a_jumpif(GetCvar("Equiplossmode") == 0,"LowLoss")
	TNT1 A 0 a_jumpif(GetCvar("Equiplossmode") == 1,"StandardLoss")
	TNT1 A 0 a_jumpif(GetCvar("Equiplossmode") == 2,"HighLoss")
	stop
	
	lowloss:
	TNT1 A 0 a_jump(220, 1)
	goto Loss
	TNT1 A 0
	stop
	
	Standardloss:
	TNT1 A 0 a_jump(180, 1)
	goto Loss
	TNT1 A 0
	stop
	
	Highloss:
	TNT1 A 0 a_jump(140, 1)
	goto Loss
	TNT1 A 0
	stop
	
 Loss:
	TNT1 A 0
	TNT1 A 1 A_JumpIfInventory("saveammo",1,"Safe")
	TNT1 A 0 A_Log("\cN One of your ammo belts fell off while moving here without you noticing. It was the one holding your \cgSHOTGUN SHELLS AND SLUGS. \cN,Well, too late to go back now.")
	TNT1 A 0 A_TakeInventory("AmmoShell",30)
	TNT1 A 0 A_TakeInventory("AmmoSlug",8)
	Stop
	
Safe:
	TNT1 A 0
 	TNT1 A 0 A_Log("\cN You were about to lose your \cqSHELLS AND SLUGS \cN , but your \cqBANDOLIER \cN kept them safe!")
	TNT1 A 0 A_TakeInventory("saveammo",1)
	Stop
	}
}

Actor Clip1Taker : CustomInventory
{
	+Inventory.QUIET
	States
	{
 Spawn:
	TNT1 A 0
	TNT1 A 300
	Stop
	
Pickup:
	TNT1 A 0 A_JumpIfInventory("Clip1",1,"Checkchances")
	TNT1 A 0 A_remove(AAPTR_DEFAULT)
	Stop
	
	Checkchances:
	TNT1 A 0 a_jumpif(GetCvar("Equiplossmode") == 0,"LowLoss")
	TNT1 A 0 a_jumpif(GetCvar("Equiplossmode") == 1,"StandardLoss")
	TNT1 A 0 a_jumpif(GetCvar("Equiplossmode") == 2,"HighLoss")
	stop
	
	lowloss:
	TNT1 A 0 a_jump(220, 1)
	goto Loss
	TNT1 A 0
	stop
	
	Standardloss:
	TNT1 A 0 a_jump(180, 1)
	goto Loss
	TNT1 A 0
	stop
	
	Highloss:
	TNT1 A 0 a_jump(140, 1)
	goto Loss
	TNT1 A 0
	stop
	
 Loss:
	TNT1 A 0
	TNT1 A 1 A_JumpIfInventory("saveammo",1,"Safe")
	TNT1 A 0 A_Log("\cN It looks like the large pocket where you kept your \cg 9MM CALIBER AMMUNITIONS \cNhas an hole in it, and they are nowhere to be found. It also looks like you are gonna deal with it.")
	TNT1 A 0 A_TakeInventory("Clip1",200)
	Stop
	
Safe:
	TNT1 A 0
 	TNT1 A 0 A_Log("\cN You were about to lose your \cq9MM CALIBER AMMUNITIONS \cN , but your \cqBANDOLIER \cN kept them safe!")
	TNT1 A 0 A_TakeInventory("saveammo",1)
	Stop
	}
}


Actor 50Taker : CustomInventory
{
	+Inventory.QUIET
	States
	{
 Spawn:
	TNT1 A 0
	TNT1 A 300
	Stop
	
Pickup:
	TNT1 A 0 A_JumpIfInventory("50ammo",1,"Checkchances")
	TNT1 A 0 A_remove(AAPTR_DEFAULT)
	Stop
	
	Checkchances:
	TNT1 A 0 a_jumpif(GetCvar("Equiplossmode") == 0,"LowLoss")
	TNT1 A 0 a_jumpif(GetCvar("Equiplossmode") == 1,"StandardLoss")
	TNT1 A 0 a_jumpif(GetCvar("Equiplossmode") == 2,"HighLoss")
	stop
	
	lowloss:
	TNT1 A 0 a_jump(220, 1)
	goto Loss
	TNT1 A 0
	stop
	
	Standardloss:
	TNT1 A 0 a_jump(180, 1)
	goto Loss
	TNT1 A 0
	stop
	
	Highloss:
	TNT1 A 0 a_jump(140, 1)
	goto Loss
	TNT1 A 0
	stop
	
 Loss:
	TNT1 A 0
	TNT1 A 1 A_JumpIfInventory("saveammo",1,"Safe")
	TNT1 A 0 A_Log("\cN Sometime recently, your \cg.50 S&W bullets \cN have been crushed and bent by some serious amount of force. Nice of them to have absorbed the impact instead of you, but now you can't use them anymore.")
	TNT1 A 0 A_TakeInventory("50ammo",30)
	Stop
	
Safe:
	TNT1 A 0
 	TNT1 A 0 A_Log("\cN You were about to lose your \cq .50 S&W bullets \cN , but your \cqBANDOLIER \cN kept them safe!")
	TNT1 A 0 A_TakeInventory("saveammo",1)
	Stop
	}
}

Actor 473Taker : CustomInventory
{
	+Inventory.QUIET
	States
	{
 Spawn:
	TNT1 A 0
	TNT1 A 300
	Stop
	
Pickup:
	TNT1 A 0 A_JumpIfInventory("minigunammo",1,"Checkchances")
	TNT1 A 0 A_remove(AAPTR_DEFAULT)
	Stop
	
	Checkchances:
	TNT1 A 0 a_jumpif(GetCvar("Equiplossmode") == 0,"LowLoss")
	TNT1 A 0 a_jumpif(GetCvar("Equiplossmode") == 1,"StandardLoss")
	TNT1 A 0 a_jumpif(GetCvar("Equiplossmode") == 2,"HighLoss")
	stop
	
	lowloss:
	TNT1 A 0 a_jump(220, 1)
	goto Loss
	TNT1 A 0
	stop
	
	Standardloss:
	TNT1 A 0 a_jump(180, 1)
	goto Loss
	TNT1 A 0
	stop
	
	Highloss:
	TNT1 A 0 a_jump(140, 1)
	goto Loss
	TNT1 A 0
	stop
	
 Loss:
	TNT1 A 0
	TNT1 A 1 A_JumpIfInventory("saveammo",1,"Safe")
	TNT1 A 0 A_Log("\cN In the thick  of the fight your \cg4.73mm CALIBER AMMO \cN got cut and fell off. Sadly, you only noticed now so it's too late to go back and look for it...")
	TNT1 A 0 A_TakeInventory("minigunammo",200)
	Stop
	
Safe:
	TNT1 A 0
 	TNT1 A 0 A_Log("\cN You were about to lose your \cq4.73mm CALIBER AMMO \cN , but your \cqBANDOLIER \cN kept them safe!")
	TNT1 A 0 A_TakeInventory("saveammo",1)
	Stop
	}
}


Actor Clip2Taker : CustomInventory
{
	+Inventory.QUIET
	States
	{
 Spawn:
	TNT1 A 0
	TNT1 A 300
	Stop
	
Pickup:
	TNT1 A 0 A_JumpIfInventory("Clip2",1,"Checkchances")
	TNT1 A 0 A_remove(AAPTR_DEFAULT)
	Stop
	
	Checkchances:
	TNT1 A 0 a_jumpif(GetCvar("Equiplossmode") == 0,"LowLoss")
	TNT1 A 0 a_jumpif(GetCvar("Equiplossmode") == 1,"StandardLoss")
	TNT1 A 0 a_jumpif(GetCvar("Equiplossmode") == 2,"HighLoss")
	stop
	
	lowloss:
	TNT1 A 0 a_jump(220, 1)
	goto Loss
	TNT1 A 0
	stop
	
	Standardloss:
	TNT1 A 0 a_jump(180, 1)
	goto Loss
	TNT1 A 0
	stop
	
	Highloss:
	TNT1 A 0 a_jump(140, 1)
	goto Loss
	TNT1 A 0
	stop
	
 Loss:
	TNT1 A 0
	TNT1 A 1 A_JumpIfInventory("saveammo",1,"Safe")
	TNT1 A 0 A_Log("\cN A box where you stored your \cg7.62mm CALIBER AMMO \cN fell off the belts that kept it secured to your armor. You haven't anythng to replace those belts right now, so I guess it's time to say it farewell.")
	TNT1 A 0 A_TakeInventory("Clip2",200)
	Stop
	
Safe:
	TNT1 A 0
 	TNT1 A 0 A_Log("\cN You were about to lose your \cq7.62mm CALIBER AMMO \cN , but your \cqBANDOLIER \cN kept them safe!")
	TNT1 A 0 A_TakeInventory("saveammo",1)
	Stop
	}
}

Actor MissileTaker : CustomInventory
{
	+Inventory.QUIET
	States
	{
 Spawn:
	TNT1 A 0
	TNT1 A 300
	Stop
	
Pickup:
	TNT1 A 0 A_JumpIfInventory("AmmoRocket",1,"Checkchances")
	TNT1 A 0 A_remove(AAPTR_DEFAULT)
	Stop

Checkchances:
	TNT1 A 0 a_jumpif(GetCvar("Equiplossmode") == 0,"LowLoss")
	TNT1 A 0 a_jumpif(GetCvar("Equiplossmode") == 1,"StandardLoss")
	TNT1 A 0 a_jumpif(GetCvar("Equiplossmode") == 2,"HighLoss")
	stop
	
	lowloss:
	TNT1 A 0 a_jump(240, 1)
	goto Loss
	TNT1 A 0
	stop
	
	Standardloss:
	TNT1 A 0 a_jump(210, 1)
	goto Loss
	TNT1 A 0
	stop
	
	Highloss:
	TNT1 A 0 a_jump(150, 1)
	goto Loss
	TNT1 A 0
	stop
	
 Loss:
	TNT1 A 0
	TNT1 A 1 A_JumpIfInventory("saveweapon",1,"Safe")
	TNT1 A 0 A_Log("\cN Some of the \cgROCKETS\cN you had with you got damaged, and they could explode any moment now. \cN What do you say, should you leave them behind?")
	TNT1 A 0 A_TakeInventory("AmmoRocket",2)
	Stop
	
 Safe:
	TNT1 A 0
	TNT1 A 0 A_Log("\cN You were about to lose some of your \cq7.62 AT ROCKETS \cN , but your \cqBACKPACK \cN kept them safe!")
	Stop
	}
}

Actor GasLoss : CustomInventory
{
	+Inventory.QUIET
	States
	{
 Spawn:
	TNT1 A 0
	TNT1 A 300
	Stop
	
Pickup:
	TNT1 A 0 A_JumpIfInventory("GASAMMO",1,"Checkchances")
	TNT1 A 0 A_JumpIfInventory("GASAMMO",1,"Checkchances")
	TNT1 A 0 A_remove(AAPTR_DEFAULT)
	Stop
	
	Checkchances:
	TNT1 A 0 a_jumpif(GetCvar("Equiplossmode") == 0,"LowLoss")
	TNT1 A 0 a_jumpif(GetCvar("Equiplossmode") == 1,"StandardLoss")
	TNT1 A 0 a_jumpif(GetCvar("Equiplossmode") == 2,"HighLoss")
	stop
	
	lowloss:
	TNT1 A 0 a_jump(225, 1)
	goto Loss
	TNT1 A 0
	stop
	
	Standardloss:
	TNT1 A 0 a_jump(200, 1)
	goto Loss
	TNT1 A 0
	stop
	
	Highloss:
	TNT1 A 0 a_jump(150, 1)
	goto Loss
	TNT1 A 0
	stop
	
 Loss:
	TNT1 A 0
	TNT1 A 0 A_Log("\cN Your \cgFUEL TANKS  \cN were leaking all this time! Luckily, they didn't explode. I hope you brought a spare jerry can...")
	TNT1 A 0 A_TakeInventory("sawfuel",30)
	TNT1 A 0 A_TakeInventory("fueltankammo",70)
	Stop
	}
}

Actor REVOLVERTAKER : CustomInventory
{
	+Inventory.QUIET
	States
	{
 Spawn:
	TNT1 A 0
	TNT1 A 300
	Stop
	
Pickup:
	TNT1 A 0 A_JumpIfInventory("revolverSelected",1,2)
	TNT1 A 0 A_JumpIfInventory("Revolver",1,"Checkchances")
	TNT1 A 0 A_remove(AAPTR_DEFAULT)
	Stop
	
	Checkchances:
	TNT1 A 0 a_jumpif(GetCvar("Equiplossmode") == 0,"LowLoss")
	TNT1 A 0 a_jumpif(GetCvar("Equiplossmode") == 1,"StandardLoss")
	TNT1 A 0 a_jumpif(GetCvar("Equiplossmode") == 2,"HighLoss")
	stop
	
	lowloss:
	TNT1 A 0 a_jump(240, 1)
	goto Loss
	TNT1 A 0
	stop
	
	Standardloss:
	TNT1 A 0 a_jump(210, 1)
	goto Loss
	TNT1 A 0
	stop
	
	Highloss:
	TNT1 A 0 a_jump(150, 1)
	goto Loss
	TNT1 A 0
	stop
	
 Loss:
	TNT1 A 0
	TNT1 A 1 A_JumpIfInventory("saveweapon",1,"Safe")
	TNT1 A 0 A_JumpIfInventory("revolverdurability",1,1)
	goto Rip
	TNT1 A 0 A_JumpIF(GetCVAR("firearmsdurability") == 0, 3)
	TNT1 A 0 A_Log("\cN Your  \ciREVOLVER \cN got damaged, and its dreams to become the fastest in the West are forever shattered. Unless you repair it, that is.")
	TNT1 A 0 A_TakeInventory("revolverdurability",100)
	Stop
	TNT1 A 0 A_Log("\cN Your  \cgREVOLVER \cN got damaged, and its dreams to become the fastest in the West are forever shattered.")
	goto Rip+1
	
Safe:
	TNT1 A 0
 	TNT1 A 0 A_Log("\cN You were about to lose your \cqREVOLVER \cN , but your \cqBACKPACK \cN kept it safe!")
	TNT1 A 0 A_TakeInventory("saveweapon",1)
	Stop
	
Rip:
	TNT1 A 0 A_Log("\cNYour \cgREVOLVER  \cN was already in a bad shape, but now it's literally destroyed.")
	TNT1 A 0 A_TakeInventory("Revolver",1)
	TNT1 A 0 A_TakeInventory("Revolverammo",6)
	Stop
	}
}


Actor RailgunTAKER : CustomInventory
{
	+Inventory.QUIET
	States
	{
 Spawn:
	TNT1 A 0
	TNT1 A 300
	Stop
	
Pickup:
	TNT1 A 0 A_JumpIfInventory("railgunSelected",1,2)
	TNT1 A 0 A_JumpIfInventory("Plasmalance",1,"Checkchances")
	TNT1 A 0 A_remove(AAPTR_DEFAULT)
	Stop
	
	Checkchances:
	TNT1 A 0 a_jumpif(GetCvar("Equiplossmode") == 0,"LowLoss")
	TNT1 A 0 a_jumpif(GetCvar("Equiplossmode") == 1,"StandardLoss")
	TNT1 A 0 a_jumpif(GetCvar("Equiplossmode") == 2,"HighLoss")
	stop
	
	lowloss:
	TNT1 A 0 a_jump(230, 1)
	goto Loss
	TNT1 A 0
	stop
	
	Standardloss:
	TNT1 A 0 a_jump(200, 1)
	goto Loss
	TNT1 A 0
	stop
	
	Highloss:
	TNT1 A 0 a_jump(145, 1)
	goto Loss
	TNT1 A 0
	stop
	
 Loss:
	TNT1 A 0
	TNT1 A 1 A_JumpIfInventory("saveweapon",1,"Safe")
	TNT1 A 0 A_JumpIfInventory("railgundurability",1,1)
	goto Rip
	TNT1 A 0 A_JumpIF(GetCVAR("firearmsdurability") == 0, 3)
	TNT1 A 0 A_Log("\cN Your  \ciPlasma Lance \cN isn't feeling too good. You better not fire that thing unless you are Mr.Stark.")
	TNT1 A 0 A_TakeInventory("RAILGUNdurability",300)
	Stop
	TNT1 A 0 A_Log("\cN Your  \ciPlasma Lance \cN isn't feeling too good. You can feel it turn to dust in your hands. You barely hold your tears. It is a very moving scene.")
	goto Rip+1
	
Safe:
	TNT1 A 0
 	TNT1 A 0 A_Log("\cN You were about to lose your \cqPlasma Lance \cN , but your \cqBACKPACK \cN kept it safe!")
	TNT1 A 0 A_TakeInventory("saveweapon",1)
	Stop

Rip:
	TNT1 A 0 A_Log("\cNYour \cgPlasma Lance  \cN was already in a bad shape, but now it's literally destroyed.")
	TNT1 A 0 A_TakeInventory("PlasmaLance",1)
	TNT1 A 0 A_TakeInventory("PlasmaLanceammo",50)
	Stop
	}
}

Actor FlameTAKER : CustomInventory
{
	+Inventory.QUIET
	States
	{
 Spawn:
	TNT1 A 0
	TNT1 A 300
	Stop
	
Pickup:
	TNT1 A 0 A_JumpIfInventory("FlamethrowerSelected",1,2)
	TNT1 A 0 A_JumpIfInventory("fLAMETHROWER2",1,"Checkchances")
	TNT1 A 0 A_remove(AAPTR_DEFAULT)
	Stop
	
	Checkchances:
	TNT1 A 0 a_jumpif(GetCvar("Equiplossmode") == 0,"LowLoss")
	TNT1 A 0 a_jumpif(GetCvar("Equiplossmode") == 1,"StandardLoss")
	TNT1 A 0 a_jumpif(GetCvar("Equiplossmode") == 2,"HighLoss")
	stop
	
	lowloss:
	TNT1 A 0 a_jump(240, 1)
	goto Loss
	TNT1 A 0
	stop
	
	Standardloss:
	TNT1 A 0 a_jump(210, 1)
	goto Loss
	TNT1 A 0
	stop
	
	Highloss:
	TNT1 A 0 a_jump(150, 1)
	goto Loss
	TNT1 A 0
	stop
	
 Loss:
	TNT1 A 0
	TNT1 A 1 A_JumpIfInventory("saveweapon",1,"Safe")
	TNT1 A 0 A_JumpIfInventory("Flamedurability",1,1)
	goto Rip
	TNT1 A 0 A_JumpIF(GetCVAR("firearmsdurability") == 0, 3)
	TNT1 A 0 A_Log("\cN Your  \ciFLAMETHROWER\cN is not gonna throw anything other than itself off a cliff if you don't repair it. And thank you're still in one piece, because it could've gone much worse.")
	TNT1 A 0 A_TakeInventory("Flamedurability",300)
	Stop
	TNT1 A 0 A_Log("\cN Your  \cgFLAMETHROWER\cN 's tanks exploded. You barely managed to get rid of them before getting caught in the conflagration. Sadly, the weapon didn't make it in time. It will forever live in our hearts.")
	goto Rip+1
	
Safe:
	TNT1 A 0
 	TNT1 A 0 A_Log("\cN You were about to lose your \cqFLAMETHROWER \cN , but your \cqBACKPACK \cN kept it safe!")
	TNT1 A 0 A_TakeInventory("saveweapon",1)
	Stop

Rip:
	TNT1 A 0 A_Log("\cNYour \cgFLAMETHROWER  \cN was already in a bad shape, but now it's literally destroyed.")
	TNT1 A 0 A_TakeInventory("Flamedurability",300)
	TNT1 A 0 A_TakeInventory("Flamethrower2",1)
	TNT1 A 0 A_TakeInventory("FUELTANKAMMO",100)
	Stop
	}
}

Actor Explosivestaker : CustomInventory
{
	+Inventory.QUIET
	States
	{
 Spawn:
	TNT1 A 0
	TNT1 A 300
	stop
	
 Pickup:
	TNT1 A 0 A_JumpIfInventory("juststartedgame",1,6)
	TNT1 A 0 A_JumpIfInventory("grenadeammo",1,"Checkchances")
	TNT1 A 0 A_JumpIfInventory("clusterammo",1,"Checkchances")
	TNT1 A 0 A_JumpIfInventory("proxbombammo",1,"Checkchances")
	TNT1 A 0 A_JumpIfInventory("hellfireammo",1,"Checkchances")
	TNT1 A 0 A_JumpIfInventory("acidmistammo",1,"Checkchances")
	TNT1 A 0 A_remove(AAPTR_DEFAULT)
	Stop
	
	Checkchances:
	TNT1 A 0 a_jumpif(GetCvar("Equiplossmode") == 0,"LowLoss")
	TNT1 A 0 a_jumpif(GetCvar("Equiplossmode") == 1,"StandardLoss")
	TNT1 A 0 a_jumpif(GetCvar("Equiplossmode") == 2,"HighLoss")
	stop
	
	lowloss:
	TNT1 A 0 a_jump(240, 1)
	goto Loss
	TNT1 A 0
	stop
	
	Standardloss:
	TNT1 A 0 a_jump(210, 1)
	goto Loss
	TNT1 A 0
	stop
	
	Highloss:
	TNT1 A 0 a_jump(150, 1)
	goto Loss
	TNT1 A 0
	stop
	
 Loss:
	TNT1 A 0
	TNT1 A 1 A_JumpIfInventory("saveammo",1,"Safe")
	TNT1 A 0 A_Log("\cNWhile fleeing from the last place, one of your bags holding your\ci THROWABLE EXPLOSIVES\cN fell off. Now you can only hope some clueless demon will try to play football with it...")
	TNT1 A 0 A_TakeInventory("grenadeammo",3)
	TNT1 A 0 A_TakeInventory("clusterAmmo",1)
	TNT1 A 0 A_TakeInventory("proxbombammo",1)
	TNT1 A 0 A_TakeInventory("hellfireAmmo",1)
	TNT1 A 0 A_TakeInventory("acidmistAmmo",1)
	Stop

Safe:
	TNT1 A 0
 	TNT1 A 0 A_Log("\cN You were about to lose some of your \cqTHROWABLE EXPLOSIVES \cN , but your \cqBANDOLIER \cN kept them safe!")
	TNT1 A 0 A_TakeInventory("saveammo",1)
	Stop
	}
}

Actor RECOMBINERTAKER : CustomInventory
{
	+Inventory.QUIET
	States
	{
 Spawn:
	TNT1 A 0
	TNT1 A 300
	Stop
	
Pickup:
	TNT1 A 0 A_JumpIfInventory("isScientist",1,3)
	TNT1 A 0 A_JumpIfInventory("RecombinerPickup",1,"Checkchances")
	TNT1 A 0 A_JumpIfInventory("RecombinerDamaged",1,"Rip")
	TNT1 A 1 A_remove(AAPTR_DEFAULT)
	Stop
	
	Checkchances:
	TNT1 A 0 a_jumpif(GetCvar("Equiplossmode") == 0,"LowLoss")
	TNT1 A 0 a_jumpif(GetCvar("Equiplossmode") == 1,"StandardLoss")
	TNT1 A 0 a_jumpif(GetCvar("Equiplossmode") == 2,"HighLoss")
	stop
	
	lowloss:
	TNT1 A 0 a_jump(240, 1)
	goto Loss
	TNT1 A 0
	stop
	
	Standardloss:
	TNT1 A 0 a_jump(215, 1)
	goto Loss
	TNT1 A 0
	stop
	
	Highloss:
	TNT1 A 0 a_jump(180, 1)
	goto Loss
	TNT1 A 0
	stop
	
 Loss:
	TNT1 A 0
	TNT1 A 1 A_JumpIfInventory("saveweapon",1,"Safe")
	TNT1 A 0 A_Log("\cN Your  \ci PORTABLE RECOMBINER \cN got damaged during your last trip. You can deploy it one last time, but then you'll have to take separate paths.")
	TNT1 A 0 A_TakeInventory("recombinerpickup",1)
	TNT1 A 0 A_GiveInventory("recombinerdamaged",1)
	Stop
	
Safe:
	TNT1 A 0
 	TNT1 A 0 A_Log("\cN You were about to lose your \cqRECOMBINER \cN , but your \cqBACKPACK \cN kept it safe!")
	TNT1 A 0 A_TakeInventory("saveweapon",1)
	Stop
	
Rip:
	TNT1 A 0 A_Log("\cNYour \cgPORTABLE RECOMBINER  \cN was already in a bad shape, but now it's literally destroyed.")
	TNT1 A 0 A_TakeInventory("recombinerdamaged",1)
	Stop
	
	}
}