
//==============================================================================================================================================
//==============================================================================
//		UNIQUE BOOTS
//==============================================================================
//==============================================================================================================================================


ACTOR RLEnviroBootsPickup : RLGenericBootsPickup
{
    //$category "Unique Boots"
	//$Sprite ENVBA0
    Tag "Enviroboots"
    Inventory.Icon "ENVIBOX"
	Inventory.RespawnTics 105000
	States
	{
	SpawnRarityBeam:
// Create the appropriate rarity beam for the item.
		TNT1 A 0 A_SpawnItemEx("RLRarityBeamUnique", 0,0,0, 0,0,0, 0, SXF_SETMASTER)
		TNT1 A 0 A_Jump (256, "SpawnDRPGCheck")
		Goto SpawnDRPGCheck
		
    SpawnLoopFall:
		ENVB A 0 A_JumpIf(Abs(VelZ) <= 0.01 && user_floorhit == 0, "FloorHit")
		"####" "#" 1
		Loop
	FloorHit:
		"####" "#" 0 A_PlaySound("boots/dropmetal", 7, 1, 0, 1.5)
		"####" "#" 0 A_ScaleVelocity (0.5)
		"####" "#" 0 A_ChangeFlag("SPECIAL", true)
		"####" "#" 0 A_ChangeFlag("THRUACTORS", false)
		"####" "#" 0 A_SetUserVar("user_floorhit", 1)
		"####" "#" 0 A_Jump(256, "SpawnLoop")
		Goto SpawnLoop
	SpawnLoop:
// Play the armor's sprite animation.
		ENVB A 6
		ENVB B 6 Bright
		Loop
		
//------------------------------------------------------------------------------
	Use:
		TNT1 A 0
// Check to see if these boots have been activated once before.
		TNT1 A 0 A_JumpIfInventory("RLEnviroBootsUse",1,"BootsEquip")
		TNT1 A 0 A_Jump (256, "UseTokenRemoval")
		Goto UseTokenRemoval
		
	UseTokenGiven:
// Gives you the identifier that indicates what boots you are manipulating right now.
		TNT1 A 0 A_GiveInventory("RLEnviroBootsUse", 1)
// Check to see if you are already wearing boots and change the activation message.
		TNT1 A 0 A_Jump (256, "BootsWornCheck")
		Goto BootsWornCheck
		
	BootsEquipTokens:
		TNT1 A 0 A_TakeInventory("RLEnviroBootsUse",1)
		TNT1 A 0 A_TakeInventory("RLArmorInInventory",1)
// Give the Token and/or Bonus items that are used to define the boots as being worn.
		TNT1 A 0 A_GiveInventory("RLEnviroBootsToken",1)
		TNT1 A 0 A_GiveInventory("PowerRLAbsoluteBootsProtection",1)
		TNT1 A 0 A_GiveInventory("RLBootsWorn",1)
		TNT1 A 0 A_Jump (256, "EquipFinish")
		Goto EquipFinish

//------------------------------------------------------------------------------
// Equip messages are grouped down here.
	PickupDisplayMessage:
// Picking up boots, and you have room for it.
		"####" "#" 0 A_GiveInventory("RLUniqueItemFound",1, AAPTR_PLAYER1)
		TNT1 A 0 A_Print("Picked up the \cdEnviro Boots.", 2)
		Stop
	EquipFinish:
// Successfully wearing boots.
		TNT1 A 0 A_Print("\cdEnviro Boots \c-equipped.", 2)
		Stop
		
	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("\cd= Enviro Boots =", 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 RLEnviroBootsWorldSpawnPickup : RLEnviroBootsPickup 19022
{
    Inventory.InterHubAmount 0
    Inventory.MaxAmount 0
	+INVENTORY.AUTOACTIVATE
	States
	{
	SpawnRarityBeam:
// Check for DoomRPG, if found, skip the check for special starts. If the armor shouldn't spawn, we need to skip the thunder sound.
		TNT1 A 0 A_JumpIf(CallACS("DRPGCheckTiem"), 2)
		TNT1 A 0 A_JumpIf(CallACS("DRLA_specialstarts") == 2, "Duke2Stuff")
// This makes a thunder sound when it spawns, and emits twinkling noises every now and then to alert players.
		TNT1 A 0 A_SpawnItemEx("RLRarityBeamUniqueWorld", 0,0,0, 0,0,0, 0, SXF_SETMASTER)
		TNT1 A 0 A_PlaySound("weapons/uniquespawned", 7, 0.25, 0, 0)
		TNT1 A 0 A_GiveInventory("RLUniqueItemSpawnMessageSender",1)
		TNT1 A 0 A_Jump (256, "SpawnDRPGCheck")
		Goto SpawnDRPGCheck
//------------------------------------------------------------------------------
	Pickup:
		TNT1 A 0
// Check to see if you have the capacity to pickup these boots.
		TNT1 A 0 A_JumpIfInventory("RLArmorInInventory",0,"NotPickup")
		TNT1 A 0 A_GiveInventory("RLEnviroBootsPickup",1)
// Activates unique boss system and increases dangerlevel
		TNT1 A 0 A_GiveInventory("RLUniqueItemFound",1, AAPTR_PLAYER1)
		TNT1 A 0 A_GiveInventory("RLDangerLevelUniqueGiver",1, AAPTR_PLAYER1)
		Stop
//------------------------------------------------------------------------------
	Use:
		Stop	
	}
}

ACTOR RLEnviroBootsPickupSpecial : RLEnviroBootsPickup
{
    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 these boots.
//		TNT1 A 0 A_JumpIf(CallACS("DRPGCheckTiem"), "PickupNonLimited")
		TNT1 A 0 A_JumpIfInventory("RLArmorInInventory",0,"NotPickup")
		TNT1 A 0 A_GiveInventory("RLEnviroBootsPickup",1)
		Stop
		
	PickupNonLimited:
		TNT1 A 0
// Check to see if you have the capacity to pickup these boots.
        TNT1 A 0 ACS_NamedExecuteWithResult("CheckCapacity") // Special Capacity checking function for armor
		TNT1 A 0 A_GiveInventory("RLEnviroBootsPickup",1)
		Stop
//------------------------------------------------------------------------------
	Use:
		Stop	
	}
}

Actor RLEnviroBootsToken : RLPermanentInventory {}
Actor RLEnviroBootsUse : RLPermanentInventory {}

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

ACTOR RLFrontlineEngineerBootsPickup : RLGenericBootsPickup
{
    //$category "Unique Boots"
	//$Sprite FLEBA0
    Tag "Frontline Engineer Boots"
    Inventory.Icon "BLUBBOX"
	Inventory.RespawnTics 105000
	States
	{
	SpawnRarityBeam:
// Create the appropriate rarity beam for the item.
		TNT1 A 0 A_SpawnItemEx("RLRarityBeamUnique", 0,0,0, 0,0,0, 0, SXF_SETMASTER)
		TNT1 A 0 A_Jump (256, "SpawnDRPGCheck")
		Goto SpawnDRPGCheck
		
    SpawnLoopFall:
		FLEB A 0 A_JumpIf(Abs(VelZ) <= 0.01 && user_floorhit == 0, "FloorHit")
		"####" "#" 1
		Loop
	SpawnLoop:
// Play the armor's sprite animation.
		FLEB A 6
		FLEB A 6 Bright
		Loop //Renamed the sprites due to HTC2
		
//------------------------------------------------------------------------------
	Use:
		TNT1 A 0
// Check to see if these boots have been activated once before.
		TNT1 A 0 A_JumpIfInventory("RLFrontlineEngineerBootsUse",1,"BootsEquip")
		TNT1 A 0 A_Jump (256, "UseTokenRemoval")
		Goto UseTokenRemoval
		
	UseTokenGiven:
// Gives you the identifier that indicates what boots you are manipulating right now.
		TNT1 A 0 A_GiveInventory("RLFrontlineEngineerBootsUse", 1)
// Check to see if you are already wearing boots and change the activation message.
		TNT1 A 0 A_Jump (256, "BootsWornCheck")
		Goto BootsWornCheck
		
	BootsEquipTokens:
		TNT1 A 0 A_TakeInventory("RLFrontlineEngineerBootsUse",1)
		TNT1 A 0 A_TakeInventory("RLArmorInInventory",1)
// Give the Token and/or Bonus items that are used to define the boots as being worn.
		TNT1 A 0 A_GiveInventory("RLFrontlineEngineerBootsToken",1)
		TNT1 A 0 A_GiveInventory("PowerRLFrontlineEngineerBootsProtection",1)
		TNT1 A 0 A_GiveInventory("RLBootsWorn",1)
		TNT1 A 0 A_Jump (256, "EquipFinish")
		Goto EquipFinish

//------------------------------------------------------------------------------
// Equip messages are grouped down here.
	PickupDisplayMessage:
// Picking up boots, and you have room for it.
		"####" "#" 0 A_GiveInventory("RLUniqueItemFound",1, AAPTR_PLAYER1)
		TNT1 A 0 A_Print("Picked up the \cdFrontline Engineer Boots.", 2)
		Stop
	EquipFinish:
// Successfully wearing boots.
		TNT1 A 0 A_Print("\cdFrontline Engineer Boots \c-equipped.", 2)
		TNT1 A 0 ACS_NamedExecuteWithResult("RLBLUSetBonusCheck", 1) // Checks for all parts of the set bonus, gives or removes it accordingly - argument is tic delay before checking
		Stop
		
	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("\cd= Frontline Engineer Boots =", 2, "CONFONT")
		Fail
		
//------------------------------------------------------------------------------
/*	SetBonusChecking:
		TNT1 A 0 A_GiveInventory("RLSentrySentinelSetBonusBoots",1)
		TNT1 A 0 A_JumpIfInventory("RLSentrySentinelSetBonusArmor",1,"SetBonusCheckingDetection")
		Stop
	SetBonusCheckingDetection:
		TNT1 A 0 A_JumpIfInventory("RLSentrySentinelSetBonusArmor",1,1)
		Stop
		TNT1 A 0 A_GiveInventory("RLSentrySentinelSetBonusActive",1)
		TNT1 A 0 A_Print("\cdFrontline Engineer Boots \c-equipped.\n\cf= SENTRY SENTINEL =\n\cgAllows you to deploy two Sentries at once", 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 RLFrontlineEngineerBootsWorldSpawnPickup : RLFrontlineEngineerBootsPickup 19023
{
    Inventory.InterHubAmount 0
    Inventory.MaxAmount 0
	+INVENTORY.AUTOACTIVATE
	States
	{
	SpawnRarityBeam:
// Check for DoomRPG, if found, skip the check for special starts. If the armor shouldn't spawn, we need to skip the thunder sound.
		TNT1 A 0 A_JumpIf(CallACS("DRPGCheckTiem"), 2)
		TNT1 A 0 A_JumpIf(CallACS("DRLA_specialstarts") == 2, "Duke2Stuff")
// This makes a thunder sound when it spawns, and emits twinkling noises every now and then to alert players.
		TNT1 A 0 A_SpawnItemEx("RLRarityBeamUniqueWorld", 0,0,0, 0,0,0, 0, SXF_SETMASTER)
		TNT1 A 0 A_PlaySound("weapons/uniquespawned", 7, 0.25, 0, 0)
		TNT1 A 0 A_GiveInventory("RLUniqueItemSpawnMessageSender",1)
		TNT1 A 0 A_Jump (256, "SpawnDRPGCheck")
		Goto SpawnDRPGCheck
//------------------------------------------------------------------------------
	Pickup:
		TNT1 A 0
// Check to see if you have the capacity to pickup these boots.
		TNT1 A 0 A_JumpIfInventory("RLArmorInInventory",0,"NotPickup")
		TNT1 A 0 A_GiveInventory("RLFrontlineEngineerBootsPickup",1)
// Activates unique boss system and increases dangerlevel
		TNT1 A 0 A_GiveInventory("RLUniqueItemFound",1, AAPTR_PLAYER1)
		TNT1 A 0 A_GiveInventory("RLDangerLevelUniqueGiver",1, AAPTR_PLAYER1)
		Stop
//------------------------------------------------------------------------------
	Use:
		Stop	
	}
}

ACTOR RLFrontlineEngineerBootsPickupSpecial : RLFrontlineEngineerBootsPickup
{
    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 these boots.
//		TNT1 A 0 A_JumpIf(CallACS("DRPGCheckTiem"), "PickupNonLimited")
		TNT1 A 0 A_JumpIfInventory("RLArmorInInventory",0,"NotPickup")
		TNT1 A 0 A_GiveInventory("RLFrontlineEngineerBootsPickup",1)
		Stop
		
	PickupNonLimited:
		TNT1 A 0
// Check to see if you have the capacity to pickup these boots.
        TNT1 A 0 ACS_NamedExecuteWithResult("CheckCapacity") // Special Capacity checking function for armor
		TNT1 A 0 A_GiveInventory("RLFrontlineEngineerBootsPickup",1)
		Stop
//------------------------------------------------------------------------------
	Use:
		Stop	
	}
}
	
actor PowerRLFrontlineEngineerBootsProtection : PowerRLGenericBootsProtection
{
   damagefactor "Slime", 0.2
}

Actor RLFrontlineEngineerBootsToken : RLPermanentInventory {}
Actor RLFrontlineEngineerBootsUse : RLPermanentInventory {}

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

ACTOR RLLavaBootsPickup : RLGenericBootsPickup
{
    //$category "Unique Boots"
	//$Sprite LAVBA0
    Tag "Lava Boots"
    Inventory.Icon "LAVBBOX"
	Inventory.RespawnTics 105000
	States
	{
	SpawnRarityBeam:
// Create the appropriate rarity beam for the item.
		TNT1 A 0 A_SpawnItemEx("RLRarityBeamUnique", 0,0,0, 0,0,0, 0, SXF_SETMASTER)
		TNT1 A 0 A_Jump (256, "SpawnDRPGCheck")
		Goto SpawnDRPGCheck
		
    SpawnLoopFall:
		LAVB A 0 A_JumpIf(Abs(VelZ) <= 0.01 && user_floorhit == 0, "FloorHit")
		"####" "#" 1 Bright
		Loop
	SpawnLoop:
// Play the armor's sprite animation.
		LAVB ABCD 6 Bright
		Loop
		
//------------------------------------------------------------------------------
	Use:
		TNT1 A 0
// Check to see if these boots have been activated once before.
		TNT1 A 0 A_JumpIfInventory("RLLavaBootsUse",1,"BootsEquip")
		TNT1 A 0 A_Jump (256, "UseTokenRemoval")
		Goto UseTokenRemoval
		
	UseTokenGiven:
// Gives you the identifier that indicates what boots you are manipulating right now.
		TNT1 A 0 A_GiveInventory("RLLavaBootsUse", 1)
// Check to see if you are already wearing boots and change the activation message.
		TNT1 A 0 A_Jump (256, "BootsWornCheck")
		Goto BootsWornCheck
		
	BootsEquipTokens:
		TNT1 A 0 A_TakeInventory("RLLavaBootsUse",1)
		TNT1 A 0 A_TakeInventory("RLArmorInInventory",1)
// Give the Token and/or Bonus items that are used to define the boots as being worn.
		TNT1 A 0 A_GiveInventory("RLLavaBootsToken",1)
		TNT1 A 0 A_GiveInventory("PowerRLAbsoluteBootsProtection",1)
		TNT1 A 0 A_GiveInventory("RLBootsWorn",1)
		TNT1 A 0 A_Jump (256, "EquipFinish")
		Goto EquipFinish

//------------------------------------------------------------------------------
// Equip messages are grouped down here.
	PickupDisplayMessage:
// Picking up boots, and you have room for it.
		"####" "#" 0 A_GiveInventory("RLUniqueItemFound",1, AAPTR_PLAYER1)
		TNT1 A 0 A_Print("Picked up the \cdLava Boots.", 2)
		Stop
	EquipFinish:
// Successfully wearing boots.
		TNT1 A 0 A_Print("\cdLava Boots \c-equipped.", 2)
		TNT1 A 0 ACS_NamedExecuteWithResult("RLLavaSetBonusCheck", 1) // Checks for all parts of the set bonus, gives or removes it accordingly - argument is tic delay before checking
		Stop
		
	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("\cd= Lava Boots =", 2, "CONFONT")
		Fail
		
//------------------------------------------------------------------------------
/*	SetBonusChecking:
		TNT1 A 0 A_GiveInventory("RLLavaSetBonusBoots",1)
		TNT1 A 0 A_JumpIfInventory("RLLavaSetBonusArmor",1,"SetBonusCheckingDetection")
		Stop
	SetBonusCheckingDetection:
		TNT1 A 0 A_JumpIfInventory("RLLavaSetBonusArmor",1,1)
		Stop
		TNT1 A 0 A_GiveInventory("RLLavaSetBonusActive",1)
		TNT1 A 0 A_Print("\cdLava Boots \c-equipped.\n\cf= UNSTABLE ELEMENTAL =\n\cgChance of temporary \cfinvincibility\c- when taking 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 RLLavaBootsWorldSpawnPickup : RLLavaBootsPickup 19024
{
    Inventory.InterHubAmount 0
    Inventory.MaxAmount 0
	+INVENTORY.AUTOACTIVATE
	States
	{
	SpawnRarityBeam:
// Check for DoomRPG, if found, skip the check for special starts. If the armor shouldn't spawn, we need to skip the thunder sound.
		TNT1 A 0 A_JumpIf(CallACS("DRPGCheckTiem"), 2)
		TNT1 A 0 A_JumpIf(CallACS("DRLA_specialstarts") == 2, "Duke2Stuff")
// This makes a thunder sound when it spawns, and emits twinkling noises every now and then to alert players.
		TNT1 A 0 A_SpawnItemEx("RLRarityBeamUniqueWorld", 0,0,0, 0,0,0, 0, SXF_SETMASTER)
		TNT1 A 0 A_PlaySound("weapons/uniquespawned", 7, 0.25, 0, 0)
		TNT1 A 0 A_GiveInventory("RLUniqueItemSpawnMessageSender",1)
		TNT1 A 0 A_Jump (256, "SpawnDRPGCheck")
		Goto SpawnDRPGCheck
//------------------------------------------------------------------------------
	Pickup:
		TNT1 A 0
// Check to see if you have the capacity to pickup these boots.
		TNT1 A 0 A_JumpIfInventory("RLArmorInInventory",0,"NotPickup")
		TNT1 A 0 A_GiveInventory("RLLavaBootsPickup",1)
// Activates unique boss system and increases dangerlevel
		TNT1 A 0 A_GiveInventory("RLUniqueItemFound",1, AAPTR_PLAYER1)
		TNT1 A 0 A_GiveInventory("RLDangerLevelUniqueGiver",1, AAPTR_PLAYER1)
		Stop
//------------------------------------------------------------------------------
	Use:
		Stop	
	}
}

ACTOR RLLavaBootsPickupSpecial : RLLavaBootsPickup
{
    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 these boots.
//		TNT1 A 0 A_JumpIf(CallACS("DRPGCheckTiem"), "PickupNonLimited")
		TNT1 A 0 A_JumpIfInventory("RLArmorInInventory",0,"NotPickup")
		TNT1 A 0 A_GiveInventory("RLLavaBootsPickup",1)
		Stop
		
	PickupNonLimited:
		TNT1 A 0
// Check to see if you have the capacity to pickup these boots.
        TNT1 A 0 ACS_NamedExecuteWithResult("CheckCapacity") // Special Capacity checking function for armor
		TNT1 A 0 A_GiveInventory("RLLavaBootsPickup",1)
		Stop
//------------------------------------------------------------------------------
	Use:
		Stop	
	}
}

Actor RLLavaBootsToken : RLPermanentInventory {}
Actor RLLavaBootsUse : RLPermanentInventory {}

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

ACTOR RLLeonidasBootsPickup : RLGenericBootsPickup
{
    //$category "Unique Boots"
	//$Sprite SPARA0
    Tag "Leonidas' Boots"
    Inventory.Icon "SPARBOX"
	Inventory.RespawnTics 105000
	States
	{
	SpawnRarityBeam:
// Create the appropriate rarity beam for the item.
		TNT1 A 0 A_SpawnItemEx("RLRarityBeamUnique", 0,0,0, 0,0,0, 0, SXF_SETMASTER)
		TNT1 A 0 A_Jump (256, "SpawnDRPGCheck")
		Goto SpawnDRPGCheck
		
    SpawnLoopFall:
		SPAR A 0 A_JumpIf(Abs(VelZ) <= 0.01 && user_floorhit == 0, "FloorHit")
		"####" "#" 1
		Loop
	SpawnLoop:
// Play the armor's sprite animation.
		SPAR A 6
		SPAR A 6 Bright
		Loop
		
//------------------------------------------------------------------------------
	Use:
		TNT1 A 0
// Check to see if these boots have been activated once before.
		TNT1 A 0 A_JumpIfInventory("RLLeonidasBootsUse",1,"BootsEquip")
		TNT1 A 0 A_Jump (256, "UseTokenRemoval")
		Goto UseTokenRemoval
		
	UseTokenGiven:
// Gives you the identifier that indicates what boots you are manipulating right now.
		TNT1 A 0 A_GiveInventory("RLLeonidasBootsUse", 1)
// Check to see if you are already wearing boots and change the activation message.
		TNT1 A 0 A_Jump (256, "BootsWornCheck")
		Goto BootsWornCheck
		
	BootsEquipTokens:
		TNT1 A 0 A_TakeInventory("RLLeonidasBootsUse",1)
		TNT1 A 0 A_TakeInventory("RLArmorInInventory",1)
// Give the Token and/or Bonus items that are used to define the boots as being worn.
		TNT1 A 0 A_GiveInventory("RLLeonidasBootsToken",1)
		TNT1 A 0 A_GiveInventory("PowerRLLeonidasBootsProtection",1)
		TNT1 A 0 A_GiveInventory("RLBootsWorn",1)
		TNT1 A 0 A_Jump (256, "EquipFinish")
		Goto EquipFinish

//------------------------------------------------------------------------------
// Equip messages are grouped down here.
	PickupDisplayMessage:
// Picking up boots, and you have room for it.
		"####" "#" 0 A_GiveInventory("RLUniqueItemFound",1, AAPTR_PLAYER1)
		TNT1 A 0 A_Print("Picked up \cdLeonidas' Boots.", 2)
		Stop
	EquipFinish:
// Successfully wearing boots.
		TNT1 A 0 A_Print("\cdLeonidas' Boots \c-equipped.", 2)
		Stop
		
	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("\cd= Leonidas' Boots =", 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 RLLeonidasBootsWorldSpawnPickup : RLLeonidasBootsPickup 19025
{
    Inventory.InterHubAmount 0
    Inventory.MaxAmount 0
	+INVENTORY.AUTOACTIVATE
	States
	{
	SpawnRarityBeam:
// Check for DoomRPG, if found, skip the check for special starts. If the armor shouldn't spawn, we need to skip the thunder sound.
		TNT1 A 0 A_JumpIf(CallACS("DRPGCheckTiem"), 2)
		TNT1 A 0 A_JumpIf(CallACS("DRLA_specialstarts") == 2, "Duke2Stuff")
// This makes a thunder sound when it spawns, and emits twinkling noises every now and then to alert players.
		TNT1 A 0 A_SpawnItemEx("RLRarityBeamUniqueWorld", 0,0,0, 0,0,0, 0, SXF_SETMASTER)
		TNT1 A 0 A_PlaySound("weapons/uniquespawned", 7, 0.25, 0, 0)
		TNT1 A 0 A_GiveInventory("RLUniqueItemSpawnMessageSender",1)
		TNT1 A 0 A_Jump (256, "SpawnDRPGCheck")
		Goto SpawnDRPGCheck
//------------------------------------------------------------------------------
	Pickup:
		TNT1 A 0
// Check to see if you have the capacity to pickup these boots.
		TNT1 A 0 A_JumpIfInventory("RLArmorInInventory",0,"NotPickup")
		TNT1 A 0 A_GiveInventory("RLLeonidasBootsPickup",1)
// Activates unique boss system and increases dangerlevel
		TNT1 A 0 A_GiveInventory("RLUniqueItemFound",1, AAPTR_PLAYER1)
		TNT1 A 0 A_GiveInventory("RLDangerLevelUniqueGiver",1, AAPTR_PLAYER1)
		Stop
//------------------------------------------------------------------------------
	Use:
		Stop	
	}
}

ACTOR RLLeonidasBootsPickupSpecial : RLLeonidasBootsPickup
{
    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 these boots.
//		TNT1 A 0 A_JumpIf(CallACS("DRPGCheckTiem"), "PickupNonLimited")
		TNT1 A 0 A_JumpIfInventory("RLArmorInInventory",0,"NotPickup")
		TNT1 A 0 A_GiveInventory("RLLeonidasBootsPickup",1)
		Stop
		
	PickupNonLimited:
		TNT1 A 0
// Check to see if you have the capacity to pickup these boots.
        TNT1 A 0 ACS_NamedExecuteWithResult("CheckCapacity") // Special Capacity checking function for armor
		TNT1 A 0 A_GiveInventory("RLLeonidasBootsPickup",1)
		Stop
//------------------------------------------------------------------------------
	Use:
		Stop	
	}
}
	
actor PowerRLLeonidasBootsProtection : PowerRLGenericBootsProtection
{
   damagefactor "Slime", 0.7
}

Actor RLLeonidasBootsToken : RLPermanentInventory {}
Actor RLLeonidasBootsUse : RLPermanentInventory {}

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

ACTOR RLNuclearPowerBootsPickup : RLGenericBootsPickup
{
    //$category "Unique Boots"
	//$Sprite ENUKC0
    Tag "Nuclear Powerboots"
    Inventory.Icon "ENUBBOX"
	Inventory.RespawnTics 105000
	States
	{
	SpawnRarityBeam:
// Create the appropriate rarity beam for the item.
		TNT1 A 0 A_SpawnItemEx("RLRarityBeamUnique", 0,0,0, 0,0,0, 0, SXF_SETMASTER)
		TNT1 A 0 A_Jump (256, "SpawnDRPGCheck")
		Goto SpawnDRPGCheck
		
    SpawnLoopFall:
		ENUK C 0 A_JumpIf(Abs(VelZ) <= 0.01 && user_floorhit == 0, "FloorHit")
		"####" "#" 1
		Loop
	FloorHit:
		"####" "#" 0 A_PlaySound("boots/dropmetal", 7, 1, 0, 1.5)
		"####" "#" 0 A_ScaleVelocity (0.5)
		"####" "#" 0 A_ChangeFlag("SPECIAL", true)
		"####" "#" 0 A_ChangeFlag("THRUACTORS", false)
		"####" "#" 0 A_SetUserVar("user_floorhit", 1)
		"####" "#" 0 A_Jump(256, "SpawnLoop")
		Goto SpawnLoop
	SpawnLoop:
// Play the armor's sprite animation.
		ENUK C 6
		ENUK C 6 Bright
		Loop
		
//------------------------------------------------------------------------------
	Use:
		TNT1 A 0
// Check to see if these boots have been activated once before.
		TNT1 A 0 A_JumpIfInventory("RLNuclearPowerBootsUse",1,"BootsEquip")
		TNT1 A 0 A_Jump (256, "UseTokenRemoval")
		Goto UseTokenRemoval
		
	UseTokenGiven:
// Gives you the identifier that indicates what boots you are manipulating right now.
		TNT1 A 0 A_GiveInventory("RLNuclearPowerBootsUse", 1)
// Check to see if you are already wearing boots and change the activation message.
		TNT1 A 0 A_Jump (256, "BootsWornCheck")
		Goto BootsWornCheck
		
	BootsEquipTokens:
		TNT1 A 0 A_TakeInventory("RLNuclearPowerBootsUse",1)
		TNT1 A 0 A_TakeInventory("RLArmorInInventory",1)
// Give the Token and/or Bonus items that are used to define the boots as being worn.
		TNT1 A 0 A_GiveInventory("RLNuclearPowerBootsToken",1)
		TNT1 A 0 A_GiveInventory("PowerRLNuclearPowerBootsProtection",1)
		TNT1 A 0 A_GiveInventory("RLBootsWorn",1)
		TNT1 A 0 A_Jump (256, "EquipFinish")
		Goto EquipFinish

//------------------------------------------------------------------------------
// Equip messages are grouped down here.
	PickupDisplayMessage:
// Picking up boots, and you have room for it.
		"####" "#" 0 A_GiveInventory("RLUniqueItemFound",1, AAPTR_PLAYER1)
		TNT1 A 0 A_Print("Picked up the \cdNuclear Powerboots.", 2)
		Stop
	EquipFinish:
// Successfully wearing boots.
		TNT1 A 0 A_Print("\cdNuclear Powerboots \c-equipped.", 2)
		TNT1 A 0 ACS_NamedExecuteWithResult("RLEnclaveSetBonusCheck", 1) // Checks for all parts of the set bonus, gives or removes it accordingly - argument is tic delay before checking
		Stop
		
	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("\cd= Nuclear Powerboots =", 2, "CONFONT")
		Fail
		
//------------------------------------------------------------------------------
/*	SetBonusChecking:
		TNT1 A 0 A_GiveInventory("RLEnclaveSetBonusBoots",1)
		TNT1 A 0 A_JumpIfInventory("RLEnclaveSetBonusArmor",1,"SetBonusChecking2")
		TNT1 A 0
		Stop
	SetBonusChecking2:
		TNT1 A 0 A_JumpIfInventory("RLEnclaveSetBonusArmor",1,1)
		Stop
		TNT1 A 0 A_GiveInventory("RLEnclaveSetBonusActive",1)
		TNT1 A 0 A_Print("\cdNuclear Powerboots \c-equipped.\n\cf= ENCLAVE ENFORCER =\n\cgImproved stats for Nuclear Powerarmor", 8, "CONFONT")
		TNT1 A 0 A_TakeInventory("BasicArmor",99999)
		TNT1 A 0 A_TakeInventory("PowerRLNuclearPowerBootsProtection",1)
		TNT1 A 0 A_GiveInventory("PowerRLAbsoluteBootsProtection",1)
		TNT1 A 0 A_JumpIfInventory("RLShellshockPerk",1,2)
		TNT1 A 0 A_GiveInventory("RLNuclearPowerArmorComplete",1)
		Stop
		TNT1 A 0 A_GiveInventory("RLNuclearPowerArmorCompleteRenegade",1)
		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 RLNuclearPowerBootsWorldSpawnPickup : RLNuclearPowerBootsPickup 19026
{
    Inventory.InterHubAmount 0
    Inventory.MaxAmount 0
	+INVENTORY.AUTOACTIVATE
	States
	{
	SpawnRarityBeam:
// Check for DoomRPG, if found, skip the check for special starts. If the armor shouldn't spawn, we need to skip the thunder sound.
		TNT1 A 0 A_JumpIf(CallACS("DRPGCheckTiem"), 2)
		TNT1 A 0 A_JumpIf(CallACS("DRLA_specialstarts") == 2, "Duke2Stuff")
// This makes a thunder sound when it spawns, and emits twinkling noises every now and then to alert players.
		TNT1 A 0 A_SpawnItemEx("RLRarityBeamUniqueWorld", 0,0,0, 0,0,0, 0, SXF_SETMASTER)
		TNT1 A 0 A_PlaySound("weapons/uniquespawned", 7, 0.25, 0, 0)
		TNT1 A 0 A_GiveInventory("RLUniqueItemSpawnMessageSender",1)
		TNT1 A 0 A_Jump (256, "SpawnDRPGCheck")
		Goto SpawnDRPGCheck
//------------------------------------------------------------------------------
	Pickup:
		TNT1 A 0
// Check to see if you have the capacity to pickup these boots.
		TNT1 A 0 A_JumpIfInventory("RLArmorInInventory",0,"NotPickup")
		TNT1 A 0 A_GiveInventory("RLNuclearPowerBootsPickup",1)
// Activates unique boss system and increases dangerlevel
		TNT1 A 0 A_GiveInventory("RLUniqueItemFound",1, AAPTR_PLAYER1)
		TNT1 A 0 A_GiveInventory("RLDangerLevelUniqueGiver",1, AAPTR_PLAYER1)
		Stop
//------------------------------------------------------------------------------
	Use:
		Stop	
	}
}

ACTOR RLNuclearPowerBootsPickupSpecial : RLNuclearPowerBootsPickup
{
    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 these boots.
//		TNT1 A 0 A_JumpIf(CallACS("DRPGCheckTiem"), "PickupNonLimited")
		TNT1 A 0 A_JumpIfInventory("RLArmorInInventory",0,"NotPickup")
		TNT1 A 0 A_GiveInventory("RLNuclearPowerBootsPickup",1)
		Stop
		
	PickupNonLimited:
		TNT1 A 0
// Check to see if you have the capacity to pickup these boots.
        TNT1 A 0 ACS_NamedExecuteWithResult("CheckCapacity") // Special Capacity checking function for armor
		TNT1 A 0 A_GiveInventory("RLNuclearPowerBootsPickup",1)
		Stop
//------------------------------------------------------------------------------
	Use:
		Stop	
	}
}
	
actor PowerRLNuclearPowerBootsProtection : PowerRLGenericBootsProtection
{
   damagefactor "Slime", 0.25
}

Actor RLNuclearPowerBootsToken : RLPermanentInventory {}
Actor RLNuclearPowerBootsUse : RLPermanentInventory {}

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

ACTOR RLNyarlaptotepsBootsPickup : RLGenericBootsPickup
{
    //$category "Unique Boots"
	//$Sprite NYABA0
    Tag "Nyarlaptoteps Boots"
    Inventory.Icon "NYABBOX"
	Inventory.RespawnTics 105000
	States
	{
	SpawnRarityBeam:
// Create the appropriate rarity beam for the item.
		TNT1 A 0 A_SpawnItemEx("RLRarityBeamUnique", 0,0,0, 0,0,0, 0, SXF_SETMASTER)
		TNT1 A 0 A_Jump (256, "SpawnDRPGCheck")
		Goto SpawnDRPGCheck
		
    SpawnLoopFall:
		NYAB A 0 A_JumpIf(Abs(VelZ) <= 0.01 && user_floorhit == 0, "FloorHit")
		"####" "#" 1
		Loop
	FloorHit:
		"####" "#" 0 A_PlaySound("boots/dropmetal", 7, 1, 0, 1.5)
		"####" "#" 0 A_ScaleVelocity (0.5)
		"####" "#" 0 A_ChangeFlag("SPECIAL", true)
		"####" "#" 0 A_ChangeFlag("THRUACTORS", false)
		"####" "#" 0 A_SetUserVar("user_floorhit", 1)
		"####" "#" 0 A_Jump(256, "SpawnLoop")
		Goto SpawnLoop
	SpawnLoop:
// Play the armor's sprite animation.
		NYAB A 6
		NYAB A 6 Bright
		Loop
		
//------------------------------------------------------------------------------
	Use:
		TNT1 A 0
// Check to see if these boots have been activated once before.
		TNT1 A 0 A_JumpIfInventory("RLNyarlaptotepsBootsUse",1,"BootsEquip")
		TNT1 A 0 A_Jump (256, "UseTokenRemoval")
		Goto UseTokenRemoval
		
	UseTokenGiven:
// Gives you the identifier that indicates what boots you are manipulating right now.
		TNT1 A 0 A_GiveInventory("RLNyarlaptotepsBootsUse", 1)
// Check to see if you are already wearing boots and change the activation message.
		TNT1 A 0 A_Jump (256, "BootsWornCheck")
		Goto BootsWornCheck
		
	BootsEquipTokens:
		TNT1 A 0 A_TakeInventory("RLNyarlaptotepsBootsUse",1)
		TNT1 A 0 A_TakeInventory("RLArmorInInventory",1)
// Give the Token and/or Bonus items that are used to define the boots as being worn.
		TNT1 A 0 A_GiveInventory("RLNyarlaptotepsBootsToken",1)
		TNT1 A 0 A_GiveInventory("PowerRLNyarlaptotepsBootsProtection",1)
		TNT1 A 0 A_GiveInventory("RLBootsWorn",1)
		TNT1 A 0 A_Jump (256, "EquipFinish")
		Goto EquipFinish

//------------------------------------------------------------------------------
// Equip messages are grouped down here.
	PickupDisplayMessage:
// Picking up boots, and you have room for it.
		"####" "#" 0 A_GiveInventory("RLUniqueItemFound",1, AAPTR_PLAYER1)
		TNT1 A 0 A_Print("Picked up \cdNyarlaptotep's Boots.", 2)
		Stop
	EquipFinish:
// Successfully wearing boots.
		TNT1 A 0 A_Print("\cdNyarlaptotep's Boots \c-equipped.", 2)
		TNT1 A 0 ACS_NamedExecuteWithResult("RLInquisitorsSetBonusCheck", 1) // Checks for all parts of the set bonus, gives or removes it accordingly - argument is tic delay before checking
		Stop
		
	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("\cd= Nyarlaptotep's Boots =", 2, "CONFONT")
		Fail
		
//------------------------------------------------------------------------------
/*	SetBonusChecking:
		TNT1 A 0 A_GiveInventory("RLInquisitorsSetBonusBoots",1)
		TNT1 A 0 A_JumpIfInventory("RLInquisitorsSetBonusArmor",1,"SetBonusCheckingDetection")
		Stop
	SetBonusCheckingDetection:
		TNT1 A 0 A_JumpIfInventory("RLInquisitorsSetBonusArmor",1,1)
		Stop
		TNT1 A 0 A_GiveInventory("RLInquisitorsSetBonusActive",1)
		TNT1 A 0 A_GiveInventory("PowerRLInquisitorsSetBonusProtection",1)
		TNT1 A 0 A_Print("\cdNyarlaptotep's Boots \c-equipped.\n\cf= INQUISITOR'S JUDGEMENT =\n\cgImmunity to \cgfire\c- 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 RLNyarlaptotepsBootsWorldSpawnPickup : RLNyarlaptotepsBootsPickup 19027
{
    Inventory.InterHubAmount 0
    Inventory.MaxAmount 0
	+INVENTORY.AUTOACTIVATE
	States
	{
	SpawnRarityBeam:
// Check for DoomRPG, if found, skip the check for special starts. If the armor shouldn't spawn, we need to skip the thunder sound.
		TNT1 A 0 A_JumpIf(CallACS("DRPGCheckTiem"), 2)
		TNT1 A 0 A_JumpIf(CallACS("DRLA_specialstarts") == 2, "Duke2Stuff")
// This makes a thunder sound when it spawns, and emits twinkling noises every now and then to alert players.
		TNT1 A 0 A_SpawnItemEx("RLRarityBeamUniqueWorld", 0,0,0, 0,0,0, 0, SXF_SETMASTER)
		TNT1 A 0 A_PlaySound("weapons/uniquespawned", 7, 0.25, 0, 0)
		TNT1 A 0 A_GiveInventory("RLUniqueItemSpawnMessageSender",1)
		TNT1 A 0 A_Jump (256, "SpawnDRPGCheck")
		Goto SpawnDRPGCheck
//------------------------------------------------------------------------------
	Pickup:
		TNT1 A 0
// Check to see if you have the capacity to pickup these boots.
		TNT1 A 0 A_JumpIfInventory("RLArmorInInventory",0,"NotPickup")
		TNT1 A 0 A_GiveInventory("RLNyarlaptotepsBootsPickup",1)
// Activates unique boss system and increases dangerlevel
		TNT1 A 0 A_GiveInventory("RLUniqueItemFound",1, AAPTR_PLAYER1)
		TNT1 A 0 A_GiveInventory("RLDangerLevelUniqueGiver",1, AAPTR_PLAYER1)
		Stop
//------------------------------------------------------------------------------
	Use:
		Stop	
	}
}

ACTOR RLNyarlaptotepsBootsPickupSpecial : RLNyarlaptotepsBootsPickup
{
    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 these boots.
//		TNT1 A 0 A_JumpIf(CallACS("DRPGCheckTiem"), "PickupNonLimited")
		TNT1 A 0 A_JumpIfInventory("RLArmorInInventory",0,"NotPickup")
		TNT1 A 0 A_GiveInventory("RLNyarlaptotepsBootsPickup",1)
		Stop
		
	PickupNonLimited:
		TNT1 A 0
// Check to see if you have the capacity to pickup these boots.
        TNT1 A 0 ACS_NamedExecuteWithResult("CheckCapacity") // Special Capacity checking function for armor
		TNT1 A 0 A_GiveInventory("RLNyarlaptotepsBootsPickup",1)
		Stop
//------------------------------------------------------------------------------
	Use:
		Stop	
	}
}
	
actor PowerRLNyarlaptotepsBootsProtection : PowerRLGenericBootsProtection
{
   damagefactor "Slime", 0.1
}

Actor RLNyarlaptotepsBootsToken : RLPermanentInventory {}
Actor RLNyarlaptotepsBootsUse : RLPermanentInventory {}

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

ACTOR RLRoystensCombatBootsPickup : RLGenericBootsPickup
{
    //$category "Unique Boots"
	//$Sprite ROYBA0
    Tag "Roysten's Combat Boots"
    Inventory.Icon "ROYBBOX"
	Inventory.RespawnTics 105000
	States
	{
	SpawnRarityBeam:
// Create the appropriate rarity beam for the item.
		TNT1 A 0 A_SpawnItemEx("RLRarityBeamUnique", 0,0,0, 0,0,0, 0, SXF_SETMASTER)
		TNT1 A 0 A_Jump (256, "SpawnDRPGCheck")
		Goto SpawnDRPGCheck
		
    SpawnLoopFall:
		ROYB A 0 A_JumpIf(Abs(VelZ) <= 0.01 && user_floorhit == 0, "FloorHit")
		"####" "#" 1
		Loop
	SpawnLoop:
// Play the armor's sprite animation.
		ROYB A 6
		ROYB A 6 Bright
		Loop
		
//------------------------------------------------------------------------------
	Use:
		TNT1 A 0
// Check to see if these boots have been activated once before.
		TNT1 A 0 A_JumpIfInventory("RLRoystensCombatBootsUse",1,"BootsEquip")
		TNT1 A 0 A_Jump (256, "UseTokenRemoval")
		Goto UseTokenRemoval
		
	UseTokenGiven:
// Gives you the identifier that indicates what boots you are manipulating right now.
		TNT1 A 0 A_GiveInventory("RLRoystensCombatBootsUse", 1)
// Check to see if you are already wearing boots and change the activation message.
		TNT1 A 0 A_Jump (256, "BootsWornCheck")
		Goto BootsWornCheck
		
	BootsEquipTokens:
		TNT1 A 0 A_TakeInventory("RLRoystensCombatBootsUse",1)
		TNT1 A 0 A_TakeInventory("RLArmorInInventory",1)
// Give the Token and/or Bonus items that are used to define the boots as being worn.
		TNT1 A 0 A_GiveInventory("RLRoystensCombatBootsToken",1)
		TNT1 A 0 A_GiveInventory("PowerRLRoystensCombatBootsProtection",1)
		TNT1 A 0 A_GiveInventory("RLBootsWorn",1)
		TNT1 A 0 A_Jump (256, "EquipFinish")
		Goto EquipFinish

//------------------------------------------------------------------------------
// Equip messages are grouped down here.
	PickupDisplayMessage:
// Picking up boots, and you have room for it.
		"####" "#" 0 A_GiveInventory("RLUniqueItemFound",1, AAPTR_PLAYER1)
		TNT1 A 0 A_Print("Picked up \cdRoysten's Combat Boots.", 2)
		Stop
	EquipFinish:
// Successfully wearing boots.
		TNT1 A 0 A_Print("\cdRoysten's Combat Boots \c-equipped.", 2)
		TNT1 A 0 ACS_NamedExecuteWithResult("RLRoystensSetBonusCheck", 1) // Checks for all parts of the set bonus, gives or removes it accordingly - argument is tic delay before checking
		Stop
		
	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("\cd= Roysten's Combat Boots =", 2, "CONFONT")
		Fail
		
//------------------------------------------------------------------------------
/*	SetBonusChecking:
		TNT1 A 0 A_GiveInventory("RLRoystenSetBonusBoots",1)
		TNT1 A 0 A_JumpIfInventory("RLRoystenSetBonusArmor",1,"SetBonusCheckingDetection")
		Stop
	SetBonusCheckingDetection:
		TNT1 A 0 A_JumpIfInventory("RLRoystenSetBonusArmor",1,1)
		Stop
		TNT1 A 0 A_GiveInventory("RLRoystenSetBonusActive",1)
		TNT1 A 0 A_Print("\cdRoysten's Combat Boots \c-equipped.\n\cf= ROYSTEN'S REVENGE =\n\cgYou can call in Supply Crates\n\cgonce per level", 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 RLRoystensCombatBootsWorldSpawnPickup : RLRoystensCombatBootsPickup 19028
{
    Inventory.InterHubAmount 0
    Inventory.MaxAmount 0
	+INVENTORY.AUTOACTIVATE
	States
	{
	SpawnRarityBeam:
// Check for DoomRPG, if found, skip the check for special starts. If the armor shouldn't spawn, we need to skip the thunder sound.
		TNT1 A 0 A_JumpIf(CallACS("DRPGCheckTiem"), 2)
		TNT1 A 0 A_JumpIf(CallACS("DRLA_specialstarts") == 2, "Duke2Stuff")
// This makes a thunder sound when it spawns, and emits twinkling noises every now and then to alert players.
		TNT1 A 0 A_SpawnItemEx("RLRarityBeamUniqueWorld", 0,0,0, 0,0,0, 0, SXF_SETMASTER)
		TNT1 A 0 A_PlaySound("weapons/uniquespawned", 7, 0.25, 0, 0)
		TNT1 A 0 A_GiveInventory("RLUniqueItemSpawnMessageSender",1)
		TNT1 A 0 A_Jump (256, "SpawnDRPGCheck")
		Goto SpawnDRPGCheck
//------------------------------------------------------------------------------
	Pickup:
		TNT1 A 0
// Check to see if you have the capacity to pickup these boots.
		TNT1 A 0 A_JumpIfInventory("RLArmorInInventory",0,"NotPickup")
		TNT1 A 0 A_GiveInventory("RLRoystensCombatBootsPickup",1)
// Activates unique boss system and increases dangerlevel
		TNT1 A 0 A_GiveInventory("RLUniqueItemFound",1, AAPTR_PLAYER1)
		TNT1 A 0 A_GiveInventory("RLDangerLevelUniqueGiver",1, AAPTR_PLAYER1)
		Stop
//------------------------------------------------------------------------------
	Use:
		Stop	
	}
}

ACTOR RLRoystensCombatBootsPickupSpecial : RLRoystensCombatBootsPickup
{
    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 these boots.
//		TNT1 A 0 A_JumpIf(CallACS("DRPGCheckTiem"), "PickupNonLimited")
		TNT1 A 0 A_JumpIfInventory("RLArmorInInventory",0,"NotPickup")
		TNT1 A 0 A_GiveInventory("RLRoystensCombatBootsPickup",1)
		Stop
		
	PickupNonLimited:
		TNT1 A 0
// Check to see if you have the capacity to pickup these boots.
        TNT1 A 0 ACS_NamedExecuteWithResult("CheckCapacity") // Special Capacity checking function for armor
		TNT1 A 0 A_GiveInventory("RLRoystensCombatBootsPickup",1)
		Stop
//------------------------------------------------------------------------------
	Use:
		Stop	
	}
}
	
actor PowerRLRoystensCombatBootsProtection : PowerRLGenericBootsProtection
{
   damagefactor "Slime", 0.5
}

Actor RLRoystensCombatBootsToken : RLPermanentInventory {}
Actor RLRoystensCombatBootsUse : RLPermanentInventory {}

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

ACTOR RLSoloOperativeBootsPickup : RLGenericBootsPickup
{
    //$category "Unique Boots"
	//$Sprite SSOBA0
    Tag "Solo Operative Boots"
    Inventory.Icon "SSOBBOX"
	Inventory.RespawnTics 105000
	States
	{
	SpawnRarityBeam:
// Create the appropriate rarity beam for the item.
		TNT1 A 0 A_SpawnItemEx("RLRarityBeamUnique", 0,0,0, 0,0,0, 0, SXF_SETMASTER)
		TNT1 A 0 A_Jump (256, "SpawnDRPGCheck")
		Goto SpawnDRPGCheck
		
    SpawnLoopFall:
		SSOB A 0 A_JumpIf(Abs(VelZ) <= 0.01 && user_floorhit == 0, "FloorHit")
		"####" "#" 1
		Loop
	SpawnLoop:
// Play the armor's sprite animation.
		SSOB A 6
		SSOB A 6 Bright
		Loop
		
//------------------------------------------------------------------------------
	Use:
		TNT1 A 0
// Check to see if these boots have been activated once before.
		TNT1 A 0 A_JumpIfInventory("RLSoloOperativeBootsUse",1,"BootsEquip")
		TNT1 A 0 A_Jump (256, "UseTokenRemoval")
		Goto UseTokenRemoval
		
	UseTokenGiven:
// Gives you the identifier that indicates what boots you are manipulating right now.
		TNT1 A 0 A_GiveInventory("RLSoloOperativeBootsUse", 1)
// Check to see if you are already wearing boots and change the activation message.
		TNT1 A 0 A_Jump (256, "BootsWornCheck")
		Goto BootsWornCheck
		
	BootsEquipTokens:
		TNT1 A 0 A_TakeInventory("RLSoloOperativeBootsUse",1)
		TNT1 A 0 A_TakeInventory("RLArmorInInventory",1)
// Give the Token and/or Bonus items that are used to define the boots as being worn.
		TNT1 A 0 A_GiveInventory("RLSoloOperativeBootsToken",1)
		TNT1 A 0 A_GiveInventory("PowerRLSoloOperativeBootsProtection",1)
		TNT1 A 0 A_GiveInventory("RLBootsWorn",1)
		TNT1 A 0 A_Jump (256, "EquipFinish")
		Goto EquipFinish

//------------------------------------------------------------------------------
// Equip messages are grouped down here.
	PickupDisplayMessage:
// Picking up boots, and you have room for it.
		"####" "#" 0 A_GiveInventory("RLUniqueItemFound",1, AAPTR_PLAYER1)
		TNT1 A 0 A_Print("Picked up the \cdSolo Operative Boots.", 2)
		Stop
	EquipFinish:
// Successfully wearing boots.
		TNT1 A 0 A_Print("\cdSolo Operative Boots \c-equipped.", 2)
		TNT1 A 0 ACS_NamedExecuteWithResult("RLArchitectSetBonusCheck", 1) // Checks for all parts of the set bonus, gives or removes it accordingly - argument is tic delay before checking
		Stop
		
	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("\cd= Solo Operative Boots =", 2, "CONFONT")
		Fail
		
//------------------------------------------------------------------------------
/*	SetBonusChecking:
		TNT1 A 0 A_GiveInventory("RLArchitectSetBonusBoots",1)
		TNT1 A 0 A_JumpIfInventory("RLArchitectSetBonusArmor",1,"SetBonusCheckingDetection")
		Stop
	SetBonusCheckingDetection:
		TNT1 A 0 A_JumpIfInventory("RLArchitectSetBonusArmor",1,1)
		Stop
		TNT1 A 0 A_GiveInventory("RLArchitectSetBonusActive",1)
		TNT1 A 0 A_Print("\cdSolo Operative Boots \c-equipped.\n\cf= ARCHITECT OF DEATH =\n\cgYou can turn invisible, confuse monsters and\n\cgdeal additional damage for a few seconds", 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 RLSoloOperativeBootsWorldSpawnPickup : RLSoloOperativeBootsPickup 19029
{
    Inventory.InterHubAmount 0
    Inventory.MaxAmount 0
	+INVENTORY.AUTOACTIVATE
	States
	{
	SpawnRarityBeam:
// Check for DoomRPG, if found, skip the check for special starts. If the armor shouldn't spawn, we need to skip the thunder sound.
		TNT1 A 0 A_JumpIf(CallACS("DRPGCheckTiem"), 2)
		TNT1 A 0 A_JumpIf(CallACS("DRLA_specialstarts") == 2, "Duke2Stuff")
// This makes a thunder sound when it spawns, and emits twinkling noises every now and then to alert players.
		TNT1 A 0 A_SpawnItemEx("RLRarityBeamUniqueWorld", 0,0,0, 0,0,0, 0, SXF_SETMASTER)
		TNT1 A 0 A_PlaySound("weapons/uniquespawned", 7, 0.25, 0, 0)
		TNT1 A 0 A_GiveInventory("RLUniqueItemSpawnMessageSender",1)
		TNT1 A 0 A_Jump (256, "SpawnDRPGCheck")
		Goto SpawnDRPGCheck
//------------------------------------------------------------------------------
	Pickup:
		TNT1 A 0
// Check to see if you have the capacity to pickup these boots.
		TNT1 A 0 A_JumpIfInventory("RLArmorInInventory",0,"NotPickup")
		TNT1 A 0 A_GiveInventory("RLSoloOperativeBootsPickup",1)
// Activates unique boss system and increases dangerlevel
		TNT1 A 0 A_GiveInventory("RLUniqueItemFound",1, AAPTR_PLAYER1)
		TNT1 A 0 A_GiveInventory("RLDangerLevelUniqueGiver",1, AAPTR_PLAYER1)
		Stop
//------------------------------------------------------------------------------
	Use:
		Stop	
	}
}

ACTOR RLSoloOperativeBootsPickupSpecial : RLSoloOperativeBootsPickup
{
    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 these boots.
//		TNT1 A 0 A_JumpIf(CallACS("DRPGCheckTiem"), "PickupNonLimited")
		TNT1 A 0 A_JumpIfInventory("RLArmorInInventory",0,"NotPickup")
		TNT1 A 0 A_GiveInventory("RLSoloOperativeBootsPickup",1)
		Stop
		
	PickupNonLimited:
		TNT1 A 0
// Check to see if you have the capacity to pickup these boots.
        TNT1 A 0 ACS_NamedExecuteWithResult("CheckCapacity") // Special Capacity checking function for armor
		TNT1 A 0 A_GiveInventory("RLSoloOperativeBootsPickup",1)
		Stop
//------------------------------------------------------------------------------
	Use:
		Stop	
	}
}
	
actor PowerRLSoloOperativeBootsProtection : PowerRLGenericBootsProtection
{
   damagefactor "Slime", 0.5
}

Actor RLSoloOperativeBootsToken : RLPermanentInventory {}
Actor RLSoloOperativeBootsUse : RLPermanentInventory {}

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

ACTOR RLTacticalAssemblerBootsPickup : RLGenericBootsPickup
{
    //$category "Unique Boots"
	//$Sprite TCABA0
    Tag "Tactical Assembler Boots"
    Inventory.Icon "REDBBOX"
	Inventory.RespawnTics 105000
	States
	{
	SpawnRarityBeam:
// Create the appropriate rarity beam for the item.
		TNT1 A 0 A_SpawnItemEx("RLRarityBeamUnique", 0,0,0, 0,0,0, 0, SXF_SETMASTER)
		TNT1 A 0 A_Jump (256, "SpawnDRPGCheck")
		Goto SpawnDRPGCheck
		
    SpawnLoopFall:
		TCAB A 0 A_JumpIf(Abs(VelZ) <= 0.01 && user_floorhit == 0, "FloorHit")
		"####" "#" 1
		Loop
	SpawnLoop:
// Play the armor's sprite animation.
		TCAB A 6
		TCAB A 6 Bright
		Loop
		
//------------------------------------------------------------------------------
	Use:
		TNT1 A 0
// Check to see if these boots have been activated once before.
		TNT1 A 0 A_JumpIfInventory("RLTacticalAssemblerBootsUse",1,"BootsEquip")
		TNT1 A 0 A_Jump (256, "UseTokenRemoval")
		Goto UseTokenRemoval
		
	UseTokenGiven:
// Gives you the identifier that indicates what boots you are manipulating right now.
		TNT1 A 0 A_GiveInventory("RLTacticalAssemblerBootsUse", 1)
// Check to see if you are already wearing boots and change the activation message.
		TNT1 A 0 A_Jump (256, "BootsWornCheck")
		Goto BootsWornCheck
		
	BootsEquipTokens:
		TNT1 A 0 A_TakeInventory("RLTacticalAssemblerBootsUse",1)
		TNT1 A 0 A_TakeInventory("RLArmorInInventory",1)
// Give the Token and/or Bonus items that are used to define the boots as being worn.
		TNT1 A 0 A_GiveInventory("RLTacticalAssemblerBootsToken",1)
		TNT1 A 0 A_GiveInventory("PowerRLTacticalAssemblerBootsProtection",1)
		TNT1 A 0 A_GiveInventory("RLBootsWorn",1)
		TNT1 A 0 A_Jump (256, "EquipFinish")
		Goto EquipFinish

//------------------------------------------------------------------------------
// Equip messages are grouped down here.
	PickupDisplayMessage:
// Picking up boots, and you have room for it.
		"####" "#" 0 A_GiveInventory("RLUniqueItemFound",1, AAPTR_PLAYER1)
		TNT1 A 0 A_Print("Picked up the \cdTactical Assembler Boots.", 2)
		Stop
	EquipFinish:
// Successfully wearing boots.
		TNT1 A 0 A_Print("\cdTactical Assembler Boots \c-equipped.", 2)
		TNT1 A 0 ACS_NamedExecuteWithResult("RLREDSetBonusCheck", 1) // Checks for all parts of the set bonus, gives or removes it accordingly - argument is tic delay before checking
		Stop
		
	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("\cd= Tactical Assembler Boots =", 2, "CONFONT")
		Fail
		
//------------------------------------------------------------------------------
/*	SetBonusChecking:
		TNT1 A 0 A_GiveInventory("RLSensibleStrategistSetBonusBoots",1)
		TNT1 A 0 A_JumpIfInventory("RLSensibleStrategistSetBonusArmor",1,"SetBonusCheckingDetection")
		Stop
	SetBonusCheckingDetection:
		TNT1 A 0 A_JumpIfInventory("RLSensibleStrategistSetBonusArmor",1,1)
		Stop
		TNT1 A 0 A_GiveInventory("RLSensibleStrategistSetBonusActive",1)
		TNT1 A 0 A_Print("\cdTactical Assembler Boots \c-equipped.\n\cf= SENSIBLE STRATEGIST =\n\cgRestorer heals more health and repairs armor", 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 RLTacticalAssemblerBootsWorldSpawnPickup : RLTacticalAssemblerBootsPickup 19030
{
    Inventory.InterHubAmount 0
    Inventory.MaxAmount 0
	+INVENTORY.AUTOACTIVATE
	States
	{
	SpawnRarityBeam:
// Check for DoomRPG, if found, skip the check for special starts. If the armor shouldn't spawn, we need to skip the thunder sound.
		TNT1 A 0 A_JumpIf(CallACS("DRPGCheckTiem"), 2)
		TNT1 A 0 A_JumpIf(CallACS("DRLA_specialstarts") == 2, "Duke2Stuff")
// This makes a thunder sound when it spawns, and emits twinkling noises every now and then to alert players.
		TNT1 A 0 A_SpawnItemEx("RLRarityBeamUniqueWorld", 0,0,0, 0,0,0, 0, SXF_SETMASTER)
		TNT1 A 0 A_PlaySound("weapons/uniquespawned", 7, 0.25, 0, 0)
		TNT1 A 0 A_GiveInventory("RLUniqueItemSpawnMessageSender",1)
		TNT1 A 0 A_Jump (256, "SpawnDRPGCheck")
		Goto SpawnDRPGCheck
//------------------------------------------------------------------------------
	Pickup:
		TNT1 A 0
// Check to see if you have the capacity to pickup these boots.
		TNT1 A 0 A_JumpIfInventory("RLArmorInInventory",0,"NotPickup")
		TNT1 A 0 A_GiveInventory("RLTacticalAssemblerBootsPickup",1)
// Activates unique boss system and increases dangerlevel
		TNT1 A 0 A_GiveInventory("RLUniqueItemFound",1, AAPTR_PLAYER1)
		TNT1 A 0 A_GiveInventory("RLDangerLevelUniqueGiver",1, AAPTR_PLAYER1)
		Stop
//------------------------------------------------------------------------------
	Use:
		Stop	
	}
}

ACTOR RLTacticalAssemblerBootsPickupSpecial : RLTacticalAssemblerBootsPickup
{
    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 these boots.
//		TNT1 A 0 A_JumpIf(CallACS("DRPGCheckTiem"), "PickupNonLimited")
		TNT1 A 0 A_JumpIfInventory("RLArmorInInventory",0,"NotPickup")
		TNT1 A 0 A_GiveInventory("RLTacticalAssemblerBootsPickup",1)
		Stop
		
	PickupNonLimited:
		TNT1 A 0
// Check to see if you have the capacity to pickup these boots.
        TNT1 A 0 ACS_NamedExecuteWithResult("CheckCapacity") // Special Capacity checking function for armor
		TNT1 A 0 A_GiveInventory("RLTacticalAssemblerBootsPickup",1)
		Stop
//------------------------------------------------------------------------------
	Use:
		Stop	
	}
}
	
actor PowerRLTacticalAssemblerBootsProtection : PowerRLGenericBootsProtection
{
   damagefactor "Slime", 0.2
}

Actor RLTacticalAssemblerBootsToken : RLPermanentInventory {}
Actor RLTacticalAssemblerBootsUse : RLPermanentInventory {}

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

ACTOR RLTorgueBlastBootsPickup : RLGenericBootsPickup
{
    //$category "Unique Boots"
	//$Sprite TORBA0
    Tag "Torgue Blastboots"
    Inventory.Icon "TORBBOX"
	Inventory.RespawnTics 105000
	States
	{
	SpawnRarityBeam:
// Create the appropriate rarity beam for the item.
		TNT1 A 0 A_SpawnItemEx("RLRarityBeamUnique", 0,0,0, 0,0,0, 0, SXF_SETMASTER)
		TNT1 A 0 A_Jump (256, "SpawnDRPGCheck")
		Goto SpawnDRPGCheck
		
    SpawnLoopFall:
		TORB A 0 A_JumpIf(Abs(VelZ) <= 0.01 && user_floorhit == 0, "FloorHit")
		"####" "#" 1
		Loop
	FloorHit:
		"####" "#" 0 A_PlaySound("boots/dropmetal", 7, 1, 0, 1.5)
		"####" "#" 0 A_ScaleVelocity (0.5)
		"####" "#" 0 A_ChangeFlag("SPECIAL", true)
		"####" "#" 0 A_ChangeFlag("THRUACTORS", false)
		"####" "#" 0 A_SetUserVar("user_floorhit", 1)
		"####" "#" 0 A_Jump(256, "SpawnLoop")
		Goto SpawnLoop
	SpawnLoop:
// Play the armor's sprite animation.
		TORB A 6
		TORB A 6 Bright
		Loop
		
//------------------------------------------------------------------------------
	Use:
		TNT1 A 0
// Check to see if these boots have been activated once before.
		TNT1 A 0 A_JumpIfInventory("RLTorgueBlastBootsUse",1,"BootsEquip")
		TNT1 A 0 A_Jump (256, "UseTokenRemoval")
		Goto UseTokenRemoval
		
	UseTokenGiven:
// Gives you the identifier that indicates what boots you are manipulating right now.
		TNT1 A 0 A_GiveInventory("RLTorgueBlastBootsUse", 1)
// Check to see if you are already wearing boots and change the activation message.
		TNT1 A 0 A_Jump (256, "BootsWornCheck")
		Goto BootsWornCheck
		
	BootsEquipTokens:
		TNT1 A 0 A_TakeInventory("RLTorgueBlastBootsUse",1)
		TNT1 A 0 A_TakeInventory("RLArmorInInventory",1)
// Give the Token and/or Bonus items that are used to define the boots as being worn.
		TNT1 A 0 A_GiveInventory("RLTorgueBlastBootsToken",1)
		TNT1 A 0 A_GiveInventory("PowerRLTorgueBlastBootsProtection",1)
		TNT1 A 0 A_GiveInventory("RLBootsWorn",1)
		TNT1 A 0 A_Jump (256, "EquipFinish")
		Goto EquipFinish

//------------------------------------------------------------------------------
// Equip messages are grouped down here.
	PickupDisplayMessage:
// Picking up boots, and you have room for it.
		"####" "#" 0 A_GiveInventory("RLUniqueItemFound",1, AAPTR_PLAYER1)
		TNT1 A 0 A_Print("Picked up the \cdTorgue Blastboots.", 2)
		Stop
	EquipFinish:
// Successfully wearing boots.
		TNT1 A 0 A_Print("\cdTorgue Blastboots \c-equipped.", 2)
		TNT1 A 0 ACS_NamedExecuteWithResult("RLTorgueSetBonusCheck", 1) // Checks for all parts of the set bonus, gives or removes it accordingly - argument is tic delay before checking
		Stop
		
	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("\cd= Torgue Blastboots =", 2, "CONFONT")
		Fail
		
//------------------------------------------------------------------------------
/*	SetBonusChecking:
		TNT1 A 0 A_GiveInventory("RLTorgueSetBonusBoots",1)
		TNT1 A 0 A_JumpIfInventory("RLTorgueSetBonusArmor",1,"SetBonusCheckingDetection")
		Stop
	SetBonusCheckingDetection:
		TNT1 A 0 A_JumpIfInventory("RLTorgueSetBonusArmor",1,1)
		Stop
		TNT1 A 0 A_GiveInventory("RLTorgueSetBonusActive",1)
		TNT1 A 0 A_Print("\cdTorgue Blastboots \c-equipped.\n\cf= EXPLOOOOOSSSIONS =\n\cgAdvanced Torgue explosion technology is activated in\n\cgboth the armor and boots", 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 RLTorgueBlastBootsWorldSpawnPickup : RLTorgueBlastBootsPickup 19031
{
    Inventory.InterHubAmount 0
    Inventory.MaxAmount 0
	+INVENTORY.AUTOACTIVATE
	States
	{
	SpawnRarityBeam:
// Check for DoomRPG, if found, skip the check for special starts. If the armor shouldn't spawn, we need to skip the thunder sound.
		TNT1 A 0 A_JumpIf(CallACS("DRPGCheckTiem"), 2)
		TNT1 A 0 A_JumpIf(CallACS("DRLA_specialstarts") == 2, "Duke2Stuff")
// This makes a thunder sound when it spawns, and emits twinkling noises every now and then to alert players.
		TNT1 A 0 A_SpawnItemEx("RLRarityBeamUniqueWorld", 0,0,0, 0,0,0, 0, SXF_SETMASTER)
		TNT1 A 0 A_PlaySound("weapons/uniquespawned", 7, 0.25, 0, 0)
		TNT1 A 0 A_GiveInventory("RLUniqueItemSpawnMessageSender",1)
		TNT1 A 0 A_Jump (256, "SpawnDRPGCheck")
		Goto SpawnDRPGCheck
//------------------------------------------------------------------------------
	Pickup:
		TNT1 A 0
// Check to see if you have the capacity to pickup these boots.
		TNT1 A 0 A_JumpIfInventory("RLArmorInInventory",0,"NotPickup")
		TNT1 A 0 A_GiveInventory("RLTorgueBlastBootsPickup",1)
// Activates unique boss system and increases dangerlevel
		TNT1 A 0 A_GiveInventory("RLUniqueItemFound",1, AAPTR_PLAYER1)
		TNT1 A 0 A_GiveInventory("RLDangerLevelUniqueGiver",1, AAPTR_PLAYER1)
		Stop
//------------------------------------------------------------------------------
	Use:
		Stop	
	}
}

ACTOR RLTorgueBlastBootsPickupSpecial : RLTorgueBlastBootsPickup
{
    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 these boots.
//		TNT1 A 0 A_JumpIf(CallACS("DRPGCheckTiem"), "PickupNonLimited")
		TNT1 A 0 A_JumpIfInventory("RLArmorInInventory",0,"NotPickup")
		TNT1 A 0 A_GiveInventory("RLTorgueBlastBootsPickup",1)
		Stop
		
	PickupNonLimited:
		TNT1 A 0
// Check to see if you have the capacity to pickup these boots.
        TNT1 A 0 ACS_NamedExecuteWithResult("CheckCapacity") // Special Capacity checking function for armor
		TNT1 A 0 A_GiveInventory("RLTorgueBlastBootsPickup",1)
		Stop
//------------------------------------------------------------------------------
	Use:
		Stop	
	}
}
	
actor PowerRLTorgueBlastBootsProtection : PowerRLGenericBootsProtection
{
   damagefactor "Slime", 0.4
}

Actor RLTorgueBlastBootsToken : RLPermanentInventory {}
Actor RLTorgueBlastBootsUse : RLPermanentInventory {}

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