actor DoomKeyRB : ItemRunBallTwoFrameBrightSecond
{
	+NOTDMATCH
	Inventory.PickupSound "misc/k_pkup"
    var int user_iskey;
	states
	{
		Initialize:
			"####" A 0 A_SetUserVar("user_iskey", 1)
			goto super::Initialize
		Look:
			"####" A 10
			"####" B 10 Bright
			goto LookCheck
		UseCheck:
			TNT1 A 0 A_JumpIf(CallACS("CheckKeyStay"), "UseFail")
			stop
		UseFail:
			TNT1 A 0
			fail
	}
}

actor BlueCardRB : DoomKeyRB replaces BlueCard
{
	Inventory.PickupMessage "$GOTBLUECARD"
	states
	{
		Spawn:
			BKEY A 0
			goto Initialize
		Transform:
			BCRB A 0
			goto super::Transform
		Pickup:
			TNT1 A 0 A_GiveInventory("BlueCard")
			goto UseCheck
	}
}

actor BlueSkullRB : DoomKeyRB replaces BlueSkull
{
	Inventory.PickupMessage "$GOTBLUESKUL"
	states
	{
		Spawn:
			BSKU A 0
			goto Initialize
		Transform:
			BSRB A 0
			goto super::Transform
		Pickup:
			TNT1 A 0 A_GiveInventory("BlueSkull")
			goto UseCheck
	}
}

actor RedCardRB : DoomKeyRB replaces RedCard
{
	Inventory.PickupMessage "$GOTREDCARD"
	states
	{
		Spawn:
			RKEY A 0
			goto Initialize
		Transform:
			RCRB A 0
			goto super::Transform
		Pickup:
			TNT1 A 0 A_GiveInventory("RedCard")
			goto UseCheck
	}
}

actor RedSkullRB : DoomKeyRB replaces RedSkull
{
	Inventory.PickupMessage "$GOTREDSKUL"
	states
	{
		Spawn:
			RSKU A 0
			goto Initialize
		Transform:
			RSRB A 0
			goto super::Transform
		Pickup:
			TNT1 A 0 A_GiveInventory("RedSkull")
			goto UseCheck
	}
}

actor YellowCardRB : DoomKeyRB replaces YellowCard
{
	Inventory.PickupMessage "$GOTYELWCARD"
	states
	{
		Spawn:
			YKEY A 0
			goto Initialize
		Transform:
			YCRB A 0
			goto super::Transform
		Pickup:
			TNT1 A 0 A_GiveInventory("YellowCard")
			goto UseCheck
	}
}

actor YellowSkullRB : DoomKeyRB replaces YellowSkull
{
	Inventory.PickupMessage "$GOTYELWSKUL"
	states
	{
		Spawn:
			YSKU A 0
			goto Initialize
		Transform:
			YSRB A 0
			goto super::Transform
		Pickup:
			TNT1 A 0 A_GiveInventory("YellowSkull")
			goto UseCheck
	}
}