
//==============================================================================================================================================
//==============================================================================
//		ONYX ARMORS
//==============================================================================
//==============================================================================================================================================


ACTOR RLOModGreenArmorPickup : RLGenericArmorPickup 18079
{
    //$category "Onyx-modded Armor"
	//$Sprite ONYAA0
    Tag "Security Armor [O]"
    Inventory.Icon "ONYABOX"
	Inventory.PickupSound "misc/rlarmor1"
	Inventory.UseSound "armor/equip"
	Inventory.RespawnTics 10500
	+DONTGIB
	States
	{
	SpawnRarityBeam:
// Create the appropriate rarity beam for the item.
		TNT1 A 0 A_SpawnItemEx("RLRarityBeamOnyx", 0,0,0, 0,0,0, 0, SXF_SETMASTER)
		TNT1 A 0 A_Jump (256, "SpawnDRPGCheck")
		Goto SpawnDRPGCheck
		
    SpawnLoopFall:
		ONYA A 0 A_JumpIf(Abs(VelZ) <= 0.01 && user_floorhit == 0, "FloorHit")
		"####" "#" 1
		Loop
	SpawnLoop:
// Play the armor's sprite animation.
		ONYA A 6
		ONYA A 6 Bright
		Loop
			
//------------------------------------------------------------------------------
// Apply an Onyx mod to the armor in your inventory.
// Or not.
	OnyxModActivate:
		TNT1 A 0 A_GiveInventory("RLDeselectionFunction",1)
		TNT1 A 0 A_PlaySound ("hud/error", 7, 1)
		TNT1 A 0 A_Print("This armor is already \cuindestructible.\c-")
		Fail
		
//------------------------------------------------------------------------------
	ArmorAlreadyEquippedMessage:
// Check for an Onyx mod in your inventory, and print a different string if there is.
// Comment out the jump if it cannot be Onyx modded.
//		TNT1 A 0 A_JumpIfInventory("RLOnyxModItem", 1, "ArmorAlreadyEquippedMessage2")
		TNT1 A 0 A_Jump (256, "ArmorAlreadyEquippedMessage1")
		Goto ArmorAlreadyEquippedMessage1
		
	ArmorAlreadyEquippedArmorMod:
// Check for an Onyx mod in your inventory, and print a different string if there is.
// Comment out the jump if it cannot be Onyx modded.
//		TNT1 A 0 A_JumpIfInventory("RLOnyxModItem", 1, "ArmorAlreadyEquippedArmorMod2")
		TNT1 A 0 A_Jump (256, "ArmorAlreadyEquippedArmorMod1")
		Goto ArmorAlreadyEquippedArmorMod1
		
	NoArmorEquippedMessage:
// Check for an Onyx mod in your inventory, and print a different string if there is.
// Comment out the jump if it cannot be Onyx modded.
//		TNT1 A 0 A_JumpIfInventory("RLOnyxModItem", 1, "NoArmorEquippedMessage2")
		TNT1 A 0 A_Jump (256, "NoArmorEquippedMessage1")
		Goto NoArmorEquippedMessage1
		
	NoArmorEquippedArmorMod:
// You may also convert it with an armor modpack.
// Check for an Onyx mod in your inventory, and print a different string if there is.
// Comment out the jump if it cannot be Onyx modded.
//		TNT1 A 0 A_JumpIfInventory("RLOnyxModItem", 1, "NoArmorEquippedArmorMod2")
		TNT1 A 0 A_Jump (256, "NoArmorEquippedArmorMod1")
		Goto NoArmorEquippedArmorMod1
		
//------------------------------------------------------------------------------
	NoArmorModpackActive:
// Check to see if this armor has been activated once before.
		TNT1 A 0 A_JumpIfInventory("RLOModGreenArmorUse",1,"ArmorEquip")
		TNT1 A 0 A_Jump (256, "UseTokenRemoval")
		Goto UseTokenRemoval
		
	UseTokenGiven:
// Gives you the identifier that indicates what armor you are manipulating right now.
		TNT1 A 0 A_GiveInventory("RLOModGreenArmorUse", 1)
// Check to see if you are already wearing armor and change the activation message.
		TNT1 A 0 A_Jump (256, "ArmorWornCheck")
		Goto ArmorWornCheck
		
	ArmorEquipTokens:
		TNT1 A 0 A_TakeInventory("RLOModGreenArmorUse",1)
		TNT1 A 0 A_TakeInventory("RLArmorInInventory",1)
// Give the Token and/or Bonus items that are used to define the armor as being worn.
		TNT1 A 0 A_GiveInventory("RLOModGreenArmorToken",1)
		TNT1 A 0 A_GiveInventory("RLIndestructibleArmorWorn",1)
// Give a different armor based on whether or not you are the Renegade.
		TNT1 A 0 A_JumpIfInventory("RLShellshockPerk",1,"RenegadeEquip")
		TNT1 A 0 A_GiveInventory("RLOModGreenArmor",1)
		TNT1 A 0 A_Jump (256, "EquipFinish")
		Goto EquipFinish
		
// The Renegade gets a version of the armor with 1.5x more protection, up to a max of 80%.
	RenegadeEquip:
		TNT1 A 0 A_GiveInventory("RLOModGreenArmorRenegade",1)
		TNT1 A 0 A_Jump (256, "EquipFinish")
		Goto EquipFinish

//------------------------------------------------------------------------------
// Armor modpack checking begins here.
			ArmorModpackGreen:
// you wot m8
		TNT1 A 0 A_Jump (256, "IncompatibleArmorMod")
		Goto IncompatibleArmorMod
		
			ArmorModpackBlue:
// Reconfigure the selected armor into a Combat (Blue) variant.
		TNT1 A 0 A_TakeInventory("RLArmorModItemBlue",1)
		TNT1 A 0 A_TakeInventory("RLArmorModItemInInventory",1)
		TNT1 A 0 A_TakeInventory("RLArmorInInventory",1)
		TNT1 A 0 A_GiveInventory("RLOModBlueArmorPickup",1)
		TNT1 A 0 A_PlaySound ("modpack/armor", 7, 1, 0, 1.8)
		TNT1 A 0 A_Print("\cdSecurity Armor \c-reconfigured into \chCombat Armor.")
		Stop
		
			ArmorModpackRed:
// Reconfigure the selected armor into a Commando (Red) variant.
		TNT1 A 0 A_TakeInventory("RLArmorModItemRed",1)
		TNT1 A 0 A_TakeInventory("RLArmorModItemInInventory",1)
		TNT1 A 0 A_TakeInventory("RLArmorInInventory",1)
		TNT1 A 0 A_GiveInventory("RLOModRedArmorPickup",1)
		TNT1 A 0 A_PlaySound ("modpack/armor", 7, 1, 0, 1.8)
		TNT1 A 0 A_Print("\cdSecurity Armor \c-reconfigured into \cgCommando Armor.")
		Stop
		
//------------------------------------------------------------------------------
// Equip messages are grouped down here.
	PickupDisplayMessage:
// Picking up an armor, and you have room for it.
		TNT1 A 0 A_Print("Picked up the \cuSecurity Armor.", 2)
		Stop
	EquipFinish:
// Successfully wearing an armor.
		TNT1 A 0 A_Print("\cuSecurity Armor \c-equipped.", 2)
		Stop
		
	ArmorAlreadyEquipped:
// You are wearing armor, but you can still drop the armor you are manipulating.
// Check for armor modpack modes that are compatible with this armor.
// Comment out the incompatible jumps.
//		TNT1 A 0 A_JumpIfInventory("RLArmorModItem",1,"ArmorAlreadyEquippedArmorMod")
		TNT1 A 0 A_JumpIfInventory("RLArmorModItemBlue",1,"ArmorAlreadyEquippedArmorMod")
		TNT1 A 0 A_JumpIfInventory("RLArmorModItemRed",1,"ArmorAlreadyEquippedArmorMod")
		TNT1 A 0 A_Jump (256, "ArmorAlreadyEquippedMessage")
		Goto ArmorAlreadyEquippedMessage
	NoArmorEquipped:
// You are free to either wear the armor or drop it.
// Check for armor modpack modes that are compatible with this armor.
// Comment out the incompatible jumps.
//		TNT1 A 0 A_JumpIfInventory("RLArmorModItem",1,"NoArmorEquippedArmorMod")
		TNT1 A 0 A_JumpIfInventory("RLArmorModItemBlue",1,"NoArmorEquippedArmorMod")
		TNT1 A 0 A_JumpIfInventory("RLArmorModItemRed",1,"NoArmorEquippedArmorMod")
		TNT1 A 0 A_Jump (256, "NoArmorEquippedMessage")
		Goto NoArmorEquippedMessage
		
	NotPickup:
// This is for when you walk over an armor you cannot pick up.
		TNT1 A 0 A_JumpIfInventory("DRLA_ArmorAntiLogFloodCheck",1,"NotPickup_NoPrint")
		TNT1 A 0 A_GiveInventory("DRLA_ArmorAntiLogFloodCheck")
		TNT1 A 0 A_Print("\cu= Security Armor =", 2, "CONFONT")
		Fail
//------------------------------------------------------------------------------
// Color code reference
// j = Standard (White)
// t = Exotic (Purple)
// v = Assembled (Cyan)
// i = Superior (Orange)
// d = Unique (Green)
// g = Demonic (Red)
// k = Legendary (Yellow)
// u = Onyx (Dark Gray)
	}
}

ACTOR RLOModGreenArmorPickupSpecial : RLOModGreenArmorPickup
{
    Inventory.InterHubAmount 0
    Inventory.MaxAmount 0
	+INVENTORY.AUTOACTIVATE
	States
	{
	SpawnDRPGCheck:
// Initialize the item with DoomRPG so it can be used with cool stuff.
// We skip the special start checks so we don't make infinite loops.
		TNT1 A 0 A_JumpIf(CallACS("DRPGCheckTiem"), "DRPGInit")
		TNT1 A 0 A_Jump (256, "SpawnLoopFall")
		Goto SpawnLoopFall	
//------------------------------------------------------------------------------
	Pickup:
		TNT1 A 0
// Check to see if you have the capacity to pickup this armor.
//		TNT1 A 0 A_JumpIf(CallACS("DRPGCheckTiem"), "PickupNonLimited")
		TNT1 A 0 A_JumpIfInventory("RLArmorInInventory",0,"NotPickup")
		TNT1 A 0 A_GiveInventory("RLOModGreenArmorPickup",1)
		Stop
		
	PickupNonLimited:
		TNT1 A 0
// Check to see if you have the capacity to pickup this armor.
        TNT1 A 0 ACS_NamedExecuteWithResult("CheckCapacity") // Special Capacity checking function for armor
		TNT1 A 0 A_GiveInventory("RLOModGreenArmorPickup",1)
		Stop
//------------------------------------------------------------------------------
	Use:
		Stop	
	}
}
		
Actor RLOModGreenArmor : RLGenericArmor
{
  Armor.Savepercent 10
  Armor.Saveamount 99999
  DamageFactor "Bullet", 0.85
}
	
Actor RLOModGreenArmorRenegade : RLOModGreenArmor
{
  Armor.Savepercent 15
}

Actor RLOModGreenArmorToken : RLPermanentInventory {}
Actor RLOModGreenArmorUse : RLPermanentInventory {}

//==============================================================================

ACTOR RLOModBlueArmorPickup : RLGenericArmorPickup 18080
{
    //$category "Onyx-modded Armor"
	//$Sprite ONYAB0
    Tag "Combat Armor [O]"
    Inventory.Icon "ONYBBOX"
	Inventory.PickupSound "misc/rlarmor1"
	Inventory.UseSound "armor/equip"
	Inventory.RespawnTics 10500
	+DONTGIB
	States
	{
	SpawnRarityBeam:
// Create the appropriate rarity beam for the item.
		TNT1 A 0 A_SpawnItemEx("RLRarityBeamOnyx", 0,0,0, 0,0,0, 0, SXF_SETMASTER)
		TNT1 A 0 A_Jump (256, "SpawnDRPGCheck")
		Goto SpawnDRPGCheck
		
    SpawnLoopFall:
		ONYA B 0 A_JumpIf(Abs(VelZ) <= 0.01 && user_floorhit == 0, "FloorHit")
		"####" "#" 1
		Loop
	SpawnLoop:
// Play the armor's sprite animation.
		ONYA B 6
		ONYA B 6 Bright
		Loop
			
//------------------------------------------------------------------------------
// Apply an Onyx mod to the armor in your inventory.
// Or not.
	OnyxModActivate:
		TNT1 A 0 A_GiveInventory("RLDeselectionFunction",1)
		TNT1 A 0 A_PlaySound ("hud/error", 7, 1)
		TNT1 A 0 A_Print("This armor is already \cuindestructible.\c-")
		Fail
		
//------------------------------------------------------------------------------
	ArmorAlreadyEquippedMessage:
// Check for an Onyx mod in your inventory, and print a different string if there is.
// Comment out the jump if it cannot be Onyx modded.
//		TNT1 A 0 A_JumpIfInventory("RLOnyxModItem", 1, "ArmorAlreadyEquippedMessage2")
		TNT1 A 0 A_Jump (256, "ArmorAlreadyEquippedMessage1")
		Goto ArmorAlreadyEquippedMessage1
		
	ArmorAlreadyEquippedArmorMod:
// Check for an Onyx mod in your inventory, and print a different string if there is.
// Comment out the jump if it cannot be Onyx modded.
//		TNT1 A 0 A_JumpIfInventory("RLOnyxModItem", 1, "ArmorAlreadyEquippedArmorMod2")
		TNT1 A 0 A_Jump (256, "ArmorAlreadyEquippedArmorMod1")
		Goto ArmorAlreadyEquippedArmorMod1
		
	NoArmorEquippedMessage:
// Check for an Onyx mod in your inventory, and print a different string if there is.
// Comment out the jump if it cannot be Onyx modded.
//		TNT1 A 0 A_JumpIfInventory("RLOnyxModItem", 1, "NoArmorEquippedMessage2")
		TNT1 A 0 A_Jump (256, "NoArmorEquippedMessage1")
		Goto NoArmorEquippedMessage1
		
	NoArmorEquippedArmorMod:
// You may also convert it with an armor modpack.
// Check for an Onyx mod in your inventory, and print a different string if there is.
// Comment out the jump if it cannot be Onyx modded.
//		TNT1 A 0 A_JumpIfInventory("RLOnyxModItem", 1, "NoArmorEquippedArmorMod2")
		TNT1 A 0 A_Jump (256, "NoArmorEquippedArmorMod1")
		Goto NoArmorEquippedArmorMod1
		
//------------------------------------------------------------------------------
	NoArmorModpackActive:
// Check to see if this armor has been activated once before.
		TNT1 A 0 A_JumpIfInventory("RLOModBlueArmorUse",1,"ArmorEquip")
		TNT1 A 0 A_Jump (256, "UseTokenRemoval")
		Goto UseTokenRemoval
		
	UseTokenGiven:
// Gives you the identifier that indicates what armor you are manipulating right now.
		TNT1 A 0 A_GiveInventory("RLOModBlueArmorUse", 1)
// Check to see if you are already wearing armor and change the activation message.
		TNT1 A 0 A_Jump (256, "ArmorWornCheck")
		Goto ArmorWornCheck
		
	ArmorEquipTokens:
		TNT1 A 0 A_TakeInventory("RLOModBlueArmorUse",1)
		TNT1 A 0 A_TakeInventory("RLArmorInInventory",1)
// Give the Token and/or Bonus items that are used to define the armor as being worn.
		TNT1 A 0 A_GiveInventory("RLOModBlueArmorToken",1)
		TNT1 A 0 A_GiveInventory("RLIndestructibleArmorWorn",1)
// Give a different armor based on whether or not you are the Renegade.
		TNT1 A 0 A_JumpIfInventory("RLShellshockPerk",1,"RenegadeEquip")
		TNT1 A 0 A_GiveInventory("RLOModBlueArmor",1)
		TNT1 A 0 A_Jump (256, "EquipFinish")
		Goto EquipFinish
		
// The Renegade gets a version of the armor with 1.5x more protection, up to a max of 80%.
	RenegadeEquip:
		TNT1 A 0 A_GiveInventory("RLOModBlueArmorRenegade",1)
		TNT1 A 0 A_Jump (256, "EquipFinish")
		Goto EquipFinish

//------------------------------------------------------------------------------
// Armor modpack checking begins here.
			ArmorModpackGreen:
// Reconfigure the selected armor into a Security (Green) variant.
		TNT1 A 0 A_TakeInventory("RLArmorModItem",1)
		TNT1 A 0 A_TakeInventory("RLArmorModItemInInventory",1)
		TNT1 A 0 A_TakeInventory("RLArmorInInventory",1)
		TNT1 A 0 A_GiveInventory("RLOModGreenArmorPickup",1)
		TNT1 A 0 A_PlaySound ("modpack/armor", 7, 1, 0, 1.8)
		TNT1 A 0 A_Print("\chCombat Armor \c-reconfigured into \cdSecurity Armor.")
		Stop
		
			ArmorModpackBlue:
// you wot m8
		TNT1 A 0 A_Jump (256, "IncompatibleArmorMod")
		Goto IncompatibleArmorMod
		
			ArmorModpackRed:
// Reconfigure the selected armor into a Commando (Red) variant.
		TNT1 A 0 A_TakeInventory("RLArmorModItemRed",1)
		TNT1 A 0 A_TakeInventory("RLArmorModItemInInventory",1)
		TNT1 A 0 A_TakeInventory("RLArmorInInventory",1)
		TNT1 A 0 A_GiveInventory("RLOModRedArmorPickup",1)
		TNT1 A 0 A_PlaySound ("modpack/armor", 7, 1, 0, 1.8)
		TNT1 A 0 A_Print("\chCombat Armor \c-reconfigured into \cgCommando Armor.")
		Stop
		
//------------------------------------------------------------------------------
// Equip messages are grouped down here.
	PickupDisplayMessage:
// Picking up an armor, and you have room for it.
		TNT1 A 0 A_Print("Picked up the \cuCombat Armor.", 2)
		Stop
	EquipFinish:
// Successfully wearing an armor.
		TNT1 A 0 A_Print("\cuCombat Armor \c-equipped.", 2)
		Stop
		
	ArmorAlreadyEquipped:
// You are wearing armor, but you can still drop the armor you are manipulating.
// Check for armor modpack modes that are compatible with this armor.
// Comment out the incompatible jumps.
		TNT1 A 0 A_JumpIfInventory("RLArmorModItem",1,"ArmorAlreadyEquippedArmorMod")
//		TNT1 A 0 A_JumpIfInventory("RLArmorModItemBlue",1,"ArmorAlreadyEquippedArmorMod")
		TNT1 A 0 A_JumpIfInventory("RLArmorModItemRed",1,"ArmorAlreadyEquippedArmorMod")
		TNT1 A 0 A_Jump (256, "ArmorAlreadyEquippedMessage")
		Goto ArmorAlreadyEquippedMessage
	NoArmorEquipped:
// You are free to either wear the armor or drop it.
// Check for armor modpack modes that are compatible with this armor.
// Comment out the incompatible jumps.
		TNT1 A 0 A_JumpIfInventory("RLArmorModItem",1,"NoArmorEquippedArmorMod")
//		TNT1 A 0 A_JumpIfInventory("RLArmorModItemBlue",1,"NoArmorEquippedArmorMod")
		TNT1 A 0 A_JumpIfInventory("RLArmorModItemRed",1,"NoArmorEquippedArmorMod")
		TNT1 A 0 A_Jump (256, "NoArmorEquippedMessage")
		Goto NoArmorEquippedMessage
		
	NotPickup:
// This is for when you walk over an armor you cannot pick up.
		TNT1 A 0 A_JumpIfInventory("DRLA_ArmorAntiLogFloodCheck",1,"NotPickup_NoPrint")
		TNT1 A 0 A_GiveInventory("DRLA_ArmorAntiLogFloodCheck")
		TNT1 A 0 A_Print("\cu= Combat Armor =", 2, "CONFONT")
		Fail
//------------------------------------------------------------------------------
// Color code reference
// j = Standard (White)
// t = Exotic (Purple)
// v = Assembled (Cyan)
// i = Superior (Orange)
// d = Unique (Green)
// g = Demonic (Red)
// k = Legendary (Yellow)
// u = Onyx (Dark Gray)
	}
}

ACTOR RLOModBlueArmorPickupSpecial : RLOModBlueArmorPickup
{
    Inventory.InterHubAmount 0
    Inventory.MaxAmount 0
	+INVENTORY.AUTOACTIVATE
	States
	{
	SpawnDRPGCheck:
// Initialize the item with DoomRPG so it can be used with cool stuff.
// We skip the special start checks so we don't make infinite loops.
		TNT1 A 0 A_JumpIf(CallACS("DRPGCheckTiem"), "DRPGInit")
		TNT1 A 0 A_Jump (256, "SpawnLoopFall")
		Goto SpawnLoopFall	
//------------------------------------------------------------------------------
	Pickup:
		TNT1 A 0
// Check to see if you have the capacity to pickup this armor.
//		TNT1 A 0 A_JumpIf(CallACS("DRPGCheckTiem"), "PickupNonLimited")
		TNT1 A 0 A_JumpIfInventory("RLArmorInInventory",0,"NotPickup")
		TNT1 A 0 A_GiveInventory("RLOModBlueArmorPickup",1)
		Stop
		
	PickupNonLimited:
		TNT1 A 0
// Check to see if you have the capacity to pickup this armor.
        TNT1 A 0 ACS_NamedExecuteWithResult("CheckCapacity") // Special Capacity checking function for armor
		TNT1 A 0 A_GiveInventory("RLOModBlueArmorPickup",1)
		Stop
//------------------------------------------------------------------------------
	Use:
		Stop	
	}
}
		
Actor RLOModBlueArmor : RLGenericArmor
{
  Armor.Savepercent 20
  Armor.Saveamount 99999
  DamageFactor "Plasma", 0.80
}
	
Actor RLOModBlueArmorRenegade : RLOModBlueArmor
{
  Armor.Savepercent 30
}

Actor RLOModBlueArmorToken : RLPermanentInventory {}
Actor RLOModBlueArmorUse : RLPermanentInventory {}

//==============================================================================

ACTOR RLOModRedArmorPickup : RLGenericArmorPickup 18081
{
    //$category "Onyx-modded Armor"
	//$Sprite ONYAC0
    Tag "Commando Armor [O]"
    Inventory.Icon "ONYCBOX"
	Inventory.PickupSound "misc/rlarmor2"
	Inventory.UseSound "armor/equip"
	Inventory.RespawnTics 10500
	+DONTGIB
	States
	{
	SpawnRarityBeam:
// Create the appropriate rarity beam for the item.
		TNT1 A 0 A_SpawnItemEx("RLRarityBeamOnyx", 0,0,0, 0,0,0, 0, SXF_SETMASTER)
		TNT1 A 0 A_Jump (256, "SpawnDRPGCheck")
		Goto SpawnDRPGCheck
		
    SpawnLoopFall:
		ONYA C 0 A_JumpIf(Abs(VelZ) <= 0.01 && user_floorhit == 0, "FloorHit")
		"####" "#" 1
		Loop
	SpawnLoop:
// Play the armor's sprite animation.
		ONYA C 6
		ONYA C 6 Bright
		Loop
			
//------------------------------------------------------------------------------
// Apply an Onyx mod to the armor in your inventory.
// Or not.
	OnyxModActivate:
		TNT1 A 0 A_GiveInventory("RLDeselectionFunction",1)
		TNT1 A 0 A_PlaySound ("hud/error", 7, 1)
		TNT1 A 0 A_Print("This armor is already \cuindestructible.\c-")
		Fail
		
//------------------------------------------------------------------------------
	ArmorAlreadyEquippedMessage:
// Check for an Onyx mod in your inventory, and print a different string if there is.
// Comment out the jump if it cannot be Onyx modded.
//		TNT1 A 0 A_JumpIfInventory("RLOnyxModItem", 1, "ArmorAlreadyEquippedMessage2")
		TNT1 A 0 A_Jump (256, "ArmorAlreadyEquippedMessage1")
		Goto ArmorAlreadyEquippedMessage1
		
	ArmorAlreadyEquippedArmorMod:
// Check for an Onyx mod in your inventory, and print a different string if there is.
// Comment out the jump if it cannot be Onyx modded.
//		TNT1 A 0 A_JumpIfInventory("RLOnyxModItem", 1, "ArmorAlreadyEquippedArmorMod2")
		TNT1 A 0 A_Jump (256, "ArmorAlreadyEquippedArmorMod1")
		Goto ArmorAlreadyEquippedArmorMod1
		
	NoArmorEquippedMessage:
// Check for an Onyx mod in your inventory, and print a different string if there is.
// Comment out the jump if it cannot be Onyx modded.
//		TNT1 A 0 A_JumpIfInventory("RLOnyxModItem", 1, "NoArmorEquippedMessage2")
		TNT1 A 0 A_Jump (256, "NoArmorEquippedMessage1")
		Goto NoArmorEquippedMessage1
		
	NoArmorEquippedArmorMod:
// You may also convert it with an armor modpack.
// Check for an Onyx mod in your inventory, and print a different string if there is.
// Comment out the jump if it cannot be Onyx modded.
//		TNT1 A 0 A_JumpIfInventory("RLOnyxModItem", 1, "NoArmorEquippedArmorMod2")
		TNT1 A 0 A_Jump (256, "NoArmorEquippedArmorMod1")
		Goto NoArmorEquippedArmorMod1
		
//------------------------------------------------------------------------------
	NoArmorModpackActive:
// Check to see if this armor has been activated once before.
		TNT1 A 0 A_JumpIfInventory("RLOModRedArmorUse",1,"ArmorEquip")
		TNT1 A 0 A_Jump (256, "UseTokenRemoval")
		Goto UseTokenRemoval
		
	UseTokenGiven:
// Gives you the identifier that indicates what armor you are manipulating right now.
		TNT1 A 0 A_GiveInventory("RLOModRedArmorUse", 1)
// Check to see if you are already wearing armor and change the activation message.
		TNT1 A 0 A_Jump (256, "ArmorWornCheck")
		Goto ArmorWornCheck
		
	ArmorEquipTokens:
		TNT1 A 0 A_TakeInventory("RLOModRedArmorUse",1)
		TNT1 A 0 A_TakeInventory("RLArmorInInventory",1)
// Give the Token and/or Bonus items that are used to define the armor as being worn.
		TNT1 A 0 A_GiveInventory("RLOModRedArmorToken",1)
		TNT1 A 0 A_GiveInventory("RLIndestructibleArmorWorn",1)
// Give a different armor based on whether or not you are the Renegade.
		TNT1 A 0 A_JumpIfInventory("RLShellshockPerk",1,"RenegadeEquip")
		TNT1 A 0 A_GiveInventory("RLOModRedArmor",1)
		TNT1 A 0 A_Jump (256, "EquipFinish")
		Goto EquipFinish
		
// The Renegade gets a version of the armor with 1.5x more protection, up to a max of 80%.
	RenegadeEquip:
		TNT1 A 0 A_GiveInventory("RLOModRedArmorRenegade",1)
		TNT1 A 0 A_Jump (256, "EquipFinish")
		Goto EquipFinish

//------------------------------------------------------------------------------
// Armor modpack checking begins here.
			ArmorModpackGreen:
// Reconfigure the selected armor into a Security (Green) variant.
		TNT1 A 0 A_TakeInventory("RLArmorModItem",1)
		TNT1 A 0 A_TakeInventory("RLArmorModItemInInventory",1)
		TNT1 A 0 A_TakeInventory("RLArmorInInventory",1)
		TNT1 A 0 A_GiveInventory("RLOModGreenArmorPickup",1)
		TNT1 A 0 A_PlaySound ("modpack/armor", 7, 1, 0, 1.8)
		TNT1 A 0 A_Print("\cgCommando Armor \c-reconfigured into \cdSecurity Armor.")
		Stop
		
			ArmorModpackBlue:
// Reconfigure the selected armor into a Combat (Blue) variant.
		TNT1 A 0 A_TakeInventory("RLArmorModItemBlue",1)
		TNT1 A 0 A_TakeInventory("RLArmorModItemInInventory",1)
		TNT1 A 0 A_TakeInventory("RLArmorInInventory",1)
		TNT1 A 0 A_GiveInventory("RLOModBlueArmorPickup",1)
		TNT1 A 0 A_PlaySound ("modpack/armor", 7, 1, 0, 1.8)
		TNT1 A 0 A_Print("\cgCommando Armor \c-reconfigured into \chCombat Armor.")
		Stop
		
			ArmorModpackRed:
// you wot m8
		TNT1 A 0 A_Jump (256, "IncompatibleArmorMod")
		Goto IncompatibleArmorMod
		
//------------------------------------------------------------------------------
// Equip messages are grouped down here.
	PickupDisplayMessage:
// Picking up an armor, and you have room for it.
		TNT1 A 0 A_Print("Picked up the \cuCommando Armor.", 2)
		Stop
	EquipFinish:
// Successfully wearing an armor.
		TNT1 A 0 A_Print("\cuCommando Armor \c-equipped.", 2)
		Stop
		
	ArmorAlreadyEquipped:
// You are wearing armor, but you can still drop the armor you are manipulating.
// Check for armor modpack modes that are compatible with this armor.
// Comment out the incompatible jumps.
		TNT1 A 0 A_JumpIfInventory("RLArmorModItem",1,"ArmorAlreadyEquippedArmorMod")
		TNT1 A 0 A_JumpIfInventory("RLArmorModItemBlue",1,"ArmorAlreadyEquippedArmorMod")
//		TNT1 A 0 A_JumpIfInventory("RLArmorModItemRed",1,"ArmorAlreadyEquippedArmorMod")
		TNT1 A 0 A_Jump (256, "ArmorAlreadyEquippedMessage")
		Goto ArmorAlreadyEquippedMessage
	NoArmorEquipped:
// You are free to either wear the armor or drop it.
// Check for armor modpack modes that are compatible with this armor.
// Comment out the incompatible jumps.
		TNT1 A 0 A_JumpIfInventory("RLArmorModItem",1,"NoArmorEquippedArmorMod")
		TNT1 A 0 A_JumpIfInventory("RLArmorModItemBlue",1,"NoArmorEquippedArmorMod")
//		TNT1 A 0 A_JumpIfInventory("RLArmorModItemRed",1,"NoArmorEquippedArmorMod")
		TNT1 A 0 A_Jump (256, "NoArmorEquippedMessage")
		Goto NoArmorEquippedMessage
		
	NotPickup:
// This is for when you walk over an armor you cannot pick up.
		TNT1 A 0 A_JumpIfInventory("DRLA_ArmorAntiLogFloodCheck",1,"NotPickup_NoPrint")
		TNT1 A 0 A_GiveInventory("DRLA_ArmorAntiLogFloodCheck")
		TNT1 A 0 A_Print("\cu= Commando Armor =", 2, "CONFONT")
		Fail
//------------------------------------------------------------------------------
// Color code reference
// j = Standard (White)
// t = Exotic (Purple)
// v = Assembled (Cyan)
// i = Superior (Orange)
// d = Unique (Green)
// g = Demonic (Red)
// k = Legendary (Yellow)
// u = Onyx (Dark Gray)
	}
}

ACTOR RLOModRedArmorPickupSpecial : RLOModRedArmorPickup
{
    Inventory.InterHubAmount 0
    Inventory.MaxAmount 0
	+INVENTORY.AUTOACTIVATE
	States
	{
	SpawnDRPGCheck:
// Initialize the item with DoomRPG so it can be used with cool stuff.
// We skip the special start checks so we don't make infinite loops.
		TNT1 A 0 A_JumpIf(CallACS("DRPGCheckTiem"), "DRPGInit")
		TNT1 A 0 A_Jump (256, "SpawnLoopFall")
		Goto SpawnLoopFall	
//------------------------------------------------------------------------------
	Pickup:
		TNT1 A 0
// Check to see if you have the capacity to pickup this armor.
//		TNT1 A 0 A_JumpIf(CallACS("DRPGCheckTiem"), "PickupNonLimited")
		TNT1 A 0 A_JumpIfInventory("RLArmorInInventory",0,"NotPickup")
		TNT1 A 0 A_GiveInventory("RLOModRedArmorPickup",1)
		Stop
		
	PickupNonLimited:
		TNT1 A 0
// Check to see if you have the capacity to pickup this armor.
        TNT1 A 0 ACS_NamedExecuteWithResult("CheckCapacity") // Special Capacity checking function for armor
		TNT1 A 0 A_GiveInventory("RLOModRedArmorPickup",1)
		Stop
//------------------------------------------------------------------------------
	Use:
		Stop	
	}
}
		
Actor RLOModRedArmor : RLGenericArmor
{
  Armor.Savepercent 40
  Armor.Saveamount 99999
  DamageFactor "Fire", 0.75
}
	
Actor RLOModRedArmorRenegade : RLOModRedArmor
{
  Armor.Savepercent 60
}

Actor RLOModRedArmorToken : RLPermanentInventory {}
Actor RLOModRedArmorUse : RLPermanentInventory {}

//==============================================================================

ACTOR RLOModBallisticVestArmorPickup : RLGenericArmorPickup 18082
{
    //$category "Onyx-modded Armor"
	//$Sprite ONYAD0
    Tag "Ballistic Vest [O]"
    Inventory.Icon "ONYDBOX"
	Inventory.PickupSound "misc/rlarmor1"
	Inventory.UseSound "armor/equip"
	Inventory.RespawnTics 10500
	+DONTGIB
	States
	{
	SpawnRarityBeam:
// Create the appropriate rarity beam for the item.
		TNT1 A 0 A_SpawnItemEx("RLRarityBeamOnyx", 0,0,0, 0,0,0, 0, SXF_SETMASTER)
		TNT1 A 0 A_Jump (256, "SpawnDRPGCheck")
		Goto SpawnDRPGCheck
		
    SpawnLoopFall:
		ONYA D 0 A_JumpIf(Abs(VelZ) <= 0.01 && user_floorhit == 0, "FloorHit")
		"####" "#" 1
		Loop
	SpawnLoop:
// Play the armor's sprite animation.
		ONYA D 6
		ONYA D 6 Bright
		Loop
			
//------------------------------------------------------------------------------
// Apply an Onyx mod to the armor in your inventory.
// Or not.
	OnyxModActivate:
		TNT1 A 0 A_GiveInventory("RLDeselectionFunction",1)
		TNT1 A 0 A_PlaySound ("hud/error", 7, 1)
		TNT1 A 0 A_Print("This armor is already \cuindestructible.\c-")
		Fail
		
//------------------------------------------------------------------------------
	ArmorModReconfigure:
// This armor can't be reconfigured, so throw out an error and don't activate the armor or anything.
		TNT1 A 0 A_GiveInventory("RLDeselectionFunction",1)
		TNT1 A 0 A_PlaySound ("hud/error", 7, 1)
		TNT1 A 0 A_Print("This armor is not a reconfigurable\ntype of armor.")
		Fail
		
//------------------------------------------------------------------------------
// These two states are used to detect armor modpacks if the armor can be altered.
// These states only need to be redefined if the armor cannot be converted with them.
	ArmorAlreadyEquipped:
// You are wearing armor, but you can still drop the armor you are manipulating.
//		TNT1 A 0 A_JumpIfInventory("RLArmorModItem", 1, "ArmorAlreadyEquippedArmorMod")
//		TNT1 A 0 A_JumpIfInventory("RLArmorModItemBlue", 1, "ArmorAlreadyEquippedArmorMod")
//		TNT1 A 0 A_JumpIfInventory("RLArmorModItemRed", 1, "ArmorAlreadyEquippedArmorMod")
		TNT1 A 0 A_Jump (256, "ArmorAlreadyEquippedMessage")
		Goto ArmorAlreadyEquippedMessage
	NoArmorEquipped:
// You are free to either wear the armor or drop it.
//		TNT1 A 0 A_JumpIfInventory("RLArmorModItem", 1, "NoArmorEquippedArmorMod")
//		TNT1 A 0 A_JumpIfInventory("RLArmorModItemBlue", 1, "NoArmorEquippedArmorMod")
//		TNT1 A 0 A_JumpIfInventory("RLArmorModItemRed", 1, "NoArmorEquippedArmorMod")
		TNT1 A 0 A_Jump (256, "NoArmorEquippedMessage")
		Goto NoArmorEquippedMessage
		
//------------------------------------------------------------------------------
	ArmorAlreadyEquippedMessage:
// Check for an Onyx mod in your inventory, and print a different string if there is.
// Comment out the jump if it cannot be Onyx modded.
//		TNT1 A 0 A_JumpIfInventory("RLOnyxModItem", 1, "ArmorAlreadyEquippedMessage2")
		TNT1 A 0 A_Jump (256, "ArmorAlreadyEquippedMessage1")
		Goto ArmorAlreadyEquippedMessage1
		
	ArmorAlreadyEquippedArmorMod:
// Check for an Onyx mod in your inventory, and print a different string if there is.
// Comment out the jump if it cannot be Onyx modded.
//		TNT1 A 0 A_JumpIfInventory("RLOnyxModItem", 1, "ArmorAlreadyEquippedArmorMod2")
		TNT1 A 0 A_Jump (256, "ArmorAlreadyEquippedArmorMod1")
		Goto ArmorAlreadyEquippedArmorMod1
		
	NoArmorEquippedMessage:
// Check for an Onyx mod in your inventory, and print a different string if there is.
// Comment out the jump if it cannot be Onyx modded.
//		TNT1 A 0 A_JumpIfInventory("RLOnyxModItem", 1, "NoArmorEquippedMessage2")
		TNT1 A 0 A_Jump (256, "NoArmorEquippedMessage1")
		Goto NoArmorEquippedMessage1
		
	NoArmorEquippedArmorMod:
// You may also convert it with an armor modpack.
// Check for an Onyx mod in your inventory, and print a different string if there is.
// Comment out the jump if it cannot be Onyx modded.
//		TNT1 A 0 A_JumpIfInventory("RLOnyxModItem", 1, "NoArmorEquippedArmorMod2")
		TNT1 A 0 A_Jump (256, "NoArmorEquippedArmorMod1")
		Goto NoArmorEquippedArmorMod1
		
//------------------------------------------------------------------------------
	NoArmorModpackActive:
// Check to see if this armor has been activated once before.
		TNT1 A 0 A_JumpIfInventory("RLOModBallisticVestArmorUse",1,"ArmorEquip")
		TNT1 A 0 A_Jump (256, "UseTokenRemoval")
		Goto UseTokenRemoval
		
	UseTokenGiven:
// Gives you the identifier that indicates what armor you are manipulating right now.
		TNT1 A 0 A_GiveInventory("RLOModBallisticVestArmorUse", 1)
// Check to see if you are already wearing armor and change the activation message.
		TNT1 A 0 A_Jump (256, "ArmorWornCheck")
		Goto ArmorWornCheck
		
	ArmorEquipTokens:
		TNT1 A 0 A_TakeInventory("RLOModBallisticVestArmorUse",1)
		TNT1 A 0 A_TakeInventory("RLArmorInInventory",1)
// Give the Token and/or Bonus items that are used to define the armor as being worn.
		TNT1 A 0 A_GiveInventory("RLOModBallisticVestArmorToken",1)
		TNT1 A 0 A_GiveInventory("RLIndestructibleArmorWorn",1)
// Give a different armor based on whether or not you are the Renegade.
		TNT1 A 0 A_JumpIfInventory("RLShellshockPerk",1,"RenegadeEquip")
		TNT1 A 0 A_GiveInventory("RLOModBallisticVestArmor",1)
		TNT1 A 0 A_Jump (256, "EquipFinish")
		Goto EquipFinish
		
// The Renegade gets a version of the armor with 1.5x more protection, up to a max of 80%.
	RenegadeEquip:
		TNT1 A 0 A_GiveInventory("RLOModBallisticVestArmorRenegade",1)
		TNT1 A 0 A_Jump (256, "EquipFinish")
		Goto EquipFinish

//------------------------------------------------------------------------------
// Equip messages are grouped down here.
	PickupDisplayMessage:
// Picking up an armor, and you have room for it.
		TNT1 A 0 A_Print("Picked up the \cuBallistic Vest.", 2)
		Stop
	EquipFinish:
// Successfully wearing an armor.
		TNT1 A 0 A_Print("\cuBallistic Vest \c-equipped.", 2)
		Stop
		
	ArmorAlreadyEquipped:
// You are wearing armor, but you can still drop the armor you are manipulating.
// Check for armor modpack modes that are compatible with this armor.
// Comment out the incompatible jumps.
//		TNT1 A 0 A_JumpIfInventory("RLArmorModItem",1,"ArmorAlreadyEquippedArmorMod")
//		TNT1 A 0 A_JumpIfInventory("RLArmorModItemBlue",1,"ArmorAlreadyEquippedArmorMod")
//		TNT1 A 0 A_JumpIfInventory("RLArmorModItemRed",1,"ArmorAlreadyEquippedArmorMod")
		TNT1 A 0 A_Jump (256, "ArmorAlreadyEquippedMessage")
		Goto ArmorAlreadyEquippedMessage
	NoArmorEquipped:
// You are free to either wear the armor or drop it.
// Check for armor modpack modes that are compatible with this armor.
// Comment out the incompatible jumps.
//		TNT1 A 0 A_JumpIfInventory("RLArmorModItem",1,"NoArmorEquippedArmorMod")
//		TNT1 A 0 A_JumpIfInventory("RLArmorModItemBlue",1,"NoArmorEquippedArmorMod")
//		TNT1 A 0 A_JumpIfInventory("RLArmorModItemRed",1,"NoArmorEquippedArmorMod")
		TNT1 A 0 A_Jump (256, "NoArmorEquippedMessage")
		Goto NoArmorEquippedMessage
		
	NotPickup:
// This is for when you walk over an armor you cannot pick up.
		TNT1 A 0 A_JumpIfInventory("DRLA_ArmorAntiLogFloodCheck",1,"NotPickup_NoPrint")
		TNT1 A 0 A_GiveInventory("DRLA_ArmorAntiLogFloodCheck")
		TNT1 A 0 A_Print("\cu= Ballistic Vest =", 2, "CONFONT")
		Fail
//------------------------------------------------------------------------------
// Color code reference
// j = Standard (White)
// t = Exotic (Purple)
// v = Assembled (Cyan)
// i = Superior (Orange)
// d = Unique (Green)
// g = Demonic (Red)
// k = Legendary (Yellow)
// u = Onyx (Dark Gray)
	}
}

ACTOR RLOModBallisticVestArmorPickupSpecial : RLOModBallisticVestArmorPickup
{
    Inventory.InterHubAmount 0
    Inventory.MaxAmount 0
	+INVENTORY.AUTOACTIVATE
	States
	{
	SpawnDRPGCheck:
// Initialize the item with DoomRPG so it can be used with cool stuff.
// We skip the special start checks so we don't make infinite loops.
		TNT1 A 0 A_JumpIf(CallACS("DRPGCheckTiem"), "DRPGInit")
		TNT1 A 0 A_Jump (256, "SpawnLoopFall")
		Goto SpawnLoopFall	
//------------------------------------------------------------------------------
	Pickup:
		TNT1 A 0
// Check to see if you have the capacity to pickup this armor.
//		TNT1 A 0 A_JumpIf(CallACS("DRPGCheckTiem"), "PickupNonLimited")
		TNT1 A 0 A_JumpIfInventory("RLArmorInInventory",0,"NotPickup")
		TNT1 A 0 A_GiveInventory("RLOModBallisticVestArmorPickup",1)
		Stop
		
	PickupNonLimited:
		TNT1 A 0
// Check to see if you have the capacity to pickup this armor.
        TNT1 A 0 ACS_NamedExecuteWithResult("CheckCapacity") // Special Capacity checking function for armor
		TNT1 A 0 A_GiveInventory("RLOModBallisticVestArmorPickup",1)
		Stop
//------------------------------------------------------------------------------
	Use:
		Stop	
	}
}
		
Actor RLOModBallisticVestArmor : RLGenericArmor
{
  Armor.Savepercent 10
  Armor.Saveamount 99999
  DamageFactor "Melee", 0.50
  DamageFactor "Bullet", 0.50
}
	
Actor RLOModBallisticVestArmorRenegade : RLOModBallisticVestArmor
{
  Armor.Savepercent 15
}

Actor RLOModBallisticVestArmorToken : RLPermanentInventory {}
Actor RLOModBallisticVestArmorUse : RLPermanentInventory {}

//==============================================================================

ACTOR RLOModBulletProofVestArmorPickup : RLGenericArmorPickup 18083
{
    //$category "Onyx-modded Armor"
	//$Sprite ONYAE0
    Tag "Bullet-proof Vest [O]"
    Inventory.Icon "ONYEBOX"
	Inventory.PickupSound "misc/rlarmor1"
	Inventory.UseSound "armor/equip"
	Inventory.RespawnTics 10500
	+DONTGIB
	States
	{
	SpawnRarityBeam:
// Create the appropriate rarity beam for the item.
		TNT1 A 0 A_SpawnItemEx("RLRarityBeamOnyx", 0,0,0, 0,0,0, 0, SXF_SETMASTER)
		TNT1 A 0 A_Jump (256, "SpawnDRPGCheck")
		Goto SpawnDRPGCheck
		
    SpawnLoopFall:
		ONYA E 0 A_JumpIf(Abs(VelZ) <= 0.01 && user_floorhit == 0, "FloorHit")
		"####" "#" 1
		Loop
	SpawnLoop:
// Play the armor's sprite animation.
		ONYA E 6
		ONYA E 6 Bright
		Loop
			
//------------------------------------------------------------------------------
// Apply an Onyx mod to the armor in your inventory.
// Or not.
	OnyxModActivate:
		TNT1 A 0 A_GiveInventory("RLDeselectionFunction",1)
		TNT1 A 0 A_PlaySound ("hud/error", 7, 1)
		TNT1 A 0 A_Print("This armor is already \cuindestructible.\c-")
		Fail
		
//------------------------------------------------------------------------------
// These two states are used to detect armor modpacks if the armor can be altered.
// These states only need to be redefined if the armor cannot be converted with them.
	ArmorAlreadyEquipped:
// You are wearing armor, but you can still drop the armor you are manipulating.
//		TNT1 A 0 A_JumpIfInventory("RLArmorModItem", 1, "ArmorAlreadyEquippedArmorMod")
//		TNT1 A 0 A_JumpIfInventory("RLArmorModItemBlue", 1, "ArmorAlreadyEquippedArmorMod")
//		TNT1 A 0 A_JumpIfInventory("RLArmorModItemRed", 1, "ArmorAlreadyEquippedArmorMod")
		TNT1 A 0 A_Jump (256, "ArmorAlreadyEquippedMessage")
		Goto ArmorAlreadyEquippedMessage
	NoArmorEquipped:
// You are free to either wear the armor or drop it.
//		TNT1 A 0 A_JumpIfInventory("RLArmorModItem", 1, "NoArmorEquippedArmorMod")
//		TNT1 A 0 A_JumpIfInventory("RLArmorModItemBlue", 1, "NoArmorEquippedArmorMod")
//		TNT1 A 0 A_JumpIfInventory("RLArmorModItemRed", 1, "NoArmorEquippedArmorMod")
		TNT1 A 0 A_Jump (256, "NoArmorEquippedMessage")
		Goto NoArmorEquippedMessage
		
//------------------------------------------------------------------------------
	ArmorAlreadyEquippedMessage:
// Check for an Onyx mod in your inventory, and print a different string if there is.
// Comment out the jump if it cannot be Onyx modded.
//		TNT1 A 0 A_JumpIfInventory("RLOnyxModItem", 1, "ArmorAlreadyEquippedMessage2")
		TNT1 A 0 A_Jump (256, "ArmorAlreadyEquippedMessage1")
		Goto ArmorAlreadyEquippedMessage1
		
	ArmorAlreadyEquippedArmorMod:
// Check for an Onyx mod in your inventory, and print a different string if there is.
// Comment out the jump if it cannot be Onyx modded.
//		TNT1 A 0 A_JumpIfInventory("RLOnyxModItem", 1, "ArmorAlreadyEquippedArmorMod2")
		TNT1 A 0 A_Jump (256, "ArmorAlreadyEquippedArmorMod1")
		Goto ArmorAlreadyEquippedArmorMod1
		
	NoArmorEquippedMessage:
// Check for an Onyx mod in your inventory, and print a different string if there is.
// Comment out the jump if it cannot be Onyx modded.
//		TNT1 A 0 A_JumpIfInventory("RLOnyxModItem", 1, "NoArmorEquippedMessage2")
		TNT1 A 0 A_Jump (256, "NoArmorEquippedMessage1")
		Goto NoArmorEquippedMessage1
		
	NoArmorEquippedArmorMod:
// You may also convert it with an armor modpack.
// Check for an Onyx mod in your inventory, and print a different string if there is.
// Comment out the jump if it cannot be Onyx modded.
//		TNT1 A 0 A_JumpIfInventory("RLOnyxModItem", 1, "NoArmorEquippedArmorMod2")
		TNT1 A 0 A_Jump (256, "NoArmorEquippedArmorMod1")
		Goto NoArmorEquippedArmorMod1
		
//------------------------------------------------------------------------------
	NoArmorModpackActive:
// Check to see if this armor has been activated once before.
		TNT1 A 0 A_JumpIfInventory("RLOModBulletProofVestArmorUse",1,"ArmorEquip")
		TNT1 A 0 A_Jump (256, "UseTokenRemoval")
		Goto UseTokenRemoval
		
	UseTokenGiven:
// Gives you the identifier that indicates what armor you are manipulating right now.
		TNT1 A 0 A_GiveInventory("RLOModBulletProofVestArmorUse", 1)
// Check to see if you are already wearing armor and change the activation message.
		TNT1 A 0 A_Jump (256, "ArmorWornCheck")
		Goto ArmorWornCheck
		
	ArmorEquipTokens:
		TNT1 A 0 A_TakeInventory("RLOModBulletProofVestArmorUse",1)
		TNT1 A 0 A_TakeInventory("RLArmorInInventory",1)
// Give the Token and/or Bonus items that are used to define the armor as being worn.
		TNT1 A 0 A_GiveInventory("RLOModBulletProofVestArmorToken",1)
		TNT1 A 0 A_GiveInventory("RLIndestructibleArmorWorn",1)
// Give a different armor based on whether or not you are the Renegade.
		TNT1 A 0 A_JumpIfInventory("RLShellshockPerk",1,"RenegadeEquip")
		TNT1 A 0 A_GiveInventory("RLOModBulletProofVestArmor",1)
		TNT1 A 0 A_Jump (256, "EquipFinish")
		Goto EquipFinish
		
// The Renegade gets a version of the armor with 1.5x more protection, up to a max of 80%.
	RenegadeEquip:
		TNT1 A 0 A_GiveInventory("RLOModBulletProofVestArmorRenegade",1)
		TNT1 A 0 A_Jump (256, "EquipFinish")
		Goto EquipFinish

//------------------------------------------------------------------------------
// Equip messages are grouped down here.
	PickupDisplayMessage:
// Picking up an armor, and you have room for it.
		TNT1 A 0 A_Print("Picked up the \cuBullet-proof Vest.", 2)
		Stop
	EquipFinish:
// Successfully wearing an armor.
		TNT1 A 0 A_Print("\cuBullet-proof Vest \c-equipped.", 2)
		Stop
		
	ArmorAlreadyEquipped:
// You are wearing armor, but you can still drop the armor you are manipulating.
// Check for armor modpack modes that are compatible with this armor.
// Comment out the incompatible jumps.
//		TNT1 A 0 A_JumpIfInventory("RLArmorModItem",1,"ArmorAlreadyEquippedArmorMod")
//		TNT1 A 0 A_JumpIfInventory("RLArmorModItemBlue",1,"ArmorAlreadyEquippedArmorMod")
//		TNT1 A 0 A_JumpIfInventory("RLArmorModItemRed",1,"ArmorAlreadyEquippedArmorMod")
		TNT1 A 0 A_Jump (256, "ArmorAlreadyEquippedMessage")
		Goto ArmorAlreadyEquippedMessage
	NoArmorEquipped:
// You are free to either wear the armor or drop it.
// Check for armor modpack modes that are compatible with this armor.
// Comment out the incompatible jumps.
//		TNT1 A 0 A_JumpIfInventory("RLArmorModItem",1,"NoArmorEquippedArmorMod")
//		TNT1 A 0 A_JumpIfInventory("RLArmorModItemBlue",1,"NoArmorEquippedArmorMod")
//		TNT1 A 0 A_JumpIfInventory("RLArmorModItemRed",1,"NoArmorEquippedArmorMod")
		TNT1 A 0 A_Jump (256, "NoArmorEquippedMessage")
		Goto NoArmorEquippedMessage
		
	NotPickup:
// This is for when you walk over an armor you cannot pick up.
		TNT1 A 0 A_JumpIfInventory("DRLA_ArmorAntiLogFloodCheck",1,"NotPickup_NoPrint")
		TNT1 A 0 A_GiveInventory("DRLA_ArmorAntiLogFloodCheck")
		TNT1 A 0 A_Print("\cu= Bullet-proof Vest =", 2, "CONFONT")
		Fail
//------------------------------------------------------------------------------
// Color code reference
// j = Standard (White)
// t = Exotic (Purple)
// v = Assembled (Cyan)
// i = Superior (Orange)
// d = Unique (Green)
// g = Demonic (Red)
// k = Legendary (Yellow)
// u = Onyx (Dark Gray)
	}
}

ACTOR RLOModBulletProofVestArmorPickupSpecial : RLOModBulletProofVestArmorPickup
{
    Inventory.InterHubAmount 0
    Inventory.MaxAmount 0
	+INVENTORY.AUTOACTIVATE
	States
	{
	SpawnDRPGCheck:
// Initialize the item with DoomRPG so it can be used with cool stuff.
// We skip the special start checks so we don't make infinite loops.
		TNT1 A 0 A_JumpIf(CallACS("DRPGCheckTiem"), "DRPGInit")
		TNT1 A 0 A_Jump (256, "SpawnLoopFall")
		Goto SpawnLoopFall	
//------------------------------------------------------------------------------
	Pickup:
		TNT1 A 0
// Check to see if you have the capacity to pickup this armor.
//		TNT1 A 0 A_JumpIf(CallACS("DRPGCheckTiem"), "PickupNonLimited")
		TNT1 A 0 A_JumpIfInventory("RLArmorInInventory",0,"NotPickup")
		TNT1 A 0 A_GiveInventory("RLOModBulletProofVestArmorPickup",1)
		Stop
		
	PickupNonLimited:
		TNT1 A 0
// Check to see if you have the capacity to pickup this armor.
        TNT1 A 0 ACS_NamedExecuteWithResult("CheckCapacity") // Special Capacity checking function for armor
		TNT1 A 0 A_GiveInventory("RLOModBulletProofVestArmorPickup",1)
		Stop
//------------------------------------------------------------------------------
	Use:
		Stop	
	}
}
		
Actor RLOModBulletProofVestArmor : RLGenericArmor
{
  Armor.Savepercent 10
  Armor.Saveamount 99999
  DamageFactor "Bullet", 0.20
}
	
Actor RLOModBulletProofVestArmorRenegade : RLOModBulletProofVestArmor
{
  Armor.Savepercent 15
}

Actor RLOModBulletProofVestArmorToken : RLPermanentInventory {}
Actor RLOModBulletProofVestArmorUse : RLPermanentInventory {}

//==============================================================================

ACTOR RLOModCyberwarriorArmorPickup : RLGenericArmorPickup 18084
{
    //$category "Onyx-modded Armor"
	//$Sprite ONYAF0
    Tag "Cyberwarrior Armor [O]"
    Inventory.Icon "ONYFBOX"
	Inventory.PickupSound "misc/rlarmor3"
	Inventory.UseSound "armor/equip"
	Inventory.RespawnTics 10500
	+DONTGIB
	States
	{
	SpawnRarityBeam:
// Create the appropriate rarity beam for the item.
		TNT1 A 0 A_SpawnItemEx("RLRarityBeamOnyx", 0,0,0, 0,0,0, 0, SXF_SETMASTER)
		TNT1 A 0 A_Jump (256, "SpawnDRPGCheck")
		Goto SpawnDRPGCheck
		
    SpawnLoopFall:
		ONYA F 0 A_JumpIf(Abs(VelZ) <= 0.01 && user_floorhit == 0, "FloorHit")
		"####" "#" 1
		Loop
	SpawnLoop:
// Play the armor's sprite animation.
		ONYA F 6
		ONYA F 6 Bright
		Loop
			
//------------------------------------------------------------------------------
// Apply an Onyx mod to the armor in your inventory.
// Or not.
	OnyxModActivate:
		TNT1 A 0 A_GiveInventory("RLDeselectionFunction",1)
		TNT1 A 0 A_PlaySound ("hud/error", 7, 1)
		TNT1 A 0 A_Print("This armor is already \cuindestructible.\c-")
		Fail
		
//------------------------------------------------------------------------------
// These two states are used to detect armor modpacks if the armor can be altered.
// These states only need to be redefined if the armor cannot be converted with them.
	ArmorAlreadyEquipped:
// You are wearing armor, but you can still drop the armor you are manipulating.
//		TNT1 A 0 A_JumpIfInventory("RLArmorModItem", 1, "ArmorAlreadyEquippedArmorMod")
//		TNT1 A 0 A_JumpIfInventory("RLArmorModItemBlue", 1, "ArmorAlreadyEquippedArmorMod")
//		TNT1 A 0 A_JumpIfInventory("RLArmorModItemRed", 1, "ArmorAlreadyEquippedArmorMod")
		TNT1 A 0 A_Jump (256, "ArmorAlreadyEquippedMessage")
		Goto ArmorAlreadyEquippedMessage
	NoArmorEquipped:
// You are free to either wear the armor or drop it.
//		TNT1 A 0 A_JumpIfInventory("RLArmorModItem", 1, "NoArmorEquippedArmorMod")
//		TNT1 A 0 A_JumpIfInventory("RLArmorModItemBlue", 1, "NoArmorEquippedArmorMod")
//		TNT1 A 0 A_JumpIfInventory("RLArmorModItemRed", 1, "NoArmorEquippedArmorMod")
		TNT1 A 0 A_Jump (256, "NoArmorEquippedMessage")
		Goto NoArmorEquippedMessage
		
//------------------------------------------------------------------------------
	ArmorAlreadyEquippedMessage:
// Check for an Onyx mod in your inventory, and print a different string if there is.
// Comment out the jump if it cannot be Onyx modded.
//		TNT1 A 0 A_JumpIfInventory("RLOnyxModItem", 1, "ArmorAlreadyEquippedMessage2")
		TNT1 A 0 A_Jump (256, "ArmorAlreadyEquippedMessage1")
		Goto ArmorAlreadyEquippedMessage1
		
	ArmorAlreadyEquippedArmorMod:
// Check for an Onyx mod in your inventory, and print a different string if there is.
// Comment out the jump if it cannot be Onyx modded.
//		TNT1 A 0 A_JumpIfInventory("RLOnyxModItem", 1, "ArmorAlreadyEquippedArmorMod2")
		TNT1 A 0 A_Jump (256, "ArmorAlreadyEquippedArmorMod1")
		Goto ArmorAlreadyEquippedArmorMod1
		
	NoArmorEquippedMessage:
// Check for an Onyx mod in your inventory, and print a different string if there is.
// Comment out the jump if it cannot be Onyx modded.
//		TNT1 A 0 A_JumpIfInventory("RLOnyxModItem", 1, "NoArmorEquippedMessage2")
		TNT1 A 0 A_Jump (256, "NoArmorEquippedMessage1")
		Goto NoArmorEquippedMessage1
		
	NoArmorEquippedArmorMod:
// You may also convert it with an armor modpack.
// Check for an Onyx mod in your inventory, and print a different string if there is.
// Comment out the jump if it cannot be Onyx modded.
//		TNT1 A 0 A_JumpIfInventory("RLOnyxModItem", 1, "NoArmorEquippedArmorMod2")
		TNT1 A 0 A_Jump (256, "NoArmorEquippedArmorMod1")
		Goto NoArmorEquippedArmorMod1
		
//------------------------------------------------------------------------------
	NoArmorModpackActive:
// Check to see if this armor has been activated once before.
		TNT1 A 0 A_JumpIfInventory("RLOModCyberwarriorArmorUse",1,"ArmorEquip")
		TNT1 A 0 A_Jump (256, "UseTokenRemoval")
		Goto UseTokenRemoval
		
	UseTokenGiven:
// Gives you the identifier that indicates what armor you are manipulating right now.
		TNT1 A 0 A_GiveInventory("RLOModCyberwarriorArmorUse", 1)
// Check to see if you are already wearing armor and change the activation message.
		TNT1 A 0 A_Jump (256, "ArmorWornCheck")
		Goto ArmorWornCheck
		
	ArmorEquipTokens:
		TNT1 A 0 A_TakeInventory("RLOModCyberwarriorArmorUse",1)
		TNT1 A 0 A_TakeInventory("RLArmorInInventory",1)
// Give the Token and/or Bonus items that are used to define the armor as being worn.
		TNT1 A 0 A_GiveInventory("RLOModCyberwarriorArmorToken",1)
		TNT1 A 0 A_GiveInventory("RLCyberwarriorArmorBonus",1)
		TNT1 A 0 A_GiveInventory("RLIndestructibleArmorWorn",1)
// Give a different armor based on whether or not you are the Renegade.
		TNT1 A 0 A_JumpIfInventory("RLShellshockPerk",1,"RenegadeEquip")
		TNT1 A 0 A_GiveInventory("RLOModCyberwarriorArmor",1)
		TNT1 A 0 A_Jump (256, "EquipFinish")
		Goto EquipFinish
		
// The Renegade gets a version of the armor with 1.5x more protection, up to a max of 80%.
	RenegadeEquip:
		TNT1 A 0 A_GiveInventory("RLOModCyberwarriorArmorRenegade",1)
		TNT1 A 0 A_Jump (256, "EquipFinish")
		Goto EquipFinish

//------------------------------------------------------------------------------
// Equip messages are grouped down here.
	PickupDisplayMessage:
// Picking up an armor, and you have room for it.
		TNT1 A 0 A_Print("Picked up the \cuCyberwarrior Armor.", 2)
		Stop
	EquipFinish:
// Successfully wearing an armor.
		TNT1 A 0 A_Print("\cuCyberwarrior Armor \c-equipped.", 2)
		Stop
		
	ArmorAlreadyEquipped:
// You are wearing armor, but you can still drop the armor you are manipulating.
// Check for armor modpack modes that are compatible with this armor.
// Comment out the incompatible jumps.
//		TNT1 A 0 A_JumpIfInventory("RLArmorModItem",1,"ArmorAlreadyEquippedArmorMod")
//		TNT1 A 0 A_JumpIfInventory("RLArmorModItemBlue",1,"ArmorAlreadyEquippedArmorMod")
//		TNT1 A 0 A_JumpIfInventory("RLArmorModItemRed",1,"ArmorAlreadyEquippedArmorMod")
		TNT1 A 0 A_Jump (256, "ArmorAlreadyEquippedMessage")
		Goto ArmorAlreadyEquippedMessage
	NoArmorEquipped:
// You are free to either wear the armor or drop it.
// Check for armor modpack modes that are compatible with this armor.
// Comment out the incompatible jumps.
//		TNT1 A 0 A_JumpIfInventory("RLArmorModItem",1,"NoArmorEquippedArmorMod")
//		TNT1 A 0 A_JumpIfInventory("RLArmorModItemBlue",1,"NoArmorEquippedArmorMod")
//		TNT1 A 0 A_JumpIfInventory("RLArmorModItemRed",1,"NoArmorEquippedArmorMod")
		TNT1 A 0 A_Jump (256, "NoArmorEquippedMessage")
		Goto NoArmorEquippedMessage
		
	NotPickup:
// This is for when you walk over an armor you cannot pick up.
		TNT1 A 0 A_JumpIfInventory("DRLA_ArmorAntiLogFloodCheck",1,"NotPickup_NoPrint")
		TNT1 A 0 A_GiveInventory("DRLA_ArmorAntiLogFloodCheck")
		TNT1 A 0 A_Print("\cu= Cyberwarrior Armor =", 2, "CONFONT")
		Fail
//------------------------------------------------------------------------------
// Color code reference
// j = Standard (White)
// t = Exotic (Purple)
// v = Assembled (Cyan)
// i = Superior (Orange)
// d = Unique (Green)
// g = Demonic (Red)
// k = Legendary (Yellow)
// u = Onyx (Dark Gray)
	}
}

ACTOR RLOModCyberwarriorArmorPickupSpecial : RLOModCyberwarriorArmorPickup
{
    Inventory.InterHubAmount 0
    Inventory.MaxAmount 0
	+INVENTORY.AUTOACTIVATE
	States
	{
	SpawnDRPGCheck:
// Initialize the item with DoomRPG so it can be used with cool stuff.
// We skip the special start checks so we don't make infinite loops.
		TNT1 A 0 A_JumpIf(CallACS("DRPGCheckTiem"), "DRPGInit")
		TNT1 A 0 A_Jump (256, "SpawnLoopFall")
		Goto SpawnLoopFall	
//------------------------------------------------------------------------------
	Pickup:
		TNT1 A 0
// Check to see if you have the capacity to pickup this armor.
//		TNT1 A 0 A_JumpIf(CallACS("DRPGCheckTiem"), "PickupNonLimited")
		TNT1 A 0 A_JumpIfInventory("RLArmorInInventory",0,"NotPickup")
		TNT1 A 0 A_GiveInventory("RLOModCyberwarriorArmorPickup",1)
		Stop
		
	PickupNonLimited:
		TNT1 A 0
// Check to see if you have the capacity to pickup this armor.
        TNT1 A 0 ACS_NamedExecuteWithResult("CheckCapacity") // Special Capacity checking function for armor
		TNT1 A 0 A_GiveInventory("RLOModCyberwarriorArmorPickup",1)
		Stop
//------------------------------------------------------------------------------
	Use:
		Stop	
	}
}
		
Actor RLOModCyberwarriorArmor : RLGenericArmor
{
  Armor.Savepercent 20
  Armor.Saveamount 99999
  DamageFactor "Melee", 0.40
  DamageFactor "Bullet", 0.60
}
	
Actor RLOModCyberwarriorArmorRenegade : RLOModCyberwarriorArmor
{
  Armor.Savepercent 40
}

Actor RLOModCyberwarriorArmorToken : RLPermanentInventory {}
Actor RLOModCyberwarriorArmorUse : RLPermanentInventory {}

//==============================================================================

ACTOR RLOModDuelistArmorPickup : RLGenericArmorPickup 18085
{
    //$category "Onyx-modded Armor"
	//$Sprite ONYAG0
    Tag "Duelist Armor [O]"
    Inventory.Icon "ONYGBOX"
	Inventory.PickupSound "misc/rlarmor2"
	Inventory.UseSound "armor/equip"
	Inventory.RespawnTics 10500
	+DONTGIB
	States
	{
	SpawnRarityBeam:
// Create the appropriate rarity beam for the item.
		TNT1 A 0 A_SpawnItemEx("RLRarityBeamOnyx", 0,0,0, 0,0,0, 0, SXF_SETMASTER)
		TNT1 A 0 A_Jump (256, "SpawnDRPGCheck")
		Goto SpawnDRPGCheck
		
    SpawnLoopFall:
		ONYA G 0 A_JumpIf(Abs(VelZ) <= 0.01 && user_floorhit == 0, "FloorHit")
		"####" "#" 1
		Loop
	SpawnLoop:
// Play the armor's sprite animation.
		ONYA G 6
		ONYA G 6 Bright
		Loop
			
//------------------------------------------------------------------------------
// Apply an Onyx mod to the armor in your inventory.
// Or not.
	OnyxModActivate:
		TNT1 A 0 A_GiveInventory("RLDeselectionFunction",1)
		TNT1 A 0 A_PlaySound ("hud/error", 7, 1)
		TNT1 A 0 A_Print("This armor is already \cuindestructible.\c-")
		Fail
		
//------------------------------------------------------------------------------
// These two states are used to detect armor modpacks if the armor can be altered.
// These states only need to be redefined if the armor cannot be converted with them.
	ArmorAlreadyEquipped:
// You are wearing armor, but you can still drop the armor you are manipulating.
//		TNT1 A 0 A_JumpIfInventory("RLArmorModItem", 1, "ArmorAlreadyEquippedArmorMod")
//		TNT1 A 0 A_JumpIfInventory("RLArmorModItemBlue", 1, "ArmorAlreadyEquippedArmorMod")
//		TNT1 A 0 A_JumpIfInventory("RLArmorModItemRed", 1, "ArmorAlreadyEquippedArmorMod")
		TNT1 A 0 A_Jump (256, "ArmorAlreadyEquippedMessage")
		Goto ArmorAlreadyEquippedMessage
	NoArmorEquipped:
// You are free to either wear the armor or drop it.
//		TNT1 A 0 A_JumpIfInventory("RLArmorModItem", 1, "NoArmorEquippedArmorMod")
//		TNT1 A 0 A_JumpIfInventory("RLArmorModItemBlue", 1, "NoArmorEquippedArmorMod")
//		TNT1 A 0 A_JumpIfInventory("RLArmorModItemRed", 1, "NoArmorEquippedArmorMod")
		TNT1 A 0 A_Jump (256, "NoArmorEquippedMessage")
		Goto NoArmorEquippedMessage
		
//------------------------------------------------------------------------------
	ArmorAlreadyEquippedMessage:
// Check for an Onyx mod in your inventory, and print a different string if there is.
// Comment out the jump if it cannot be Onyx modded.
//		TNT1 A 0 A_JumpIfInventory("RLOnyxModItem", 1, "ArmorAlreadyEquippedMessage2")
		TNT1 A 0 A_Jump (256, "ArmorAlreadyEquippedMessage1")
		Goto ArmorAlreadyEquippedMessage1
		
	ArmorAlreadyEquippedArmorMod:
// Check for an Onyx mod in your inventory, and print a different string if there is.
// Comment out the jump if it cannot be Onyx modded.
//		TNT1 A 0 A_JumpIfInventory("RLOnyxModItem", 1, "ArmorAlreadyEquippedArmorMod2")
		TNT1 A 0 A_Jump (256, "ArmorAlreadyEquippedArmorMod1")
		Goto ArmorAlreadyEquippedArmorMod1
		
	NoArmorEquippedMessage:
// Check for an Onyx mod in your inventory, and print a different string if there is.
// Comment out the jump if it cannot be Onyx modded.
//		TNT1 A 0 A_JumpIfInventory("RLOnyxModItem", 1, "NoArmorEquippedMessage2")
		TNT1 A 0 A_Jump (256, "NoArmorEquippedMessage1")
		Goto NoArmorEquippedMessage1
		
	NoArmorEquippedArmorMod:
// You may also convert it with an armor modpack.
// Check for an Onyx mod in your inventory, and print a different string if there is.
// Comment out the jump if it cannot be Onyx modded.
//		TNT1 A 0 A_JumpIfInventory("RLOnyxModItem", 1, "NoArmorEquippedArmorMod2")
		TNT1 A 0 A_Jump (256, "NoArmorEquippedArmorMod1")
		Goto NoArmorEquippedArmorMod1
		
//------------------------------------------------------------------------------
	NoArmorModpackActive:
// Check to see if this armor has been activated once before.
		TNT1 A 0 A_JumpIfInventory("RLOModDuelistArmorUse",1,"ArmorEquip")
		TNT1 A 0 A_Jump (256, "UseTokenRemoval")
		Goto UseTokenRemoval
		
	UseTokenGiven:
// Gives you the identifier that indicates what armor you are manipulating right now.
		TNT1 A 0 A_GiveInventory("RLOModDuelistArmorUse", 1)
// Check to see if you are already wearing armor and change the activation message.
		TNT1 A 0 A_Jump (256, "ArmorWornCheck")
		Goto ArmorWornCheck
		
	ArmorEquipTokens:
		TNT1 A 0 A_TakeInventory("RLOModDuelistArmorUse",1)
		TNT1 A 0 A_TakeInventory("RLArmorInInventory",1)
// Give the Token and/or Bonus items that are used to define the armor as being worn.
		TNT1 A 0 A_GiveInventory("RLOModDuelistArmorToken",1)
		TNT1 A 0 A_GiveInventory("RLIndestructibleArmorWorn",1)
// Give a different armor based on whether or not you are the Renegade.
		TNT1 A 0 A_JumpIfInventory("RLShellshockPerk",1,"RenegadeEquip")
		TNT1 A 0 A_GiveInventory("RLOModDuelistArmor",1)
		TNT1 A 0 A_Jump (256, "EquipFinish")
		Goto EquipFinish
		
// The Renegade gets a version of the armor with 1.5x more protection, up to a max of 80%.
	RenegadeEquip:
		TNT1 A 0 A_GiveInventory("RLOModDuelistArmorRenegade",1)
		TNT1 A 0 A_Jump (256, "EquipFinish")
		Goto EquipFinish

//------------------------------------------------------------------------------
// Equip messages are grouped down here.
	PickupDisplayMessage:
// Picking up an armor, and you have room for it.
		TNT1 A 0 A_Print("Picked up the \cuDuelist Armor.", 2)
		Stop
	EquipFinish:
// Successfully wearing an armor.
		TNT1 A 0 A_Print("\cuDuelist Armor \c-equipped.", 2)
		Stop
		
	ArmorAlreadyEquipped:
// You are wearing armor, but you can still drop the armor you are manipulating.
// Check for armor modpack modes that are compatible with this armor.
// Comment out the incompatible jumps.
//		TNT1 A 0 A_JumpIfInventory("RLArmorModItem",1,"ArmorAlreadyEquippedArmorMod")
//		TNT1 A 0 A_JumpIfInventory("RLArmorModItemBlue",1,"ArmorAlreadyEquippedArmorMod")
//		TNT1 A 0 A_JumpIfInventory("RLArmorModItemRed",1,"ArmorAlreadyEquippedArmorMod")
		TNT1 A 0 A_Jump (256, "ArmorAlreadyEquippedMessage")
		Goto ArmorAlreadyEquippedMessage
	NoArmorEquipped:
// You are free to either wear the armor or drop it.
// Check for armor modpack modes that are compatible with this armor.
// Comment out the incompatible jumps.
//		TNT1 A 0 A_JumpIfInventory("RLArmorModItem",1,"NoArmorEquippedArmorMod")
//		TNT1 A 0 A_JumpIfInventory("RLArmorModItemBlue",1,"NoArmorEquippedArmorMod")
//		TNT1 A 0 A_JumpIfInventory("RLArmorModItemRed",1,"NoArmorEquippedArmorMod")
		TNT1 A 0 A_Jump (256, "NoArmorEquippedMessage")
		Goto NoArmorEquippedMessage
		
	NotPickup:
// This is for when you walk over an armor you cannot pick up.
		TNT1 A 0 A_JumpIfInventory("DRLA_ArmorAntiLogFloodCheck",1,"NotPickup_NoPrint")
		TNT1 A 0 A_GiveInventory("DRLA_ArmorAntiLogFloodCheck")
		TNT1 A 0 A_Print("\cu= Duelist Armor =", 2, "CONFONT")
		Fail
//------------------------------------------------------------------------------
// Color code reference
// j = Standard (White)
// t = Exotic (Purple)
// v = Assembled (Cyan)
// i = Superior (Orange)
// d = Unique (Green)
// g = Demonic (Red)
// k = Legendary (Yellow)
// u = Onyx (Dark Gray)
	}
}

ACTOR RLOModDuelistArmorPickupSpecial : RLOModDuelistArmorPickup
{
    Inventory.InterHubAmount 0
    Inventory.MaxAmount 0
	+INVENTORY.AUTOACTIVATE
	States
	{
	SpawnDRPGCheck:
// Initialize the item with DoomRPG so it can be used with cool stuff.
// We skip the special start checks so we don't make infinite loops.
		TNT1 A 0 A_JumpIf(CallACS("DRPGCheckTiem"), "DRPGInit")
		TNT1 A 0 A_Jump (256, "SpawnLoopFall")
		Goto SpawnLoopFall	
//------------------------------------------------------------------------------
	Pickup:
		TNT1 A 0
// Check to see if you have the capacity to pickup this armor.
//		TNT1 A 0 A_JumpIf(CallACS("DRPGCheckTiem"), "PickupNonLimited")
		TNT1 A 0 A_JumpIfInventory("RLArmorInInventory",0,"NotPickup")
		TNT1 A 0 A_GiveInventory("RLOModDuelistArmorPickup",1)
		Stop
		
	PickupNonLimited:
		TNT1 A 0
// Check to see if you have the capacity to pickup this armor.
        TNT1 A 0 ACS_NamedExecuteWithResult("CheckCapacity") // Special Capacity checking function for armor
		TNT1 A 0 A_GiveInventory("RLOModDuelistArmorPickup",1)
		Stop
//------------------------------------------------------------------------------
	Use:
		Stop	
	}
}
		
Actor RLOModDuelistArmor : RLGenericArmor
{
  Armor.Savepercent 20
  Armor.Saveamount 99999
  DamageFactor "Melee", 0.50
  DamageFactor "Bullet", 0.50
}
	
Actor RLOModDuelistArmorRenegade : RLOModDuelistArmor
{
  Armor.Savepercent 30
}

Actor RLOModDuelistArmorToken : RLPermanentInventory {}
Actor RLOModDuelistArmorUse : RLPermanentInventory {}

//==============================================================================

ACTOR RLOModEnergyShieldedVestArmorPickup : RLGenericArmorPickup 18086
{
    //$category "Onyx-modded Armor"
	//$Sprite ONYAH0
    Tag "Energy-shielded Vest [O]"
    Inventory.Icon "ONYHBOX"
	Inventory.PickupSound "misc/rlarmor2"
	Inventory.UseSound "misc/rlshield"
	Inventory.RespawnTics 10500
	+DONTGIB
	States
	{
	SpawnRarityBeam:
// Create the appropriate rarity beam for the item.
		TNT1 A 0 A_SpawnItemEx("RLRarityBeamOnyx", 0,0,0, 0,0,0, 0, SXF_SETMASTER)
		TNT1 A 0 A_Jump (256, "SpawnDRPGCheck")
		Goto SpawnDRPGCheck
		
    SpawnLoopFall:
		ONYA H 0 A_JumpIf(Abs(VelZ) <= 0.01 && user_floorhit == 0, "FloorHit")
		"####" "#" 1
		Loop
	SpawnLoop:
// Play the armor's sprite animation.
		ONYA H 4
		ONYA I 4 Bright
		Loop
			
//------------------------------------------------------------------------------
// Apply an Onyx mod to the armor in your inventory.
// Or not.
	OnyxModActivate:
		TNT1 A 0 A_GiveInventory("RLDeselectionFunction",1)
		TNT1 A 0 A_PlaySound ("hud/error", 7, 1)
		TNT1 A 0 A_Print("This armor is already \cuindestructible.\c-")
		Fail
		
//------------------------------------------------------------------------------
// These two states are used to detect armor modpacks if the armor can be altered.
// These states only need to be redefined if the armor cannot be converted with them.
	ArmorAlreadyEquipped:
// You are wearing armor, but you can still drop the armor you are manipulating.
//		TNT1 A 0 A_JumpIfInventory("RLArmorModItem", 1, "ArmorAlreadyEquippedArmorMod")
//		TNT1 A 0 A_JumpIfInventory("RLArmorModItemBlue", 1, "ArmorAlreadyEquippedArmorMod")
//		TNT1 A 0 A_JumpIfInventory("RLArmorModItemRed", 1, "ArmorAlreadyEquippedArmorMod")
		TNT1 A 0 A_Jump (256, "ArmorAlreadyEquippedMessage")
		Goto ArmorAlreadyEquippedMessage
	NoArmorEquipped:
// You are free to either wear the armor or drop it.
//		TNT1 A 0 A_JumpIfInventory("RLArmorModItem", 1, "NoArmorEquippedArmorMod")
//		TNT1 A 0 A_JumpIfInventory("RLArmorModItemBlue", 1, "NoArmorEquippedArmorMod")
//		TNT1 A 0 A_JumpIfInventory("RLArmorModItemRed", 1, "NoArmorEquippedArmorMod")
		TNT1 A 0 A_Jump (256, "NoArmorEquippedMessage")
		Goto NoArmorEquippedMessage
		
//------------------------------------------------------------------------------
	ArmorAlreadyEquippedMessage:
// Check for an Onyx mod in your inventory, and print a different string if there is.
// Comment out the jump if it cannot be Onyx modded.
//		TNT1 A 0 A_JumpIfInventory("RLOnyxModItem", 1, "ArmorAlreadyEquippedMessage2")
		TNT1 A 0 A_Jump (256, "ArmorAlreadyEquippedMessage1")
		Goto ArmorAlreadyEquippedMessage1
		
	ArmorAlreadyEquippedArmorMod:
// Check for an Onyx mod in your inventory, and print a different string if there is.
// Comment out the jump if it cannot be Onyx modded.
//		TNT1 A 0 A_JumpIfInventory("RLOnyxModItem", 1, "ArmorAlreadyEquippedArmorMod2")
		TNT1 A 0 A_Jump (256, "ArmorAlreadyEquippedArmorMod1")
		Goto ArmorAlreadyEquippedArmorMod1
		
	NoArmorEquippedMessage:
// Check for an Onyx mod in your inventory, and print a different string if there is.
// Comment out the jump if it cannot be Onyx modded.
//		TNT1 A 0 A_JumpIfInventory("RLOnyxModItem", 1, "NoArmorEquippedMessage2")
		TNT1 A 0 A_Jump (256, "NoArmorEquippedMessage1")
		Goto NoArmorEquippedMessage1
		
	NoArmorEquippedArmorMod:
// You may also convert it with an armor modpack.
// Check for an Onyx mod in your inventory, and print a different string if there is.
// Comment out the jump if it cannot be Onyx modded.
//		TNT1 A 0 A_JumpIfInventory("RLOnyxModItem", 1, "NoArmorEquippedArmorMod2")
		TNT1 A 0 A_Jump (256, "NoArmorEquippedArmorMod1")
		Goto NoArmorEquippedArmorMod1
		
//------------------------------------------------------------------------------
	NoArmorModpackActive:
// Check to see if this armor has been activated once before.
		TNT1 A 0 A_JumpIfInventory("RLOModEnergyShieldedVestArmorUse",1,"ArmorEquip")
		TNT1 A 0 A_Jump (256, "UseTokenRemoval")
		Goto UseTokenRemoval
		
	UseTokenGiven:
// Gives you the identifier that indicates what armor you are manipulating right now.
		TNT1 A 0 A_GiveInventory("RLOModEnergyShieldedVestArmorUse", 1)
// Check to see if you are already wearing armor and change the activation message.
		TNT1 A 0 A_Jump (256, "ArmorWornCheck")
		Goto ArmorWornCheck
		
	ArmorEquipTokens:
		TNT1 A 0 A_TakeInventory("RLOModEnergyShieldedVestArmorUse",1)
		TNT1 A 0 A_TakeInventory("RLArmorInInventory",1)
// Give the Token and/or Bonus items that are used to define the armor as being worn.
		TNT1 A 0 A_GiveInventory("RLOModEnergyShieldedVestArmorToken",1)
		TNT1 A 0 A_GiveInventory("RLIndestructibleArmorWorn",1)
// Give a different armor based on whether or not you are the Renegade.
		TNT1 A 0 A_JumpIfInventory("RLShellshockPerk",1,"RenegadeEquip")
		TNT1 A 0 A_GiveInventory("RLOModEnergyShieldedVestArmor",1)
		TNT1 A 0 A_Jump (256, "EquipFinish")
		Goto EquipFinish
		
// The Renegade gets a version of the armor with 1.5x more protection, up to a max of 80%.
	RenegadeEquip:
		TNT1 A 0 A_GiveInventory("RLOModEnergyShieldedVestArmorRenegade",1)
		TNT1 A 0 A_Jump (256, "EquipFinish")
		Goto EquipFinish

//------------------------------------------------------------------------------
// Equip messages are grouped down here.
	PickupDisplayMessage:
// Picking up an armor, and you have room for it.
		TNT1 A 0 A_Print("Picked up the \cuEnergy-shielded Vest.", 2)
		Stop
	EquipFinish:
// Successfully wearing an armor.
		TNT1 A 0 A_Print("\cuEnergy-shielded Vest \c-equipped.", 2)
		Stop
		
	ArmorAlreadyEquipped:
// You are wearing armor, but you can still drop the armor you are manipulating.
// Check for armor modpack modes that are compatible with this armor.
// Comment out the incompatible jumps.
//		TNT1 A 0 A_JumpIfInventory("RLArmorModItem",1,"ArmorAlreadyEquippedArmorMod")
//		TNT1 A 0 A_JumpIfInventory("RLArmorModItemBlue",1,"ArmorAlreadyEquippedArmorMod")
//		TNT1 A 0 A_JumpIfInventory("RLArmorModItemRed",1,"ArmorAlreadyEquippedArmorMod")
		TNT1 A 0 A_Jump (256, "ArmorAlreadyEquippedMessage")
		Goto ArmorAlreadyEquippedMessage
	NoArmorEquipped:
// You are free to either wear the armor or drop it.
// Check for armor modpack modes that are compatible with this armor.
// Comment out the incompatible jumps.
//		TNT1 A 0 A_JumpIfInventory("RLArmorModItem",1,"NoArmorEquippedArmorMod")
//		TNT1 A 0 A_JumpIfInventory("RLArmorModItemBlue",1,"NoArmorEquippedArmorMod")
//		TNT1 A 0 A_JumpIfInventory("RLArmorModItemRed",1,"NoArmorEquippedArmorMod")
		TNT1 A 0 A_Jump (256, "NoArmorEquippedMessage")
		Goto NoArmorEquippedMessage
		
	NotPickup:
// This is for when you walk over an armor you cannot pick up.
		TNT1 A 0 A_JumpIfInventory("DRLA_ArmorAntiLogFloodCheck",1,"NotPickup_NoPrint")
		TNT1 A 0 A_GiveInventory("DRLA_ArmorAntiLogFloodCheck")
		TNT1 A 0 A_Print("\cu= Energy-shielded Vest =", 2, "CONFONT")
		Fail
//------------------------------------------------------------------------------
// Color code reference
// j = Standard (White)
// t = Exotic (Purple)
// v = Assembled (Cyan)
// i = Superior (Orange)
// d = Unique (Green)
// g = Demonic (Red)
// k = Legendary (Yellow)
// u = Onyx (Dark Gray)
	}
}

ACTOR RLOModEnergyShieldedVestArmorPickupSpecial : RLOModEnergyShieldedVestArmorPickup
{
    Inventory.InterHubAmount 0
    Inventory.MaxAmount 0
	+INVENTORY.AUTOACTIVATE
	States
	{
	SpawnDRPGCheck:
// Initialize the item with DoomRPG so it can be used with cool stuff.
// We skip the special start checks so we don't make infinite loops.
		TNT1 A 0 A_JumpIf(CallACS("DRPGCheckTiem"), "DRPGInit")
		TNT1 A 0 A_Jump (256, "SpawnLoopFall")
		Goto SpawnLoopFall	
//------------------------------------------------------------------------------
	Pickup:
		TNT1 A 0
// Check to see if you have the capacity to pickup this armor.
//		TNT1 A 0 A_JumpIf(CallACS("DRPGCheckTiem"), "PickupNonLimited")
		TNT1 A 0 A_JumpIfInventory("RLArmorInInventory",0,"NotPickup")
		TNT1 A 0 A_GiveInventory("RLOModEnergyShieldedVestArmorPickup",1)
		Stop
		
	PickupNonLimited:
		TNT1 A 0
// Check to see if you have the capacity to pickup this armor.
        TNT1 A 0 ACS_NamedExecuteWithResult("CheckCapacity") // Special Capacity checking function for armor
		TNT1 A 0 A_GiveInventory("RLOModEnergyShieldedVestArmorPickup",1)
		Stop
//------------------------------------------------------------------------------
	Use:
		Stop	
	}
}
		
Actor RLOModEnergyShieldedVestArmor : RLGenericArmor
{
  Armor.Savepercent 10
  Armor.Saveamount 99999
  DamageFactor "Fire", 0.50
  DamageFactor "Plasma", 0.50
}
	
Actor RLOModEnergyShieldedVestArmorRenegade : RLOModEnergyShieldedVestArmor
{
  Armor.Savepercent 15
}

Actor RLOModEnergyShieldedVestArmorToken : RLPermanentInventory {}
Actor RLOModEnergyShieldedVestArmorUse : RLPermanentInventory {}

//==============================================================================

ACTOR RLOModGothicArmorPickup : RLGenericArmorPickup 18087
{
    //$category "Onyx-modded Armor"
	//$Sprite ONYAJ0
    Tag "Gothic Armor [O]"
    Inventory.Icon "ONYJBOX"
	Inventory.PickupSound "misc/rlarmor5"
	Inventory.UseSound "armor/equip"
	Inventory.RespawnTics 10500
	+DONTGIB
	States
	{
	SpawnRarityBeam:
// Create the appropriate rarity beam for the item.
		TNT1 A 0 A_SpawnItemEx("RLRarityBeamOnyx", 0,0,0, 0,0,0, 0, SXF_SETMASTER)
		TNT1 A 0 A_Jump (256, "SpawnDRPGCheck")
		Goto SpawnDRPGCheck
		
    SpawnLoopFall:
		ONYA J 0 A_JumpIf(Abs(VelZ) <= 0.01 && user_floorhit == 0, "FloorHit")
		"####" "#" 1
		Loop
	SpawnLoop:
// Play the armor's sprite animation.
		ONYA J 6
		ONYA J 6 Bright
		Loop
			
//------------------------------------------------------------------------------
// Apply an Onyx mod to the armor in your inventory.
// Or not.
	OnyxModActivate:
		TNT1 A 0 A_GiveInventory("RLDeselectionFunction",1)
		TNT1 A 0 A_PlaySound ("hud/error", 7, 1)
		TNT1 A 0 A_Print("This armor is already \cuindestructible.\c-")
		Fail
		
//------------------------------------------------------------------------------
// These two states are used to detect armor modpacks if the armor can be altered.
// These states only need to be redefined if the armor cannot be converted with them.
	ArmorAlreadyEquipped:
// You are wearing armor, but you can still drop the armor you are manipulating.
//		TNT1 A 0 A_JumpIfInventory("RLArmorModItem", 1, "ArmorAlreadyEquippedArmorMod")
//		TNT1 A 0 A_JumpIfInventory("RLArmorModItemBlue", 1, "ArmorAlreadyEquippedArmorMod")
//		TNT1 A 0 A_JumpIfInventory("RLArmorModItemRed", 1, "ArmorAlreadyEquippedArmorMod")
		TNT1 A 0 A_Jump (256, "ArmorAlreadyEquippedMessage")
		Goto ArmorAlreadyEquippedMessage
	NoArmorEquipped:
// You are free to either wear the armor or drop it.
//		TNT1 A 0 A_JumpIfInventory("RLArmorModItem", 1, "NoArmorEquippedArmorMod")
//		TNT1 A 0 A_JumpIfInventory("RLArmorModItemBlue", 1, "NoArmorEquippedArmorMod")
//		TNT1 A 0 A_JumpIfInventory("RLArmorModItemRed", 1, "NoArmorEquippedArmorMod")
		TNT1 A 0 A_Jump (256, "NoArmorEquippedMessage")
		Goto NoArmorEquippedMessage
		
//------------------------------------------------------------------------------
	ArmorAlreadyEquippedMessage:
// Check for an Onyx mod in your inventory, and print a different string if there is.
// Comment out the jump if it cannot be Onyx modded.
//		TNT1 A 0 A_JumpIfInventory("RLOnyxModItem", 1, "ArmorAlreadyEquippedMessage2")
		TNT1 A 0 A_Jump (256, "ArmorAlreadyEquippedMessage1")
		Goto ArmorAlreadyEquippedMessage1
		
	ArmorAlreadyEquippedArmorMod:
// Check for an Onyx mod in your inventory, and print a different string if there is.
// Comment out the jump if it cannot be Onyx modded.
//		TNT1 A 0 A_JumpIfInventory("RLOnyxModItem", 1, "ArmorAlreadyEquippedArmorMod2")
		TNT1 A 0 A_Jump (256, "ArmorAlreadyEquippedArmorMod1")
		Goto ArmorAlreadyEquippedArmorMod1
		
	NoArmorEquippedMessage:
// Check for an Onyx mod in your inventory, and print a different string if there is.
// Comment out the jump if it cannot be Onyx modded.
//		TNT1 A 0 A_JumpIfInventory("RLOnyxModItem", 1, "NoArmorEquippedMessage2")
		TNT1 A 0 A_Jump (256, "NoArmorEquippedMessage1")
		Goto NoArmorEquippedMessage1
		
	NoArmorEquippedArmorMod:
// You may also convert it with an armor modpack.
// Check for an Onyx mod in your inventory, and print a different string if there is.
// Comment out the jump if it cannot be Onyx modded.
//		TNT1 A 0 A_JumpIfInventory("RLOnyxModItem", 1, "NoArmorEquippedArmorMod2")
		TNT1 A 0 A_Jump (256, "NoArmorEquippedArmorMod1")
		Goto NoArmorEquippedArmorMod1
		
//------------------------------------------------------------------------------
	NoArmorModpackActive:
// Check to see if this armor has been activated once before.
		TNT1 A 0 A_JumpIfInventory("RLOModGothicArmorUse",1,"ArmorEquip")
		TNT1 A 0 A_Jump (256, "UseTokenRemoval")
		Goto UseTokenRemoval
		
	UseTokenGiven:
// Gives you the identifier that indicates what armor you are manipulating right now.
		TNT1 A 0 A_GiveInventory("RLOModGothicArmorUse", 1)
// Check to see if you are already wearing armor and change the activation message.
		TNT1 A 0 A_Jump (256, "ArmorWornCheck")
		Goto ArmorWornCheck
		
	ArmorEquipTokens:
		TNT1 A 0 A_TakeInventory("RLOModGothicArmorUse",1)
		TNT1 A 0 A_TakeInventory("RLArmorInInventory",1)
// Give the Token and/or Bonus items that are used to define the armor as being worn.
		TNT1 A 0 A_GiveInventory("RLOModGothicArmorToken",1)
		TNT1 A 0 A_GiveInventory("RLIndestructibleArmorWorn",1)
// Give a different armor based on whether or not you are the Renegade.
		TNT1 A 0 A_JumpIfInventory("RLShellshockPerk",1,"RenegadeEquip")
		TNT1 A 0 A_GiveInventory("RLOModGothicArmor",1)
		TNT1 A 0 A_Jump (256, "EquipFinish")
		Goto EquipFinish
		
// The Renegade gets a version of the armor with 1.5x more protection, up to a max of 80%.
	RenegadeEquip:
		TNT1 A 0 A_GiveInventory("RLOModGothicArmorRenegade",1)
		TNT1 A 0 A_Jump (256, "EquipFinish")
		Goto EquipFinish

//------------------------------------------------------------------------------
// Equip messages are grouped down here.
	PickupDisplayMessage:
// Picking up an armor, and you have room for it.
		TNT1 A 0 A_Print("Picked up the \cuGothic Armor.", 2)
		Stop
	EquipFinish:
// Successfully wearing an armor.
		TNT1 A 0 A_Print("\cuGothic Armor \c-equipped.", 2)
		TNT1 A 0 ACS_NamedExecuteWithResult("RLGothicSetBonusCheck", 1) // Checks for all parts of the set bonus, gives or removes it accordingly - argument is tic delay before checking
		Stop
		
	ArmorAlreadyEquipped:
// You are wearing armor, but you can still drop the armor you are manipulating.
// Check for armor modpack modes that are compatible with this armor.
// Comment out the incompatible jumps.
//		TNT1 A 0 A_JumpIfInventory("RLArmorModItem",1,"ArmorAlreadyEquippedArmorMod")
//		TNT1 A 0 A_JumpIfInventory("RLArmorModItemBlue",1,"ArmorAlreadyEquippedArmorMod")
//		TNT1 A 0 A_JumpIfInventory("RLArmorModItemRed",1,"ArmorAlreadyEquippedArmorMod")
		TNT1 A 0 A_Jump (256, "ArmorAlreadyEquippedMessage")
		Goto ArmorAlreadyEquippedMessage
	NoArmorEquipped:
// You are free to either wear the armor or drop it.
// Check for armor modpack modes that are compatible with this armor.
// Comment out the incompatible jumps.
//		TNT1 A 0 A_JumpIfInventory("RLArmorModItem",1,"NoArmorEquippedArmorMod")
//		TNT1 A 0 A_JumpIfInventory("RLArmorModItemBlue",1,"NoArmorEquippedArmorMod")
//		TNT1 A 0 A_JumpIfInventory("RLArmorModItemRed",1,"NoArmorEquippedArmorMod")
		TNT1 A 0 A_Jump (256, "NoArmorEquippedMessage")
		Goto NoArmorEquippedMessage
		
	NotPickup:
// This is for when you walk over an armor you cannot pick up.
		TNT1 A 0 A_JumpIfInventory("DRLA_ArmorAntiLogFloodCheck",1,"NotPickup_NoPrint")
		TNT1 A 0 A_GiveInventory("DRLA_ArmorAntiLogFloodCheck")
		TNT1 A 0 A_Print("\cu= Gothic Armor =", 2, "CONFONT")
		Fail
		
//------------------------------------------------------------------------------
/*	SetBonusChecking:
		TNT1 A 0 A_GiveInventory("RLGothicSetBonusArmor",1)
		TNT1 A 0 A_JumpIfInventory("RLGothicSetBonusBoots",1,"SetBonusCheckingDetection")
		Stop
	SetBonusCheckingDetection:
		TNT1 A 0 A_JumpIfInventory("RLGothicSetBonusBoots",1,1)
		Stop
		TNT1 A 0 A_GiveInventory("RLGothicSetBonusActive",1)
		TNT1 A 0 A_Print("\ctGothic Armor \c-equipped.\n\cf= GOTHIC ARMS =\n\cgMassively increases punching melee damage", 8, "CONFONT")
		Stop*/
//------------------------------------------------------------------------------
// Color code reference
// j = Standard (White)
// t = Exotic (Purple)
// v = Assembled (Cyan)
// i = Superior (Orange)
// d = Unique (Green)
// g = Demonic (Red)
// k = Legendary (Yellow)
// u = Onyx (Dark Gray)
	}
}

ACTOR RLOModGothicArmorPickupSpecial : RLOModGothicArmorPickup
{
    Inventory.InterHubAmount 0
    Inventory.MaxAmount 0
	+INVENTORY.AUTOACTIVATE
	States
	{
	SpawnDRPGCheck:
// Initialize the item with DoomRPG so it can be used with cool stuff.
// We skip the special start checks so we don't make infinite loops.
		TNT1 A 0 A_JumpIf(CallACS("DRPGCheckTiem"), "DRPGInit")
		TNT1 A 0 A_Jump (256, "SpawnLoopFall")
		Goto SpawnLoopFall	
//------------------------------------------------------------------------------
	Pickup:
		TNT1 A 0
// Check to see if you have the capacity to pickup this armor.
//		TNT1 A 0 A_JumpIf(CallACS("DRPGCheckTiem"), "PickupNonLimited")
		TNT1 A 0 A_JumpIfInventory("RLArmorInInventory",0,"NotPickup")
		TNT1 A 0 A_GiveInventory("RLOModGothicArmorPickup",1)
		Stop
		
	PickupNonLimited:
		TNT1 A 0
// Check to see if you have the capacity to pickup this armor.
        TNT1 A 0 ACS_NamedExecuteWithResult("CheckCapacity") // Special Capacity checking function for armor
		TNT1 A 0 A_GiveInventory("RLOModGothicArmorPickup",1)
		Stop
//------------------------------------------------------------------------------
	Use:
		Stop	
	}
}
		
Actor RLOModGothicArmor : RLGenericArmor
{
  Armor.Savepercent 70
  Armor.Saveamount 99999
  DamageFactor "Melee", 0.50
  DamageFactor "Bullet", 0.50
}
	
Actor RLOModGothicArmorRenegade : RLOModGothicArmor
{
  Armor.Savepercent 80
}

Actor RLOModGothicArmorToken : RLPermanentInventory {}
Actor RLOModGothicArmorUse : RLPermanentInventory {}

//==============================================================================

ACTOR RLOModMedicalArmorPickup : RLGenericArmorPickup 18088
{
    //$category "Onyx-modded Armor"
	//$Sprite ONYAK0
    Tag "Medical Armor [O]"
    Inventory.Icon "ONYKBOX"
	Inventory.PickupSound "misc/rlarmor2"
	Inventory.UseSound "armor/equip"
	Inventory.RespawnTics 10500
	+DONTGIB
	States
	{
	SpawnRarityBeam:
// Create the appropriate rarity beam for the item.
		TNT1 A 0 A_SpawnItemEx("RLRarityBeamOnyx", 0,0,0, 0,0,0, 0, SXF_SETMASTER)
		TNT1 A 0 A_Jump (256, "SpawnDRPGCheck")
		Goto SpawnDRPGCheck
		
    SpawnLoopFall:
		ONYA K 0 A_JumpIf(Abs(VelZ) <= 0.01 && user_floorhit == 0, "FloorHit")
		"####" "#" 1
		Loop
	SpawnLoop:
// Play the armor's sprite animation.
		ONYA K 6
		ONYA K 6 Bright
		Loop
			
//------------------------------------------------------------------------------
// Apply an Onyx mod to the armor in your inventory.
// Or not.
	OnyxModActivate:
		TNT1 A 0 A_GiveInventory("RLDeselectionFunction",1)
		TNT1 A 0 A_PlaySound ("hud/error", 7, 1)
		TNT1 A 0 A_Print("This armor is already \cuindestructible.\c-")
		Fail
		
//------------------------------------------------------------------------------
// These two states are used to detect armor modpacks if the armor can be altered.
// These states only need to be redefined if the armor cannot be converted with them.
	ArmorAlreadyEquipped:
// You are wearing armor, but you can still drop the armor you are manipulating.
//		TNT1 A 0 A_JumpIfInventory("RLArmorModItem", 1, "ArmorAlreadyEquippedArmorMod")
//		TNT1 A 0 A_JumpIfInventory("RLArmorModItemBlue", 1, "ArmorAlreadyEquippedArmorMod")
//		TNT1 A 0 A_JumpIfInventory("RLArmorModItemRed", 1, "ArmorAlreadyEquippedArmorMod")
		TNT1 A 0 A_Jump (256, "ArmorAlreadyEquippedMessage")
		Goto ArmorAlreadyEquippedMessage
	NoArmorEquipped:
// You are free to either wear the armor or drop it.
//		TNT1 A 0 A_JumpIfInventory("RLArmorModItem", 1, "NoArmorEquippedArmorMod")
//		TNT1 A 0 A_JumpIfInventory("RLArmorModItemBlue", 1, "NoArmorEquippedArmorMod")
//		TNT1 A 0 A_JumpIfInventory("RLArmorModItemRed", 1, "NoArmorEquippedArmorMod")
		TNT1 A 0 A_Jump (256, "NoArmorEquippedMessage")
		Goto NoArmorEquippedMessage
		
//------------------------------------------------------------------------------
	ArmorAlreadyEquippedMessage:
// Check for an Onyx mod in your inventory, and print a different string if there is.
// Comment out the jump if it cannot be Onyx modded.
//		TNT1 A 0 A_JumpIfInventory("RLOnyxModItem", 1, "ArmorAlreadyEquippedMessage2")
		TNT1 A 0 A_Jump (256, "ArmorAlreadyEquippedMessage1")
		Goto ArmorAlreadyEquippedMessage1
		
	ArmorAlreadyEquippedArmorMod:
// Check for an Onyx mod in your inventory, and print a different string if there is.
// Comment out the jump if it cannot be Onyx modded.
//		TNT1 A 0 A_JumpIfInventory("RLOnyxModItem", 1, "ArmorAlreadyEquippedArmorMod2")
		TNT1 A 0 A_Jump (256, "ArmorAlreadyEquippedArmorMod1")
		Goto ArmorAlreadyEquippedArmorMod1
		
	NoArmorEquippedMessage:
// Check for an Onyx mod in your inventory, and print a different string if there is.
// Comment out the jump if it cannot be Onyx modded.
//		TNT1 A 0 A_JumpIfInventory("RLOnyxModItem", 1, "NoArmorEquippedMessage2")
		TNT1 A 0 A_Jump (256, "NoArmorEquippedMessage1")
		Goto NoArmorEquippedMessage1
		
	NoArmorEquippedArmorMod:
// You may also convert it with an armor modpack.
// Check for an Onyx mod in your inventory, and print a different string if there is.
// Comment out the jump if it cannot be Onyx modded.
//		TNT1 A 0 A_JumpIfInventory("RLOnyxModItem", 1, "NoArmorEquippedArmorMod2")
		TNT1 A 0 A_Jump (256, "NoArmorEquippedArmorMod1")
		Goto NoArmorEquippedArmorMod1
		
//------------------------------------------------------------------------------
	NoArmorModpackActive:
// Check to see if this armor has been activated once before.
		TNT1 A 0 A_JumpIfInventory("RLOModMedicalArmorUse",1,"ArmorEquip")
		TNT1 A 0 A_Jump (256, "UseTokenRemoval")
		Goto UseTokenRemoval
		
	UseTokenGiven:
// Gives you the identifier that indicates what armor you are manipulating right now.
		TNT1 A 0 A_GiveInventory("RLOModMedicalArmorUse", 1)
// Check to see if you are already wearing armor and change the activation message.
		TNT1 A 0 A_Jump (256, "ArmorWornCheck")
		Goto ArmorWornCheck
		
	ArmorEquipTokens:
		TNT1 A 0 A_TakeInventory("RLOModMedicalArmorUse",1)
		TNT1 A 0 A_TakeInventory("RLArmorInInventory",1)
// Give the Token and/or Bonus items that are used to define the armor as being worn.
		TNT1 A 0 A_GiveInventory("RLOModMedicalArmorToken",1)
		TNT1 A 0 A_GiveInventory("RLOModMedicalArmorBonus",1)
		TNT1 A 0 A_GiveInventory("RLIndestructibleArmorWorn",1)
// Give a different armor based on whether or not you are the Renegade.
		TNT1 A 0 A_JumpIfInventory("RLShellshockPerk",1,"RenegadeEquip")
		TNT1 A 0 A_GiveInventory("RLOModMedicalArmor",1)
		TNT1 A 0 A_Jump (256, "EquipFinish")
		Goto EquipFinish
		
// The Renegade gets a version of the armor with 1.5x more protection, up to a max of 80%.
	RenegadeEquip:
		TNT1 A 0 A_GiveInventory("RLOModMedicalArmorRenegade",1)
		TNT1 A 0 A_Jump (256, "EquipFinish")
		Goto EquipFinish

//------------------------------------------------------------------------------
// Equip messages are grouped down here.
	PickupDisplayMessage:
// Picking up an armor, and you have room for it.
		TNT1 A 0 A_Print("Picked up the \cuMedical Armor.", 2)
		Stop
	EquipFinish:
// Successfully wearing an armor.
		TNT1 A 0 A_Print("\cuMedical Armor \c-equipped.", 2)
		Stop
		
	ArmorAlreadyEquipped:
// You are wearing armor, but you can still drop the armor you are manipulating.
// Check for armor modpack modes that are compatible with this armor.
// Comment out the incompatible jumps.
//		TNT1 A 0 A_JumpIfInventory("RLArmorModItem",1,"ArmorAlreadyEquippedArmorMod")
//		TNT1 A 0 A_JumpIfInventory("RLArmorModItemBlue",1,"ArmorAlreadyEquippedArmorMod")
//		TNT1 A 0 A_JumpIfInventory("RLArmorModItemRed",1,"ArmorAlreadyEquippedArmorMod")
		TNT1 A 0 A_Jump (256, "ArmorAlreadyEquippedMessage")
		Goto ArmorAlreadyEquippedMessage
	NoArmorEquipped:
// You are free to either wear the armor or drop it.
// Check for armor modpack modes that are compatible with this armor.
// Comment out the incompatible jumps.
//		TNT1 A 0 A_JumpIfInventory("RLArmorModItem",1,"NoArmorEquippedArmorMod")
//		TNT1 A 0 A_JumpIfInventory("RLArmorModItemBlue",1,"NoArmorEquippedArmorMod")
//		TNT1 A 0 A_JumpIfInventory("RLArmorModItemRed",1,"NoArmorEquippedArmorMod")
		TNT1 A 0 A_Jump (256, "NoArmorEquippedMessage")
		Goto NoArmorEquippedMessage
		
	NotPickup:
// This is for when you walk over an armor you cannot pick up.
		TNT1 A 0 A_JumpIfInventory("DRLA_ArmorAntiLogFloodCheck",1,"NotPickup_NoPrint")
		TNT1 A 0 A_GiveInventory("DRLA_ArmorAntiLogFloodCheck")
		TNT1 A 0 A_Print("\cu= Medical Armor =", 2, "CONFONT")
		Fail
//------------------------------------------------------------------------------
// Color code reference
// j = Standard (White)
// t = Exotic (Purple)
// v = Assembled (Cyan)
// i = Superior (Orange)
// d = Unique (Green)
// g = Demonic (Red)
// k = Legendary (Yellow)
// u = Onyx (Dark Gray)
	}
}

ACTOR RLOModMedicalArmorPickupSpecial : RLOModMedicalArmorPickup
{
    Inventory.InterHubAmount 0
    Inventory.MaxAmount 0
	+INVENTORY.AUTOACTIVATE
	States
	{
	SpawnDRPGCheck:
// Initialize the item with DoomRPG so it can be used with cool stuff.
// We skip the special start checks so we don't make infinite loops.
		TNT1 A 0 A_JumpIf(CallACS("DRPGCheckTiem"), "DRPGInit")
		TNT1 A 0 A_Jump (256, "SpawnLoopFall")
		Goto SpawnLoopFall	
//------------------------------------------------------------------------------
	Pickup:
		TNT1 A 0
// Check to see if you have the capacity to pickup this armor.
//		TNT1 A 0 A_JumpIf(CallACS("DRPGCheckTiem"), "PickupNonLimited")
		TNT1 A 0 A_JumpIfInventory("RLArmorInInventory",0,"NotPickup")
		TNT1 A 0 A_GiveInventory("RLOModMedicalArmorPickup",1)
		Stop
		
	PickupNonLimited:
		TNT1 A 0
// Check to see if you have the capacity to pickup this armor.
        TNT1 A 0 ACS_NamedExecuteWithResult("CheckCapacity") // Special Capacity checking function for armor
		TNT1 A 0 A_GiveInventory("RLOModMedicalArmorPickup",1)
		Stop
//------------------------------------------------------------------------------
	Use:
		Stop	
	}
}
		
Actor RLOModMedicalArmor : RLGenericArmor
{
  Armor.Savepercent 20
  Armor.Saveamount 99999
  DamageFactor "Melee", 0.80
  DamageFactor "Bullet", 0.80
  DamageFactor "Radiation", 0.75
}
	
Actor RLOModMedicalArmorRenegade : RLOModMedicalArmor
{
  Armor.Savepercent 30
}

Actor RLOModMedicalArmorToken : RLPermanentInventory {}
Actor RLOModMedicalArmorBonus : RLPermanentInventory {}
Actor RLOModMedicalArmorUse : RLPermanentInventory {}

//==============================================================================

ACTOR RLOModPhaseshiftArmorPickup : RLGenericArmorPickup 18089
{
    //$category "Onyx-modded Armor"
	//$Sprite ONYAL0
    Tag "Phaseshift Armor [O]"
    Inventory.Icon "ONYLBOX"
	Inventory.PickupSound "misc/rlarmor3"
	Inventory.UseSound "armor/equip"
	Inventory.RespawnTics 10500
	+DONTGIB
	States
	{
	SpawnRarityBeam:
// Create the appropriate rarity beam for the item.
		TNT1 A 0 A_SpawnItemEx("RLRarityBeamOnyx", 0,0,0, 0,0,0, 0, SXF_SETMASTER)
		TNT1 A 0 A_Jump (256, "SpawnDRPGCheck")
		Goto SpawnDRPGCheck
		
    SpawnLoopFall:
		ONYA L 0 A_JumpIf(Abs(VelZ) <= 0.01 && user_floorhit == 0, "FloorHit")
		"####" "#" 1
		Loop
	SpawnLoop:
// Play the armor's sprite animation.
		ONYA L 6
		ONYA L 6 Bright
		Loop
			
//------------------------------------------------------------------------------
// Apply an Onyx mod to the armor in your inventory.
// Or not.
	OnyxModActivate:
		TNT1 A 0 A_GiveInventory("RLDeselectionFunction",1)
		TNT1 A 0 A_PlaySound ("hud/error", 7, 1)
		TNT1 A 0 A_Print("This armor is already \cuindestructible.\c-")
		Fail
		
//------------------------------------------------------------------------------
// These two states are used to detect armor modpacks if the armor can be altered.
// These states only need to be redefined if the armor cannot be converted with them.
	ArmorAlreadyEquipped:
// You are wearing armor, but you can still drop the armor you are manipulating.
//		TNT1 A 0 A_JumpIfInventory("RLArmorModItem", 1, "ArmorAlreadyEquippedArmorMod")
//		TNT1 A 0 A_JumpIfInventory("RLArmorModItemBlue", 1, "ArmorAlreadyEquippedArmorMod")
//		TNT1 A 0 A_JumpIfInventory("RLArmorModItemRed", 1, "ArmorAlreadyEquippedArmorMod")
		TNT1 A 0 A_Jump (256, "ArmorAlreadyEquippedMessage")
		Goto ArmorAlreadyEquippedMessage
	NoArmorEquipped:
// You are free to either wear the armor or drop it.
//		TNT1 A 0 A_JumpIfInventory("RLArmorModItem", 1, "NoArmorEquippedArmorMod")
//		TNT1 A 0 A_JumpIfInventory("RLArmorModItemBlue", 1, "NoArmorEquippedArmorMod")
//		TNT1 A 0 A_JumpIfInventory("RLArmorModItemRed", 1, "NoArmorEquippedArmorMod")
		TNT1 A 0 A_Jump (256, "NoArmorEquippedMessage")
		Goto NoArmorEquippedMessage
		
//------------------------------------------------------------------------------
	ArmorAlreadyEquippedMessage:
// Check for an Onyx mod in your inventory, and print a different string if there is.
// Comment out the jump if it cannot be Onyx modded.
//		TNT1 A 0 A_JumpIfInventory("RLOnyxModItem", 1, "ArmorAlreadyEquippedMessage2")
		TNT1 A 0 A_Jump (256, "ArmorAlreadyEquippedMessage1")
		Goto ArmorAlreadyEquippedMessage1
		
	ArmorAlreadyEquippedArmorMod:
// Check for an Onyx mod in your inventory, and print a different string if there is.
// Comment out the jump if it cannot be Onyx modded.
//		TNT1 A 0 A_JumpIfInventory("RLOnyxModItem", 1, "ArmorAlreadyEquippedArmorMod2")
		TNT1 A 0 A_Jump (256, "ArmorAlreadyEquippedArmorMod1")
		Goto ArmorAlreadyEquippedArmorMod1
		
	NoArmorEquippedMessage:
// Check for an Onyx mod in your inventory, and print a different string if there is.
// Comment out the jump if it cannot be Onyx modded.
//		TNT1 A 0 A_JumpIfInventory("RLOnyxModItem", 1, "NoArmorEquippedMessage2")
		TNT1 A 0 A_Jump (256, "NoArmorEquippedMessage1")
		Goto NoArmorEquippedMessage1
		
	NoArmorEquippedArmorMod:
// You may also convert it with an armor modpack.
// Check for an Onyx mod in your inventory, and print a different string if there is.
// Comment out the jump if it cannot be Onyx modded.
//		TNT1 A 0 A_JumpIfInventory("RLOnyxModItem", 1, "NoArmorEquippedArmorMod2")
		TNT1 A 0 A_Jump (256, "NoArmorEquippedArmorMod1")
		Goto NoArmorEquippedArmorMod1
		
//------------------------------------------------------------------------------
	NoArmorModpackActive:
// Check to see if this armor has been activated once before.
		TNT1 A 0 A_JumpIfInventory("RLOModPhaseshiftArmorUse",1,"ArmorEquip")
		TNT1 A 0 A_Jump (256, "UseTokenRemoval")
		Goto UseTokenRemoval
		
	UseTokenGiven:
// Gives you the identifier that indicates what armor you are manipulating right now.
		TNT1 A 0 A_GiveInventory("RLOModPhaseshiftArmorUse", 1)
// Check to see if you are already wearing armor and change the activation message.
		TNT1 A 0 A_Jump (256, "ArmorWornCheck")
		Goto ArmorWornCheck
		
	ArmorEquipTokens:
		TNT1 A 0 A_TakeInventory("RLOModPhaseshiftArmorUse",1)
		TNT1 A 0 A_TakeInventory("RLArmorInInventory",1)
// Give the Token and/or Bonus items that are used to define the armor as being worn.
		TNT1 A 0 A_GiveInventory("RLOModPhaseshiftArmorToken",1)
		TNT1 A 0 A_GiveInventory("RLIndestructibleArmorWorn",1)
// Give a different armor based on whether or not you are the Renegade.
		TNT1 A 0 A_JumpIfInventory("RLShellshockPerk",1,"RenegadeEquip")
		TNT1 A 0 A_GiveInventory("RLOModPhaseshiftArmor",1)
		TNT1 A 0 A_Jump (256, "EquipFinish")
		Goto EquipFinish
		
// The Renegade gets a version of the armor with 1.5x more protection, up to a max of 80%.
	RenegadeEquip:
		TNT1 A 0 A_GiveInventory("RLOModPhaseshiftArmorRenegade",1)
		TNT1 A 0 A_Jump (256, "EquipFinish")
		Goto EquipFinish

//------------------------------------------------------------------------------
// Equip messages are grouped down here.
	PickupDisplayMessage:
// Picking up an armor, and you have room for it.
		TNT1 A 0 A_Print("Picked up the \cuPhaseshift Armor.", 2)
		Stop
	EquipFinish:
// Successfully wearing an armor.
		TNT1 A 0 A_Print("\cuPhaseshift Armor \c-equipped.", 2)
		TNT1 A 0 ACS_NamedExecuteWithResult("RLPhaseshiftSetBonusCheck", 1) // Checks for all parts of the set bonus, gives or removes it accordingly - argument is tic delay before checking
		Stop
		
	ArmorAlreadyEquipped:
// You are wearing armor, but you can still drop the armor you are manipulating.
// Check for armor modpack modes that are compatible with this armor.
// Comment out the incompatible jumps.
//		TNT1 A 0 A_JumpIfInventory("RLArmorModItem",1,"ArmorAlreadyEquippedArmorMod")
//		TNT1 A 0 A_JumpIfInventory("RLArmorModItemBlue",1,"ArmorAlreadyEquippedArmorMod")
//		TNT1 A 0 A_JumpIfInventory("RLArmorModItemRed",1,"ArmorAlreadyEquippedArmorMod")
		TNT1 A 0 A_Jump (256, "ArmorAlreadyEquippedMessage")
		Goto ArmorAlreadyEquippedMessage
	NoArmorEquipped:
// You are free to either wear the armor or drop it.
// Check for armor modpack modes that are compatible with this armor.
// Comment out the incompatible jumps.
//		TNT1 A 0 A_JumpIfInventory("RLArmorModItem",1,"NoArmorEquippedArmorMod")
//		TNT1 A 0 A_JumpIfInventory("RLArmorModItemBlue",1,"NoArmorEquippedArmorMod")
//		TNT1 A 0 A_JumpIfInventory("RLArmorModItemRed",1,"NoArmorEquippedArmorMod")
		TNT1 A 0 A_Jump (256, "NoArmorEquippedMessage")
		Goto NoArmorEquippedMessage
		
	NotPickup:
// This is for when you walk over an armor you cannot pick up.
		TNT1 A 0 A_JumpIfInventory("DRLA_ArmorAntiLogFloodCheck",1,"NotPickup_NoPrint")
		TNT1 A 0 A_GiveInventory("DRLA_ArmorAntiLogFloodCheck")
		TNT1 A 0 A_Print("\cu= Phaseshift Armor =", 2, "CONFONT")
		Fail
		
//------------------------------------------------------------------------------
/*	SetBonusChecking:
		TNT1 A 0 A_GiveInventory("RLPhaseshiftSetBonusArmor",1)
		TNT1 A 0 A_JumpIfInventory("RLPhaseshiftSetBonusBoots",1,"SetBonusCheckingDetection")
		Stop
	SetBonusCheckingDetection:
		TNT1 A 0 A_JumpIfInventory("RLPhaseshiftSetBonusBoots",1,1)
		Stop
		TNT1 A 0 A_GiveInventory("RLPhaseshiftSetBonusActive",1)
		TNT1 A 0 A_Print("\ctPhaseshift Armor \c-equipped.\n\cf= PHASESHIFT SUIT =\n\cgYou phase out for a short time after being hit", 8, "CONFONT")
		Stop*/
//------------------------------------------------------------------------------
// Color code reference
// j = Standard (White)
// t = Exotic (Purple)
// v = Assembled (Cyan)
// i = Superior (Orange)
// d = Unique (Green)
// g = Demonic (Red)
// k = Legendary (Yellow)
// u = Onyx (Dark Gray)
	}
}

ACTOR RLOModPhaseshiftArmorPickupSpecial : RLOModPhaseshiftArmorPickup
{
    Inventory.InterHubAmount 0
    Inventory.MaxAmount 0
	+INVENTORY.AUTOACTIVATE
	States
	{
	SpawnDRPGCheck:
// Initialize the item with DoomRPG so it can be used with cool stuff.
// We skip the special start checks so we don't make infinite loops.
		TNT1 A 0 A_JumpIf(CallACS("DRPGCheckTiem"), "DRPGInit")
		TNT1 A 0 A_Jump (256, "SpawnLoopFall")
		Goto SpawnLoopFall	
//------------------------------------------------------------------------------
	Pickup:
		TNT1 A 0
// Check to see if you have the capacity to pickup this armor.
//		TNT1 A 0 A_JumpIf(CallACS("DRPGCheckTiem"), "PickupNonLimited")
		TNT1 A 0 A_JumpIfInventory("RLArmorInInventory",0,"NotPickup")
		TNT1 A 0 A_GiveInventory("RLOModPhaseshiftArmorPickup",1)
		Stop
		
	PickupNonLimited:
		TNT1 A 0
// Check to see if you have the capacity to pickup this armor.
        TNT1 A 0 ACS_NamedExecuteWithResult("CheckCapacity") // Special Capacity checking function for armor
		TNT1 A 0 A_GiveInventory("RLOModPhaseshiftArmorPickup",1)
		Stop
//------------------------------------------------------------------------------
	Use:
		Stop	
	}
}
		
Actor RLOModPhaseshiftArmor : RLGenericArmor
{
  Armor.Savepercent 20
  Armor.Saveamount 99999
  DamageFactor "Melee", 0.70
  DamageFactor "Bullet", 0.70
}
	
Actor RLOModPhaseshiftArmorRenegade : RLOModPhaseshiftArmor
{
  Armor.Savepercent 30
}

Actor RLOModPhaseshiftArmorToken : RLPermanentInventory {}
Actor RLOModPhaseshiftArmorUse : RLPermanentInventory {}

//==============================================================================

ACTOR RLOModRepulsionWaveSuitArmorPickup : RLGenericArmorPickup 18090
{
    //$category "Onyx-modded Armor"
	//$Sprite ONYAM0
    Tag "Repulsion Wave Suit [O]"
    Inventory.Icon "ONYMBOX"
	Inventory.PickupSound "misc/rlarmor2"
	Inventory.UseSound "armor/equip"
	Inventory.RespawnTics 10500
	+DONTGIB
	States
	{
	SpawnRarityBeam:
// Create the appropriate rarity beam for the item.
		TNT1 A 0 A_SpawnItemEx("RLRarityBeamOnyx", 0,0,0, 0,0,0, 0, SXF_SETMASTER)
		TNT1 A 0 A_Jump (256, "SpawnDRPGCheck")
		Goto SpawnDRPGCheck
		
    SpawnLoopFall:
		ONYA M 0 A_JumpIf(Abs(VelZ) <= 0.01 && user_floorhit == 0, "FloorHit")
		"####" "#" 1
		Loop
	SpawnLoop:
// Play the armor's sprite animation.
		ONYA M 6
		ONYA M 6 Bright
		Loop
			
//------------------------------------------------------------------------------
// Apply an Onyx mod to the armor in your inventory.
// Or not.
	OnyxModActivate:
		TNT1 A 0 A_GiveInventory("RLDeselectionFunction",1)
		TNT1 A 0 A_PlaySound ("hud/error", 7, 1)
		TNT1 A 0 A_Print("This armor is already \cuindestructible.\c-")
		Fail
		
//------------------------------------------------------------------------------
// These two states are used to detect armor modpacks if the armor can be altered.
// These states only need to be redefined if the armor cannot be converted with them.
	ArmorAlreadyEquipped:
// You are wearing armor, but you can still drop the armor you are manipulating.
//		TNT1 A 0 A_JumpIfInventory("RLArmorModItem", 1, "ArmorAlreadyEquippedArmorMod")
//		TNT1 A 0 A_JumpIfInventory("RLArmorModItemBlue", 1, "ArmorAlreadyEquippedArmorMod")
//		TNT1 A 0 A_JumpIfInventory("RLArmorModItemRed", 1, "ArmorAlreadyEquippedArmorMod")
		TNT1 A 0 A_Jump (256, "ArmorAlreadyEquippedMessage")
		Goto ArmorAlreadyEquippedMessage
	NoArmorEquipped:
// You are free to either wear the armor or drop it.
//		TNT1 A 0 A_JumpIfInventory("RLArmorModItem", 1, "NoArmorEquippedArmorMod")
//		TNT1 A 0 A_JumpIfInventory("RLArmorModItemBlue", 1, "NoArmorEquippedArmorMod")
//		TNT1 A 0 A_JumpIfInventory("RLArmorModItemRed", 1, "NoArmorEquippedArmorMod")
		TNT1 A 0 A_Jump (256, "NoArmorEquippedMessage")
		Goto NoArmorEquippedMessage
		
//------------------------------------------------------------------------------
	ArmorAlreadyEquippedMessage:
// Check for an Onyx mod in your inventory, and print a different string if there is.
// Comment out the jump if it cannot be Onyx modded.
//		TNT1 A 0 A_JumpIfInventory("RLOnyxModItem", 1, "ArmorAlreadyEquippedMessage2")
		TNT1 A 0 A_Jump (256, "ArmorAlreadyEquippedMessage1")
		Goto ArmorAlreadyEquippedMessage1
		
	ArmorAlreadyEquippedArmorMod:
// Check for an Onyx mod in your inventory, and print a different string if there is.
// Comment out the jump if it cannot be Onyx modded.
//		TNT1 A 0 A_JumpIfInventory("RLOnyxModItem", 1, "ArmorAlreadyEquippedArmorMod2")
		TNT1 A 0 A_Jump (256, "ArmorAlreadyEquippedArmorMod1")
		Goto ArmorAlreadyEquippedArmorMod1
		
	NoArmorEquippedMessage:
// Check for an Onyx mod in your inventory, and print a different string if there is.
// Comment out the jump if it cannot be Onyx modded.
//		TNT1 A 0 A_JumpIfInventory("RLOnyxModItem", 1, "NoArmorEquippedMessage2")
		TNT1 A 0 A_Jump (256, "NoArmorEquippedMessage1")
		Goto NoArmorEquippedMessage1
		
	NoArmorEquippedArmorMod:
// You may also convert it with an armor modpack.
// Check for an Onyx mod in your inventory, and print a different string if there is.
// Comment out the jump if it cannot be Onyx modded.
//		TNT1 A 0 A_JumpIfInventory("RLOnyxModItem", 1, "NoArmorEquippedArmorMod2")
		TNT1 A 0 A_Jump (256, "NoArmorEquippedArmorMod1")
		Goto NoArmorEquippedArmorMod1
		
//------------------------------------------------------------------------------
	NoArmorModpackActive:
// Check to see if this armor has been activated once before.
		TNT1 A 0 A_JumpIfInventory("RLOModRepulsionWaveSuitArmorUse",1,"ArmorEquip")
		TNT1 A 0 A_Jump (256, "UseTokenRemoval")
		Goto UseTokenRemoval
		
	UseTokenGiven:
// Gives you the identifier that indicates what armor you are manipulating right now.
		TNT1 A 0 A_GiveInventory("RLOModRepulsionWaveSuitArmorUse", 1)
// Check to see if you are already wearing armor and change the activation message.
		TNT1 A 0 A_Jump (256, "ArmorWornCheck")
		Goto ArmorWornCheck
		
	ArmorEquipTokens:
		TNT1 A 0 A_TakeInventory("RLOModRepulsionWaveSuitArmorUse",1)
		TNT1 A 0 A_TakeInventory("RLArmorInInventory",1)
// Give the Token and/or Bonus items that are used to define the armor as being worn.
		TNT1 A 0 A_GiveInventory("RLOModRepulsionWaveSuitArmorToken",1)
		TNT1 A 0 A_GiveInventory("RLOModRepulsionWaveSuitArmorBonus",1)
		TNT1 A 0 A_GiveInventory("RLIndestructibleArmorWorn",1)
// Give a different armor based on whether or not you are the Renegade.
		TNT1 A 0 A_JumpIfInventory("RLShellshockPerk",1,"RenegadeEquip")
		TNT1 A 0 A_GiveInventory("RLOModRepulsionWaveSuitArmor",1)
		TNT1 A 0 A_Jump (256, "EquipFinish")
		Goto EquipFinish
		
// The Renegade gets a version of the armor with 1.5x more protection, up to a max of 80%.
	RenegadeEquip:
		TNT1 A 0 A_GiveInventory("RLOModRepulsionWaveSuitArmorRenegade",1)
		TNT1 A 0 A_Jump (256, "EquipFinish")
		Goto EquipFinish

//------------------------------------------------------------------------------
// Equip messages are grouped down here.
	PickupDisplayMessage:
// Picking up an armor, and you have room for it.
		TNT1 A 0 A_Print("Picked up the \cuRepulsion Wave Suit.", 2)
		Stop
	EquipFinish:
// Successfully wearing an armor.
		TNT1 A 0 A_Print("\cuRepulsion Wave Suit \c-equipped.", 2)
		Stop
		
	ArmorAlreadyEquipped:
// You are wearing armor, but you can still drop the armor you are manipulating.
// Check for armor modpack modes that are compatible with this armor.
// Comment out the incompatible jumps.
//		TNT1 A 0 A_JumpIfInventory("RLArmorModItem",1,"ArmorAlreadyEquippedArmorMod")
//		TNT1 A 0 A_JumpIfInventory("RLArmorModItemBlue",1,"ArmorAlreadyEquippedArmorMod")
//		TNT1 A 0 A_JumpIfInventory("RLArmorModItemRed",1,"ArmorAlreadyEquippedArmorMod")
		TNT1 A 0 A_Jump (256, "ArmorAlreadyEquippedMessage")
		Goto ArmorAlreadyEquippedMessage
	NoArmorEquipped:
// You are free to either wear the armor or drop it.
// Check for armor modpack modes that are compatible with this armor.
// Comment out the incompatible jumps.
//		TNT1 A 0 A_JumpIfInventory("RLArmorModItem",1,"NoArmorEquippedArmorMod")
//		TNT1 A 0 A_JumpIfInventory("RLArmorModItemBlue",1,"NoArmorEquippedArmorMod")
//		TNT1 A 0 A_JumpIfInventory("RLArmorModItemRed",1,"NoArmorEquippedArmorMod")
		TNT1 A 0 A_Jump (256, "NoArmorEquippedMessage")
		Goto NoArmorEquippedMessage
		
	NotPickup:
// This is for when you walk over an armor you cannot pick up.
		TNT1 A 0 A_JumpIfInventory("DRLA_ArmorAntiLogFloodCheck",1,"NotPickup_NoPrint")
		TNT1 A 0 A_GiveInventory("DRLA_ArmorAntiLogFloodCheck")
		TNT1 A 0 A_Print("\cu= Repulsion Wave Suit =", 2, "CONFONT")
		Fail
//------------------------------------------------------------------------------
// Color code reference
// j = Standard (White)
// t = Exotic (Purple)
// v = Assembled (Cyan)
// i = Superior (Orange)
// d = Unique (Green)
// g = Demonic (Red)
// k = Legendary (Yellow)
// u = Onyx (Dark Gray)
	}
}

ACTOR RLOModRepulsionWaveSuitArmorPickupSpecial : RLOModRepulsionWaveSuitArmorPickup
{
    Inventory.InterHubAmount 0
    Inventory.MaxAmount 0
	+INVENTORY.AUTOACTIVATE
	States
	{
	SpawnDRPGCheck:
// Initialize the item with DoomRPG so it can be used with cool stuff.
// We skip the special start checks so we don't make infinite loops.
		TNT1 A 0 A_JumpIf(CallACS("DRPGCheckTiem"), "DRPGInit")
		TNT1 A 0 A_Jump (256, "SpawnLoopFall")
		Goto SpawnLoopFall	
//------------------------------------------------------------------------------
	Pickup:
		TNT1 A 0
// Check to see if you have the capacity to pickup this armor.
//		TNT1 A 0 A_JumpIf(CallACS("DRPGCheckTiem"), "PickupNonLimited")
		TNT1 A 0 A_JumpIfInventory("RLArmorInInventory",0,"NotPickup")
		TNT1 A 0 A_GiveInventory("RLOModRepulsionWaveSuitArmorPickup",1)
		Stop
		
	PickupNonLimited:
		TNT1 A 0
// Check to see if you have the capacity to pickup this armor.
        TNT1 A 0 ACS_NamedExecuteWithResult("CheckCapacity") // Special Capacity checking function for armor
		TNT1 A 0 A_GiveInventory("RLOModRepulsionWaveSuitArmorPickup",1)
		Stop
//------------------------------------------------------------------------------
	Use:
		Stop	
	}
}
		
Actor RLOModRepulsionWaveSuitArmor : RLGenericArmor
{
  Armor.Savepercent 30
  Armor.Saveamount 99999
  DamageFactor "Melee", 0.70
}
	
Actor RLOModRepulsionWaveSuitArmorRenegade : RLOModRepulsionWaveSuitArmor
{
  Armor.Savepercent 45
}

Actor RLOModRepulsionWaveSuitArmorToken : RLPermanentInventory {}
Actor RLOModRepulsionWaveSuitArmorBonus : RLPermanentInventory {}
Actor RLOModRepulsionWaveSuitArmorUse : RLPermanentInventory {}

//==============================================================================

ACTOR RLOModSurvivalMediArmorPickup : RLGenericArmorPickup 18091
{
    //$category "Onyx-modded Armor"
	//$Sprite ONYAN0
    Tag "Survival MediArmor [O]"
    Inventory.Icon "ONYNBOX"
	Inventory.PickupSound "misc/rlarmor2"
	Inventory.UseSound "armor/equip"
	Inventory.RespawnTics 10500
	+DONTGIB
	States
	{
	SpawnRarityBeam:
// Create the appropriate rarity beam for the item.
		TNT1 A 0 A_SpawnItemEx("RLRarityBeamOnyx", 0,0,0, 0,0,0, 0, SXF_SETMASTER)
		TNT1 A 0 A_Jump (256, "SpawnDRPGCheck")
		Goto SpawnDRPGCheck
		
    SpawnLoopFall:
		ONYA N 0 A_JumpIf(Abs(VelZ) <= 0.01 && user_floorhit == 0, "FloorHit")
		"####" "#" 1
		Loop
	SpawnLoop:
// Play the armor's sprite animation.
		ONYA N 6
		ONYA N 6 Bright
		Loop
			
//------------------------------------------------------------------------------
// Apply an Onyx mod to the armor in your inventory.
// Or not.
	OnyxModActivate:
		TNT1 A 0 A_GiveInventory("RLDeselectionFunction",1)
		TNT1 A 0 A_PlaySound ("hud/error", 7, 1)
		TNT1 A 0 A_Print("This armor is already \cuindestructible.\c-")
		Fail
		
//------------------------------------------------------------------------------
// These two states are used to detect armor modpacks if the armor can be altered.
// These states only need to be redefined if the armor cannot be converted with them.
	ArmorAlreadyEquipped:
// You are wearing armor, but you can still drop the armor you are manipulating.
//		TNT1 A 0 A_JumpIfInventory("RLArmorModItem", 1, "ArmorAlreadyEquippedArmorMod")
//		TNT1 A 0 A_JumpIfInventory("RLArmorModItemBlue", 1, "ArmorAlreadyEquippedArmorMod")
//		TNT1 A 0 A_JumpIfInventory("RLArmorModItemRed", 1, "ArmorAlreadyEquippedArmorMod")
		TNT1 A 0 A_Jump (256, "ArmorAlreadyEquippedMessage")
		Goto ArmorAlreadyEquippedMessage
	NoArmorEquipped:
// You are free to either wear the armor or drop it.
//		TNT1 A 0 A_JumpIfInventory("RLArmorModItem", 1, "NoArmorEquippedArmorMod")
//		TNT1 A 0 A_JumpIfInventory("RLArmorModItemBlue", 1, "NoArmorEquippedArmorMod")
//		TNT1 A 0 A_JumpIfInventory("RLArmorModItemRed", 1, "NoArmorEquippedArmorMod")
		TNT1 A 0 A_Jump (256, "NoArmorEquippedMessage")
		Goto NoArmorEquippedMessage
		
//------------------------------------------------------------------------------
	ArmorAlreadyEquippedMessage:
// Check for an Onyx mod in your inventory, and print a different string if there is.
// Comment out the jump if it cannot be Onyx modded.
//		TNT1 A 0 A_JumpIfInventory("RLOnyxModItem", 1, "ArmorAlreadyEquippedMessage2")
		TNT1 A 0 A_Jump (256, "ArmorAlreadyEquippedMessage1")
		Goto ArmorAlreadyEquippedMessage1
		
	ArmorAlreadyEquippedArmorMod:
// Check for an Onyx mod in your inventory, and print a different string if there is.
// Comment out the jump if it cannot be Onyx modded.
//		TNT1 A 0 A_JumpIfInventory("RLOnyxModItem", 1, "ArmorAlreadyEquippedArmorMod2")
		TNT1 A 0 A_Jump (256, "ArmorAlreadyEquippedArmorMod1")
		Goto ArmorAlreadyEquippedArmorMod1
		
	NoArmorEquippedMessage:
// Check for an Onyx mod in your inventory, and print a different string if there is.
// Comment out the jump if it cannot be Onyx modded.
//		TNT1 A 0 A_JumpIfInventory("RLOnyxModItem", 1, "NoArmorEquippedMessage2")
		TNT1 A 0 A_Jump (256, "NoArmorEquippedMessage1")
		Goto NoArmorEquippedMessage1
		
	NoArmorEquippedArmorMod:
// You may also convert it with an armor modpack.
// Check for an Onyx mod in your inventory, and print a different string if there is.
// Comment out the jump if it cannot be Onyx modded.
//		TNT1 A 0 A_JumpIfInventory("RLOnyxModItem", 1, "NoArmorEquippedArmorMod2")
		TNT1 A 0 A_Jump (256, "NoArmorEquippedArmorMod1")
		Goto NoArmorEquippedArmorMod1
		
//------------------------------------------------------------------------------
	NoArmorModpackActive:
// Check to see if this armor has been activated once before.
		TNT1 A 0 A_JumpIfInventory("RLOModSurvivalMediArmorUse",1,"ArmorEquip")
		TNT1 A 0 A_Jump (256, "UseTokenRemoval")
		Goto UseTokenRemoval
		
	UseTokenGiven:
// Gives you the identifier that indicates what armor you are manipulating right now.
		TNT1 A 0 A_GiveInventory("RLOModSurvivalMediArmorUse", 1)
// Check to see if you are already wearing armor and change the activation message.
		TNT1 A 0 A_Jump (256, "ArmorWornCheck")
		Goto ArmorWornCheck
		
	ArmorEquipTokens:
		TNT1 A 0 A_TakeInventory("RLOModSurvivalMediArmorUse",1)
		TNT1 A 0 A_TakeInventory("RLArmorInInventory",1)
// Give the Token and/or Bonus items that are used to define the armor as being worn.
		TNT1 A 0 A_GiveInventory("RLOModSurvivalMediArmorToken",1)
		TNT1 A 0 A_GiveInventory("RLSurvivalMediArmorBonus",1)
		TNT1 A 0 A_GiveInventory("RLIndestructibleArmorWorn",1)
// Give a different armor based on whether or not you are the Renegade.
		TNT1 A 0 A_JumpIfInventory("RLShellshockPerk",1,"RenegadeEquip")
		TNT1 A 0 A_GiveInventory("RLOModSurvivalMediArmor",1)
		TNT1 A 0 A_Jump (256, "EquipFinish")
		Goto EquipFinish
		
// The Renegade gets a version of the armor with 1.5x more protection, up to a max of 80%.
	RenegadeEquip:
		TNT1 A 0 A_GiveInventory("RLOModSurvivalMediArmorRenegade",1)
		TNT1 A 0 A_Jump (256, "EquipFinish")
		Goto EquipFinish

//------------------------------------------------------------------------------
// Equip messages are grouped down here.
	PickupDisplayMessage:
// Picking up an armor, and you have room for it.
		TNT1 A 0 A_Print("Picked up the \cuSurvival MediArmor.", 2)
		Stop
	EquipFinish:
// Successfully wearing an armor.
		TNT1 A 0 A_Print("\cuSurvival MediArmor \c-equipped.", 2)
		Stop
		
	ArmorAlreadyEquipped:
// You are wearing armor, but you can still drop the armor you are manipulating.
// Check for armor modpack modes that are compatible with this armor.
// Comment out the incompatible jumps.
//		TNT1 A 0 A_JumpIfInventory("RLArmorModItem",1,"ArmorAlreadyEquippedArmorMod")
//		TNT1 A 0 A_JumpIfInventory("RLArmorModItemBlue",1,"ArmorAlreadyEquippedArmorMod")
//		TNT1 A 0 A_JumpIfInventory("RLArmorModItemRed",1,"ArmorAlreadyEquippedArmorMod")
		TNT1 A 0 A_Jump (256, "ArmorAlreadyEquippedMessage")
		Goto ArmorAlreadyEquippedMessage
	NoArmorEquipped:
// You are free to either wear the armor or drop it.
// Check for armor modpack modes that are compatible with this armor.
// Comment out the incompatible jumps.
//		TNT1 A 0 A_JumpIfInventory("RLArmorModItem",1,"NoArmorEquippedArmorMod")
//		TNT1 A 0 A_JumpIfInventory("RLArmorModItemBlue",1,"NoArmorEquippedArmorMod")
//		TNT1 A 0 A_JumpIfInventory("RLArmorModItemRed",1,"NoArmorEquippedArmorMod")
		TNT1 A 0 A_Jump (256, "NoArmorEquippedMessage")
		Goto NoArmorEquippedMessage
		
	NotPickup:
// This is for when you walk over an armor you cannot pick up.
		TNT1 A 0 A_JumpIfInventory("DRLA_ArmorAntiLogFloodCheck",1,"NotPickup_NoPrint")
		TNT1 A 0 A_GiveInventory("DRLA_ArmorAntiLogFloodCheck")
		TNT1 A 0 A_Print("\cu= Survival MediArmor =", 2, "CONFONT")
		Fail
//------------------------------------------------------------------------------
// Color code reference
// j = Standard (White)
// t = Exotic (Purple)
// v = Assembled (Cyan)
// i = Superior (Orange)
// d = Unique (Green)
// g = Demonic (Red)
// k = Legendary (Yellow)
// u = Onyx (Dark Gray)
	}
}

ACTOR RLOModSurvivalMediArmorPickupSpecial : RLOModSurvivalMediArmorPickup
{
    Inventory.InterHubAmount 0
    Inventory.MaxAmount 0
	+INVENTORY.AUTOACTIVATE
	States
	{
	SpawnDRPGCheck:
// Initialize the item with DoomRPG so it can be used with cool stuff.
// We skip the special start checks so we don't make infinite loops.
		TNT1 A 0 A_JumpIf(CallACS("DRPGCheckTiem"), "DRPGInit")
		TNT1 A 0 A_Jump (256, "SpawnLoopFall")
		Goto SpawnLoopFall	
//------------------------------------------------------------------------------
	Pickup:
		TNT1 A 0
// Check to see if you have the capacity to pickup this armor.
//		TNT1 A 0 A_JumpIf(CallACS("DRPGCheckTiem"), "PickupNonLimited")
		TNT1 A 0 A_JumpIfInventory("RLArmorInInventory",0,"NotPickup")
		TNT1 A 0 A_GiveInventory("RLOModSurvivalMediArmorPickup",1)
		Stop
		
	PickupNonLimited:
		TNT1 A 0
// Check to see if you have the capacity to pickup this armor.
        TNT1 A 0 ACS_NamedExecuteWithResult("CheckCapacity") // Special Capacity checking function for armor
		TNT1 A 0 A_GiveInventory("RLOModSurvivalMediArmorPickup",1)
		Stop
//------------------------------------------------------------------------------
	Use:
		Stop	
	}
}
		
Actor RLOModSurvivalMediArmor : RLGenericArmor
{
  Armor.Savepercent 20
  Armor.Saveamount 99999
  DamageFactor "Melee", 0.70
}
	
Actor RLOModSurvivalMediArmorRenegade : RLOModSurvivalMediArmor
{
  Armor.Savepercent 30
}

Actor RLOModSurvivalMediArmorToken : RLPermanentInventory {}
Actor RLOModSurvivalMediArmorUse : RLPermanentInventory {}

//==============================================================================
