
//==============================================================================
//		BASE BOOTS PICKUP
//==============================================================================

// Super ultra miracle revamped boot pickup inheritance shenanigan code.
// This is gonna save me a lot of work in the future, that's for sure.
ACTOR RLGenericBootsPickup : CustomInventory 19000
{
	Radius 20
	Height 16
    -COUNTITEM
	-SPECIAL
	+THRUACTORS
	+NOBLOCKMONST
    +INVENTORY.INVBAR
    +INVENTORY.UNDROPPABLE
    +INVENTORY.UNTOSSABLE
    Tag "Generic Boots"
    //$category "Standard Boots"
	//$Sprite BOOGA0
    Inventory.InterHubAmount 99
    Inventory.MaxAmount 99
    Inventory.Icon "BOO0BOX"
    Inventory.Pickupmessage ""
	Inventory.PickupSound "boots/drop"
	Inventory.UseSound "boots/equip"
	Inventory.RespawnTics 10500
	
	var int user_floorhit;
	States
	{
	Spawn:
		TNT1 A 0
// This section can be used and expanded on for any additional startup checks in the future.
		TNT1 A 0 A_Jump (256, "SpawnRarityBeam")
		Goto SpawnRarityBeam
		
	SpawnRarityBeam:
// Create the appropriate rarity beam for the item.
		TNT1 A 0 A_SpawnItemEx("RLRarityBeamStandard", 0,0,0, 0,0,0, 0, SXF_SETMASTER)
		TNT1 A 0 A_Jump (256, "SpawnDRPGCheck")
		Goto SpawnDRPGCheck
		
	SpawnDRPGCheck:
// Initialize the item with DoomRPG so it can be used with cool stuff.
		TNT1 A 0 A_JumpIf(CallACS("DRPGCheckTiem"), "DRPGInit")
		TNT1 A 0 A_Jump (256, "SpecialStartCheck")
		Goto SpecialStartCheck
		
    SpecialStartCheck:
// Check for special gameplay starts that might modify the armor pickup.
		TNT1 A 0 A_JumpIf(CallACS("DRLA_specialstarts") == 2, "Duke2Stuff")
		TNT1 A 0 A_CheckFloor ("SpawnOnFloor")
		TNT1 A 0 A_Jump (256, "SpawnLoopFall")
		Goto SpawnLoopFall
		
    SpawnLoopFall:
		BOOG A 0 A_JumpIf(Abs(VelZ) <= 0.01 && user_floorhit == 0, "FloorHit")
		"####" "#" 1
		Loop
	FloorHit:
		"####" "#" 0 A_PlaySound("boots/drop", 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
		
	SpawnOnFloor:
		"####" "#" 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.
		BOOG A 6
		BOOG A 6 Bright
		Loop
		
//------------------------------------------------------------------------------
	Pickup:
		TNT1 A 0
// Check to see if you have the capacity to pickup this armor.
//		TNT1 A 0 A_JumpIf(CallACS("DRPGCheckTiem"), "PickupNonLimited")// Not needed anymore
		TNT1 A 0 A_JumpIfInventory("RLArmorInInventory",0,"NotPickup")
		TNT1 A 0 A_GiveInventory("RLArmorInInventory",1)
		TNT1 A 0 A_Jump (256, "PickupDisplayMessage")
		Goto PickupDisplayMessage
		
/*	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_Jump (256, "PickupDisplayMessage")
		Goto PickupDisplayMessage
*/		
		
//------------------------------------------------------------------------------
	Use:
		TNT1 A 0
// Check to see if these boots have been activated once before.
		TNT1 A 0 A_JumpIfInventory("RLGenericBootsUse",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("RLGenericBootsUse", 1)
// Check to see if you are already wearing boots and change the activation message.
		TNT1 A 0 A_Jump (256, "BootsWornCheck")
		Goto BootsWornCheck
		
	BootsEquip:
// First, check to see if you have an active Doorpeg shield.
		TNT1 A 0 A_JumpIfInventory("DRPGDRLAActive",1,"DoorpegShieldCheck")
// Next, check to see if you are already wearing boots.
		TNT1 A 0 A_Jump (256, "BootsWornCheckEquipping")
		Goto BootsWornCheckEquipping
		
	BootsEquipTokens:
		TNT1 A 0 A_TakeInventory("RLGenericBootsUse",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("RLGenericBootsToken",1)
		TNT1 A 0 A_GiveInventory("PowerRLGenericBootsProtection",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 an armor, and you have room for it.
		TNT1 A 0 A_Print("Picked up the \cjGeneric Boots.", 2)
		Stop
	EquipFinish:
// Successfully wearing an armor.
		TNT1 A 0 A_Print("\cjGeneric Boots \c-equipped.", 2)
		TNT1 A 0 A_GiveInventory("RLDeselectionFunction",1)
		Stop
	NotEquip:
// You are stupid. Stop being stupid.
		TNT1 A 0 A_Print("You are already wearing boots.", 2)
		TNT1 A 0 A_GiveInventory("RLDeselectionFunction",1)
		Fail
		
	BootsAlreadyEquipped:
		TNT1 A 0 A_Print("Press \caDrop Item (DRLA)\c- to drop the selected boots, or switch weapons to cancel.", 5)
		Fail
	NoBootsEquipped:
// You are free to either wear the boots or drop it.
		TNT1 A 0 A_Print("Use the boots again to wear them.\n\nPress \caDrop Item (DRLA)\c- to drop them, or switch weapons to cancel.", 5)
		Fail
		
	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("\cj= Generic Boots =", 2, "CONFONT")
		Fail
	 NotPickup_NoPrint:	
// A cooldown dummy power prevents the message from spamming your console.
		TNT1 A 0
		Fail
		
//------------------------------------------------------------------------------
// Boot checking is grouped down here.

//------------------------------------------------------------------------------
// This one checks to see if you are already wearing boots when first activating the item.
// If boots are detected being worn, it will print a different message accordingly.
	BootsWornCheck:
		TNT1 A 0 A_JumpIfInventory("RLBootsWorn",1,"BootsAlreadyEquipped")
		TNT1 A 0 A_Jump (256, "NoBootsEquipped")
		Goto NoBootsEquipped
//------------------------------------------------------------------------------
// This one checks to see if you are already wearing boots when confirming activation the item.
// If boots are detected being worn, it will prevent you from wearing them and print a message for it.
	BootsWornCheckEquipping:
		TNT1 A 0 A_JumpIfInventory("RLBootsWorn",1,"NotEquip")
		TNT1 A 0 A_Jump (256, "BootsEquipTokens")
		Goto BootsEquipTokens
		
//------------------------------------------------------------------------------
// This one simply removes all armor manipulation tokens.
// This will cut down on some weirdness when fiddling with multiple armors.
// I coooooould simply use the RLItemManipulationRemover thing I made, but I don't
// know if it'll finish doing it's job before the next part of this kicks in.
	UseTokenRemoval:
// = THIS PART NEEDS TO BE CONSTANTLY UPDATED FOR ALL ARMORS IN INVENTORY =
// Removes all other armor manipulation tokens to cut down on insanity.
		TNT1 A 0 A_TakeInventory("RLGenericArmorUse", 1)
		TNT1 A 0 A_TakeInventory("RLGreenArmorUse", 1)
		TNT1 A 0 A_TakeInventory("RLBlueArmorUse", 1)
		TNT1 A 0 A_TakeInventory("RLRedArmorUse", 1)
		
		TNT1 A 0 A_TakeInventory("RLCerberusArmorUse", 1)
		TNT1 A 0 A_TakeInventory("RLFireShieldArmorUse", 1)
		TNT1 A 0 A_TakeInventory("RLTowerShieldArmorUse", 1)
		TNT1 A 0 A_TakeInventory("RLTacticalArmorUse", 1)
		
		TNT1 A 0 A_TakeInventory("RLAblativeGreenArmorUse", 1)
		TNT1 A 0 A_TakeInventory("RLAblativeBlueArmorUse", 1)
		TNT1 A 0 A_TakeInventory("RLAblativeRedArmorUse", 1)
		TNT1 A 0 A_TakeInventory("RLBallisticGreenArmorUse", 1)
		TNT1 A 0 A_TakeInventory("RLBallisticBlueArmorUse", 1)
		TNT1 A 0 A_TakeInventory("RLBallisticRedArmorUse", 1)
		TNT1 A 0 A_TakeInventory("RLCybernanoGreenArmorUse", 1)
		TNT1 A 0 A_TakeInventory("RLCybernanoBlueArmorUse", 1)
		TNT1 A 0 A_TakeInventory("RLCybernanoRedArmorUse", 1)
		TNT1 A 0 A_TakeInventory("RLFireproofGreenArmorUse", 1)
		TNT1 A 0 A_TakeInventory("RLFireproofBlueArmorUse", 1)
		TNT1 A 0 A_TakeInventory("RLFireproofRedArmorUse", 1)
		TNT1 A 0 A_TakeInventory("RLNanofiberGreenArmorUse", 1)
		TNT1 A 0 A_TakeInventory("RLNanofiberBlueArmorUse", 1)
		TNT1 A 0 A_TakeInventory("RLNanofiberRedArmorUse", 1)
		TNT1 A 0 A_TakeInventory("RLNanofiberSkinGreenArmorUse", 1)
		TNT1 A 0 A_TakeInventory("RLNanofiberSkinBlueArmorUse", 1)
		TNT1 A 0 A_TakeInventory("RLNanofiberSkinRedArmorUse", 1)
		TNT1 A 0 A_TakeInventory("RLPowerGreenArmorUse", 1)
		TNT1 A 0 A_TakeInventory("RLPowerBlueArmorUse", 1)
		TNT1 A 0 A_TakeInventory("RLPowerRedArmorUse", 1)
		
		TNT1 A 0 A_TakeInventory("RLBallisticShieldArmorUse", 1)
		TNT1 A 0 A_TakeInventory("RLBallisticVestArmorUse", 1)
		TNT1 A 0 A_TakeInventory("RLBulletProofVestArmorUse", 1)
		TNT1 A 0 A_TakeInventory("RLCyberwarriorArmorUse", 1)
		TNT1 A 0 A_TakeInventory("RLDuelistArmorUse", 1)
		TNT1 A 0 A_TakeInventory("RLEnergyShieldedVestArmorUse", 1)
		TNT1 A 0 A_TakeInventory("RLEnergyShieldArmorUse", 1)
		TNT1 A 0 A_TakeInventory("RLGothicArmorUse", 1)
		TNT1 A 0 A_TakeInventory("RLMedicalArmorUse", 1)
		TNT1 A 0 A_TakeInventory("RLNuclearArmorUse", 1)
		TNT1 A 0 A_TakeInventory("RLPhaseshiftArmorUse", 1)
		TNT1 A 0 A_TakeInventory("RLPlasmaShieldArmorUse", 1)
		TNT1 A 0 A_TakeInventory("RLRechargeableEnergyShieldArmorUse", 1)
		TNT1 A 0 A_TakeInventory("RLRepulsionWaveSuitArmorUse", 1)
		TNT1 A 0 A_TakeInventory("RLSurvivalMediArmorUse", 1)
		TNT1 A 0 A_TakeInventory("RLOnyxArmorUse", 1)
		TNT1 A 0 A_TakeInventory("RLOverchargeSystemArmorUse", 1)
		
		TNT1 A 0 A_TakeInventory("RLBerserkerArmorUse", 1)
		TNT1 A 0 A_TakeInventory("RLBerserkPowersuitArmorUse", 1)
		TNT1 A 0 A_TakeInventory("RLBlazingPhoenixDeviceSuitArmorUse", 1)
		TNT1 A 0 A_TakeInventory("RLCyberneticArmorUse", 1)
		TNT1 A 0 A_TakeInventory("RLEnergyDischargeHarnessArmorUse", 1)
		TNT1 A 0 A_TakeInventory("RLFrontlineEngineerSuitArmorUse", 1)
		TNT1 A 0 A_TakeInventory("RLGeosGoldenGauntletArmorUse", 1)
		TNT1 A 0 A_TakeInventory("RLJetpackArmorUse", 1)
		TNT1 A 0 A_TakeInventory("RLKateMatterstormHarnessArmorUse", 1)
		TNT1 A 0 A_TakeInventory("RLKyleTeslaboltArmorUse", 1)
		TNT1 A 0 A_TakeInventory("RLLavaArmorUse", 1)
		TNT1 A 0 A_TakeInventory("RLMaleksArmorUse", 1)
		TNT1 A 0 A_TakeInventory("RLMedicalPowerArmorUse", 1)
		TNT1 A 0 A_TakeInventory("RLNanoAblativeArmorUse", 1)
		TNT1 A 0 A_TakeInventory("RLNecroArmorUse", 1)
		TNT1 A 0 A_TakeInventory("RLNuclearPowerArmorUse", 1)
		TNT1 A 0 A_TakeInventory("RLPrototypeAssaultShieldArmorUse", 1)
		TNT1 A 0 A_TakeInventory("RLRoystensCommandArmorUse", 1)
		TNT1 A 0 A_TakeInventory("RLRyanCordellPsychicAmplifierSuitArmorUse", 1)
		TNT1 A 0 A_TakeInventory("RLShieldedArmorUse", 1)
		TNT1 A 0 A_TakeInventory("RLSoloOperativeSuitArmorUse", 1)
		TNT1 A 0 A_TakeInventory("RLSoulshatterArmorUse", 1)
		TNT1 A 0 A_TakeInventory("RLTacticalAssemblerSuitArmorUse", 1)
		TNT1 A 0 A_TakeInventory("RLTerminusEst13BattlesuitArmorUse", 1)
		TNT1 A 0 A_TakeInventory("RLTorgueBlastplateArmorUse", 1)
		TNT1 A 0 A_TakeInventory("RLWildWeaselPeacekeeperArmorUse", 1)
		TNT1 A 0 A_TakeInventory("RLXaserPowerArmorUse", 1)
		TNT1 A 0 A_TakeInventory("RLZeroDiamondAssaultForceArmorUse", 1)
		
		TNT1 A 0 A_TakeInventory("RLDemonicCarapaceArmorUse", 1)
		TNT1 A 0 A_TakeInventory("RLGenericArmorUse", 1)
		
		TNT1 A 0 A_TakeInventory("RLAngelicArmorUse", 1)
		TNT1 A 0 A_TakeInventory("RLTheBeeArmorUse", 1)
		TNT1 A 0 A_TakeInventory("RLReactiveShieldSystemArmorUse", 1)
		TNT1 A 0 A_TakeInventory("RLChronotrooperArmorUse", 1)
		
		TNT1 A 0 A_TakeInventory("RLOModGreenArmorUse", 1)
		TNT1 A 0 A_TakeInventory("RLOModBlueArmorUse", 1)
		TNT1 A 0 A_TakeInventory("RLOModRedArmorUse", 1)
		TNT1 A 0 A_TakeInventory("RLOModBallisticVestArmorUse", 1)
		TNT1 A 0 A_TakeInventory("RLOModBulletProofVestArmorUse", 1)
		TNT1 A 0 A_TakeInventory("RLOModCyberwarriorArmorUse", 1)
		TNT1 A 0 A_TakeInventory("RLOModDuelistArmorUse", 1)
		TNT1 A 0 A_TakeInventory("RLOModEnergyShieldedVestArmorUse", 1)
		TNT1 A 0 A_TakeInventory("RLOModGothicArmorUse", 1)
		TNT1 A 0 A_TakeInventory("RLOModMedicalArmorUse", 1)
		TNT1 A 0 A_TakeInventory("RLOModPhaseshiftArmorUse", 1)
		TNT1 A 0 A_TakeInventory("RLOModRepulsionWaveSuitArmorUse", 1)
		TNT1 A 0 A_TakeInventory("RLOModSurvivalMediArmorUse", 1)
		
		TNT1 A 0 A_TakeInventory("RLSteelBootsUse",1)
		TNT1 A 0 A_TakeInventory("RLProtectiveBootsUse",1)
		TNT1 A 0 A_TakeInventory("RLPlasteelBootsUse",1)
		
		TNT1 A 0 A_TakeInventory("RLCerberusBootsUse",1)
		TNT1 A 0 A_TakeInventory("RLTacticalBootsUse",1)
		
		TNT1 A 0 A_TakeInventory("RLAntigravSteelBootsUse",1)
		TNT1 A 0 A_TakeInventory("RLAntigravProtectiveBootsUse",1)
		TNT1 A 0 A_TakeInventory("RLAntigravPlasteelBootsUse",1)
		TNT1 A 0 A_TakeInventory("RLEnviromentalSteelBootsUse",1)
		TNT1 A 0 A_TakeInventory("RLEnviromentalProtectiveBootsUse",1)
		TNT1 A 0 A_TakeInventory("RLEnviromentalPlasteelBootsUse",1)
		TNT1 A 0 A_TakeInventory("RLFireproofSteelBootsUse",1)
		TNT1 A 0 A_TakeInventory("RLFireproofProtectiveBootsUse",1)
		TNT1 A 0 A_TakeInventory("RLFireproofPlasteelBootsUse",1)
		TNT1 A 0 A_TakeInventory("RLGrapplingSteelBootsUse",1)
		TNT1 A 0 A_TakeInventory("RLGrapplingProtectiveBootsUse",1)
		TNT1 A 0 A_TakeInventory("RLGrapplingPlasteelBootsUse",1)
		
		TNT1 A 0 A_TakeInventory("RLShockwaveBootsUse",1)
		TNT1 A 0 A_TakeInventory("RLAcidProofBootsUse",1)
		TNT1 A 0 A_TakeInventory("RLGothicBootsUse",1)
		TNT1 A 0 A_TakeInventory("RLPhaseshiftBootsUse",1)
		
		TNT1 A 0 A_TakeInventory("RLEnviroBootsUse",1)
		TNT1 A 0 A_TakeInventory("RLFrontlineEngineerBootsUse",1)
		TNT1 A 0 A_TakeInventory("RLLavaBootsUse",1)
		TNT1 A 0 A_TakeInventory("RLLeonidasBootsUse",1)
		TNT1 A 0 A_TakeInventory("RLNuclearPowerBootsUse",1)
		TNT1 A 0 A_TakeInventory("RLNyarlaptotepsBootsUse",1)
		TNT1 A 0 A_TakeInventory("RLRoystensCombatBootsUse",1)
		TNT1 A 0 A_TakeInventory("RLSoloOperativeBootsUse",1)
		TNT1 A 0 A_TakeInventory("RLTacticalAssemblerBootsUse",1)
		TNT1 A 0 A_TakeInventory("RLTorgueBlastBootsUse",1)
		
		TNT1 A 0 A_TakeInventory("RLDemonicBootsUse",1)
		
		TNT1 A 0 A_TakeInventory("RLAngelicBootsUse",1)
		TNT1 A 0 A_Jump (256, "UseTokenGiven")
		Goto UseTokenGiven
		
//------------------------------------------------------------------------------
// 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)

//==============================================================================
	Duke2Stuff:
		"####" "#" 0 A_SpawnItemEx("RLDuke2ArmorCrate",0,0,0, 0,0,0, 0,SXF_NOCHECKPOSITION)
		Stop
//==============================================================================
//					--	DRPG Compatibility Stuff  --
//==============================================================================
// This makes the item do Doorpeggy things. Like hunting you down if you take magnetic drugs.
  DRPGInit:
	"####" "#" 0 ACS_NamedExecuteAlways("ItemInit", 0)
	"####" "#" 0 A_CheckFloor ("SpawnOnFloor")
	"####" "#" 0 A_Jump (256, "SpawnLoopFall")
	Goto SpawnLoopFall
	
  DoorpegShieldCheck:
// If the shields/armor cvar isn't active or the shields aren't on, continue doing armor things.
	TNT1 A 0 A_JumpIf(CallACS("ShieldRemoveArmor") == 1, "DoorpegNoShieldBootsShenanigans")
	TNT1 A 0 A_Jump (256, "BootsWornCheckEquipping")
	Goto BootsWornCheckEquipping
  DoorpegNoShieldBootsShenanigans:
	TNT1 A 0 A_GiveInventory("RLItemManipulationRemover",1)
// I like making random comment things like this, and other people seem to enjoy them too.
	TNT1 A 0 A_Jump(256, 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20)
	TNT1 A 0 A_Print("You can't equip boots through your shield, you dolt.", 3, "CONFONT")
	Fail
	TNT1 A 0 A_Print("Yeah, you haven't suddenly gained the power to wear that\n through an energy shield.", 3, "CONFONT")
	Fail
	TNT1 A 0 A_Print("Gonna have a bit of trouble with that shield in the way.", 3, "CONFONT")
	Fail
	TNT1 A 0 A_Print("Maybe turn your shield off?\nJust a thought.", 3, "CONFONT")
	Fail
	TNT1 A 0 A_Print("Noooooooope.", 3, "CONFONT")
	Fail
	TNT1 A 0 A_Print("Turn your shield off first.", 3, "CONFONT")
	Fail
	TNT1 A 0 A_Print("Press the off button or this isn't happening.", 3, "CONFONT")
	Fail
	TNT1 A 0 A_Print("Shield is on. Makes this a bit difficult, yes?", 3, "CONFONT")
	Fail
	TNT1 A 0 A_Print("Yeah just... this isn't gonna work.\nTurn the shield off.", 3, "CONFONT")
	Fail
	TNT1 A 0 A_Print("Turn your shield off, maget.", 3, "CONFONT")
	Fail
	TNT1 A 0 A_Print("Nice shield you have there.\nIt would be a shame if it stopped you\nputting on those boots.", 3, "CONFONT")
	Fail
	TNT1 A 0 A_Print("pls no", 3, "CONFONT")
	Fail
	TNT1 A 0 A_Print("OI", 3, "CONFONT")
	Fail
	TNT1 A 0 A_Print("Shields don't really work this way.", 3, "CONFONT")
	Fail
	TNT1 A 0 A_Print("Welcome to your shield!\nPopulation: Still On", 3, "CONFONT")
	Fail
	TNT1 A 0 A_Print("Zap zap zap, look at that shield blocking your fashion attempts.", 3, "CONFONT")
	Fail
	TNT1 A 0 A_Print("stahp", 3, "CONFONT")
	Fail
	TNT1 A 0 A_Print("Shield is on. Should be off.", 3, "CONFONT")
	Fail
	TNT1 A 0 A_Print("The last person who tried this set their vest on fire.\nYou should probably stop.", 3, "CONFONT")
	Fail
	TNT1 A 0 A_Print("YHOLL IS LAUGHING AT YOU\nDO YOU WANT YHOLL TO LAUGH AT YOU\n\nDO YOU REALLY", 3, "CONFONT")
	Fail
	}
}

ACTOR RLGenericBootsPickupSpecial : RLGenericBootsPickup
{
    Inventory.InterHubAmount 0
    Inventory.MaxAmount 0
	+INVENTORY.AUTOACTIVATE
	States
	{
	SpawnDRPGCheck:
// Initialize the item with DoomRPG so it can be used with cool stuff.
		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("RLGenericBootsPickup",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("RLGenericBootsPickup",1)
		Stop
//------------------------------------------------------------------------------
	Use:
		Stop	
	}
}

actor PowerRLGenericBootsProtection : PowerProtection
{
   damagefactor "Slime", 0.7
   inventory.icon ""
   Powerup.Duration -0x7FFFFFFF
   +INVENTORY.PERSISTENTPOWER
   +INVENTORY.UNDROPPABLE
   +INVENTORY.UNTOSSABLE
}

Actor RLGenericBootsToken : RLPermanentInventory {}
Actor RLGenericBootsUse : RLPermanentInventory {}






//==============================================================================================================================================
//==============================================================================
//		STANDARD BOOTS
//==============================================================================
//==============================================================================================================================================

ACTOR RLSteelBootsPickup : RLGenericBootsPickup 19001
{
	//$Sprite BOOTS0
    Tag "Steel Boots"
    Inventory.Icon "BOO1BOX"
	Inventory.RespawnTics 10500
	States
	{
	SpawnRarityBeam:
// Create the appropriate rarity beam for the item.
		TNT1 A 0 A_SpawnItemEx("RLRarityBeamStandard", 0,0,0, 0,0,0, 0, SXF_SETMASTER)
		TNT1 A 0 A_Jump (256, "SpawnDRPGCheck")
		Goto SpawnDRPGCheck
		
    SpawnLoopFall:
		BOOT S 0 A_JumpIf(Abs(VelZ) <= 0.01 && user_floorhit == 0, "FloorHit")
		"####" "#" 1
		Loop
	SpawnLoop:
// Play the armor's sprite animation.
		BOOT S 6
		BOOT S 6 Bright
		Loop
		
//------------------------------------------------------------------------------
	Use:
		TNT1 A 0
// Check to see if these boots have been activated once before.
		TNT1 A 0 A_JumpIfInventory("RLSteelBootsUse",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("RLSteelBootsUse", 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("RLSteelBootsUse",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("RLSteelBootsToken",1)
		TNT1 A 0 A_GiveInventory("PowerRLSteelBootsProtection",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.
		TNT1 A 0 A_Print("Picked up the \cjSteel Boots.", 2)
		Stop
	EquipFinish:
// Successfully wearing boots.
		TNT1 A 0 A_Print("\cjSteel 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("\cj= Steel 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 RLSteelBootsPickupSpecial : RLSteelBootsPickup
{
    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("RLSteelBootsPickup",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("RLSteelBootsPickup",1)
		Stop
//------------------------------------------------------------------------------
	Use:
		Stop	
	}
}
	
actor PowerRLSteelBootsProtection : PowerRLGenericBootsProtection
{
   damagefactor "Slime", 0.9
}

Actor RLSteelBootsToken : RLPermanentInventory {}
Actor RLSteelBootsUse : RLPermanentInventory {}

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

ACTOR RLProtectiveBootsPickup : RLGenericBootsPickup 19002
{
	//$Sprite BOOTG0
    Tag "Protective Boots"
    Inventory.Icon "BOO2BOX"
	Inventory.RespawnTics 10500
	States
	{
	SpawnRarityBeam:
// Create the appropriate rarity beam for the item.
		TNT1 A 0 A_SpawnItemEx("RLRarityBeamStandard", 0,0,0, 0,0,0, 0, SXF_SETMASTER)
		TNT1 A 0 A_Jump (256, "SpawnDRPGCheck")
		Goto SpawnDRPGCheck
		
    SpawnLoopFall:
		BOOT G 0 A_JumpIf(Abs(VelZ) <= 0.01 && user_floorhit == 0, "FloorHit")
		"####" "#" 1
		Loop
	SpawnLoop:
// Play the armor's sprite animation.
		BOOT G 6
		BOOT G 6 Bright
		Loop
		
//------------------------------------------------------------------------------
	Use:
		TNT1 A 0
// Check to see if these boots have been activated once before.
		TNT1 A 0 A_JumpIfInventory("RLProtectiveBootsUse",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("RLProtectiveBootsUse", 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("RLProtectiveBootsUse",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("RLProtectiveBootsToken",1)
		TNT1 A 0 A_GiveInventory("PowerRLProtectiveBootsProtection",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.
		TNT1 A 0 A_Print("Picked up the \cjProtective Boots.", 2)
		Stop
	EquipFinish:
// Successfully wearing boots.
		TNT1 A 0 A_Print("\cjProtective 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("\cj= Protective 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 RLProtectiveBootsPickupSpecial : RLProtectiveBootsPickup
{
    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("RLProtectiveBootsPickup",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("RLProtectiveBootsPickup",1)
		Stop
//------------------------------------------------------------------------------
	Use:
		Stop	
	}
}
	
actor PowerRLProtectiveBootsProtection : PowerRLGenericBootsProtection
{
   damagefactor "Slime", 0.8
}

Actor RLProtectiveBootsToken : RLPermanentInventory {}
Actor RLProtectiveBootsUse : RLPermanentInventory {}

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

ACTOR RLPlasteelBootsPickup : RLGenericBootsPickup 19003
{
	//$Sprite BOOTB0
    Tag "Plasteel Boots"
    Inventory.Icon "BOO3BOX"
	Inventory.RespawnTics 10500
	States
	{
	SpawnRarityBeam:
// Create the appropriate rarity beam for the item.
		TNT1 A 0 A_SpawnItemEx("RLRarityBeamStandard", 0,0,0, 0,0,0, 0, SXF_SETMASTER)
		TNT1 A 0 A_Jump (256, "SpawnDRPGCheck")
		Goto SpawnDRPGCheck
		
    SpawnLoopFall:
		BOOT B 0 A_JumpIf(Abs(VelZ) <= 0.01 && user_floorhit == 0, "FloorHit")
		"####" "#" 1
		Loop
	SpawnLoop:
// Play the armor's sprite animation.
		BOOT B 6
		BOOT B 6 Bright
		Loop
		
//------------------------------------------------------------------------------
	Use:
		TNT1 A 0
// Check to see if these boots have been activated once before.
		TNT1 A 0 A_JumpIfInventory("RLPlasteelBootsUse",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("RLPlasteelBootsUse", 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("RLPlasteelBootsUse",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("RLPlasteelBootsToken",1)
		TNT1 A 0 A_GiveInventory("PowerRLPlasteelBootsProtection",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.
		TNT1 A 0 A_Print("Picked up the \cjPlasteel Boots.", 2)
		Stop
	EquipFinish:
// Successfully wearing boots.
		TNT1 A 0 A_Print("\cjPlasteel 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("\cj= Plasteel 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 RLPlasteelBootsPickupSpecial : RLPlasteelBootsPickup
{
    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("RLPlasteelBootsPickup",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("RLPlasteelBootsPickup",1)
		Stop
//------------------------------------------------------------------------------
	Use:
		Stop	
	}
}
	
actor PowerRLPlasteelBootsProtection : PowerRLGenericBootsProtection
{
   damagefactor "Slime", 0.55
}

Actor RLPlasteelBootsToken : RLPermanentInventory {}
Actor RLPlasteelBootsUse : RLPermanentInventory {}

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