#include "actors/player.txt"
//#include "actors/enemies.txt"
#include "actors/ammo.txt"
#include "actors/items.txt"
#include "actors/weapons/base.txt"
#include "actors/weapons/fist.txt"
#include "actors/weapons/blade.txt"
#include "actors/weapons/immolator.txt"
#include "actors/weapons/bloodbane.txt"
#include "actors/weapons/nailgun.txt"
#include "actors/weapons/mauler.txt"
#include "actors/weapons/irebolt.txt"
#include "actors/weapons/caster.txt"
#include "actors/weapons/basilisk.txt"
#include "actors/weapons/soulreaver.txt"
//LC-EriGuns
#include "actors/eri1/eri1.dec"

Actor 555ChainsawSpawner : CustomInventory Replaces Chainsaw
{
	States
	{
		Spawn:
			CSAW A 1
			Wait
		Pickup:
			TNT1 A 1
			TNT1 A 0 A_JumpIfInventory("IsEriPlayer", 1, "EriPlayer")
			TNT1 A 0 A_JumpIfInventory("IsHellPlayer", 1, "HellPlayer")
			GoTo Nope
		Nope:
			TNT1 A 0 A_Print("Invalid Player Class")
			TNT1 A 10
			GoTo Spawn
		EriPlayer:
			TNT1 A 1
			TNT1 A 0 A_GiveInventory("EriChainsaw", 1)
			Stop
		HellPlayer:
			TNT1 A 1
			TNT1 A 0 A_GiveInventory("EriBlade", 1)
			Stop
		
	}
}


Actor 555PistolSpawner : CustomInventory Replaces Pistol
{
	States
	{
		Spawn:
			PIST A 1
			Wait
		Pickup:
			TNT1 A 1
			TNT1 A 0 A_JumpIfInventory("IsEriPlayer", 1, "EriPlayer")
			TNT1 A 0 A_JumpIfInventory("IsHellPlayer", 1, "HellPlayer")
			GoTo Nope
		Nope:
			TNT1 A 0 A_Print("Invalid Player Class")
			TNT1 A 10
			GoTo Spawn
		EriPlayer:
			TNT1 A 1
			TNT1 A 0 A_GiveInventory("EriPistol", 1)
			Stop
		HellPlayer:
			TNT1 A 1
			TNT1 A 0 A_GiveInventory("EriImmolator", 1)
			Stop
		
	}
}

Actor 555ShotgunSpawner : CustomInventory Replaces Shotgun
{
	States
	{
		Spawn:
			SGN2 A 1
			Wait
		Pickup:
			TNT1 A 1
			TNT1 A 0 A_JumpIfInventory("IsEriPlayer", 1, "EriPlayer")
			TNT1 A 0 A_JumpIfInventory("IsHellPlayer", 1, "HellPlayer")
			GoTo Nope
		Nope:
			TNT1 A 0 A_Print("Invalid Player Class")
			TNT1 A 16
			GoTo Spawn
		EriPlayer:
			TNT1 A 1
			TNT1 A 0 A_GiveInventory("EriShotgun", 1)
			Stop
		HellPlayer:
			TNT1 A 1
			TNT1 A 0 A_GiveInventory("EriIrebolt", 1)
			Stop
		
	}
}

Actor 555SuperShotgunSpawner : CustomInventory Replaces SuperShotgun
{
	States
	{
		Spawn:
			SGN2 A 1
			Wait
		Pickup:
			TNT1 A 1
			TNT1 A 0 A_JumpIfInventory("IsEriPlayer", 1, "EriPlayer")
			TNT1 A 0 A_JumpIfInventory("IsHellPlayer", 1, "HellPlayer")
			GoTo Nope
		Nope:
			TNT1 A 0 A_Print("Invalid Player Class")
			TNT1 A 16
			GoTo Spawn
		EriPlayer:
			TNT1 A 1
			TNT1 A 0 A_GiveInventory("EriSuperShotgun", 1)
			Stop
		HellPlayer:
			TNT1 A 1
			TNT1 A 0 A_GiveInventory("EriMauler", 1)
			Stop
		
	}
}

Actor 555ChaingunSpawner : CustomInventory Replaces Chaingun
{
	States
	{
		Spawn:
			MGUN A 1
			Wait
		Pickup:
			TNT1 A 1
			TNT1 A 0 A_JumpIfInventory("IsEriPlayer", 1, "EriPlayer")
			TNT1 A 0 A_JumpIfInventory("IsHellPlayer", 1, "HellPlayer")
			GoTo Nope
		Nope:
			TNT1 A 0 A_Print("Invalid Player Class")
			TNT1 A 16
			GoTo Spawn
		EriPlayer:
			TNT1 A 1 A_Jump(254, "Mgun", "GatlingGun")
		Mgun:
			TNT1 A 0 A_GiveInventory("EriMachinegun", 1)
			Stop
		GatlingGun:
			TNT1 A 0 A_GiveInventory("EriGatlingGun", 1)
			Stop
		HellPlayer:
			TNT1 A 1 A_Jump(254, "IreBolt", "Nailgun")
		IreBolt:
			TNT1 A 0 A_GiveInventory("EriIrebolt", 1)
			Stop
		Nailgun:
			TNT1 A 0 A_GiveInventory("EriNailgun", 1)
			Stop
		
	}
}

Actor 555RocketLauncherSpawner : CustomInventory Replaces RocketLauncher
{
	States
	{
		Spawn:
			LAUN A 1
			Wait
		Pickup:
			TNT1 A 1
			TNT1 A 0 A_JumpIfInventory("IsEriPlayer", 1, "EriPlayer")
			TNT1 A 0 A_JumpIfInventory("IsHellPlayer", 1, "HellPlayer")
			GoTo Nope
		Nope:
			TNT1 A 0 A_Print("Invalid Player Class")
			TNT1 A 16
			GoTo Spawn
		EriPlayer:
			TNT1 A 1
			TNT1 A 0 A_GiveInventory("EriRocketLauncher", 1)
			Stop
		HellPlayer:
			TNT1 A 1
			TNT1 A 0 A_GiveInventory("EriCaster", 1)
			Stop
		
	}
}

Actor 555PlasmaRifleSpawner : CustomInventory Replaces PlasmaRifle
{
	States
	{
		Spawn:
			PLAS A 1
			Wait
		Pickup:
			TNT1 A 1
			TNT1 A 0 A_JumpIfInventory("IsEriPlayer", 1, "EriPlayer")
			TNT1 A 0 A_JumpIfInventory("IsHellPlayer", 1, "HellPlayer")
			GoTo Nope
		Nope:
			TNT1 A 0 A_Print("Invalid Player Class")
			TNT1 A 16
			GoTo Spawn
		EriPlayer:
			TNT1 A 1
			TNT1 A 0 A_GiveInventory("EriPlasmaRifle", 1)
			Stop
		HellPlayer:
			TNT1 A 1
			TNT1 A 0 A_GiveInventory("EriBasilisk", 1)
			Stop
		
	}
}

Actor 555BFG9000Spawner : CustomInventory Replaces BFG9000
{
	States
	{
		Spawn:
			BFUG A 1
			Wait
		Pickup:
			TNT1 A 1
			TNT1 A 0 A_JumpIfInventory("IsEriPlayer", 1, "EriPlayer")
			TNT1 A 0 A_JumpIfInventory("IsHellPlayer", 1, "HellPlayer")
			GoTo Nope
		Nope:
			TNT1 A 0 A_Print("Invalid Player Class")
			TNT1 A 16
			GoTo Spawn
		EriPlayer:
			TNT1 A 1
			TNT1 A 0 A_GiveInventory("EriBFG9000", 1)
			Stop
		HellPlayer:
			TNT1 A 1
			TNT1 A 0 A_GiveInventory("EriSoulReaver", 1)
			Stop
		
	}
}