Actor EnragedLegendaryRune : CustomInventory
{
  +FLOATBOB
  +COUNTITEM
  //+INVENTORY.AUTOACTIVATE
  +NOTIMEFREEZE
  ActiveSound "Pickups/Legruneidle"
  Inventory.PickupMessage "Enraged Legendary Rune obtained! Full Enraged Mode!"
  Inventory.Amount 1
  Inventory.MaxAmount 1
  States
 {
  Spawn:
    TNT1 A 0 A_LoopActiveSound
	EGRN A 1 Bright
    Loop
  Pickup:
    TNT1 A 0
    TNT1 A 0 A_JumpIfInventory("LegendaryRuneItem",1,"Replace")//Replaces Leg Rune
	TNT1 A 0 A_JumpIfInventory("EnragedLegendaryRuneItem",1,"Nope")//Only one Rune M8!
	TNT1 A 0 A_PlaySound("Pickups/Legrune")
	TNT1 A 0 A_GiveInventory("EnragedPower",1)
    TNT1 A 0 A_GiveInventory("LegDoubleFiringSpeed",1)
    TNT1 A 0 A_GiveInventory("EnragedProtection",1)
	TNT1 A 0 A_GiveInventory("LegIronFeet",1)//The new power
	TNT1 A 0 A_GiveInventory("EnragedSpeed",1)
	TNT1 A 0 A_GiveInventory("EnragedLegendaryRuneItem",1)
	TNT1 A 1 A_StopSound
	Stop
  Nope:
	EGRN A 1
  Replace:
    TNT1 A 0 A_Takeinventory ("LegRuneDoubleDamage")
	TNT1 A 0 A_Takeinventory ("LegProtection")
    TNT1 A 0 A_TakeInventory ("LegendaryRuneItem",1)
	TNT1 A 0 A_GiveInventory("EnragedPower",1)
    TNT1 A 0 A_GiveInventory("LegDoubleFiringSpeed",1)
    TNT1 A 0 A_GiveInventory("EnragedProtection",1)
	TNT1 A 0 A_GiveInventory("LegIronFeet",1)//The new power
	TNT1 A 0 A_GiveInventory("EnragedSpeed",1)
	TNT1 A 0 A_GiveInventory("EnragedLegendaryRuneItem",1)
	Stop	
  }
}


Actor EnragedPower : PowerDamage 
{
	+INVENTORY.HUBPOWER
	+INVENTORY.PERSISTENTPOWER
    +NOTIMEFREEZE
    Powerup.Duration 0x7FFFFFFF
    DamageFactor "Normal", 2.2
}


Actor EnragedProtection : PowerProtection 
{
	+INVENTORY.HUBPOWER
	+INVENTORY.PERSISTENTPOWER
    +NOTIMEFREEZE
	+NORADIUSDMG
    Powerup.Duration 0x7FFFFFFF
    DamageFactor "Normal", 0.65
    ActiveSound "Pickups/LegProtectionActive"
}

ACTOR EnragedSpeed : PowerSpeed
{
	 +INVENTORY.AUTOACTIVATE
	 +INVENTORY.ALWAYSPICKUP
	 Inventory.MaxAmount 1
	 Powerup.Duration 0x7FFFFFFF
}

ACTOR EnragedLegendaryRuneItem : Weapon {
	Weapon.SelectionOrder 99999
	+WEAPON.NOALERT
	+INVENTORY.UNDROPPABLE
	+WEAPON.CHEATNOTWEAPON
	+WEAPON.NO_AUTO_SWITCH
    +NOTIMEFREEZE
	States {
	Spawn:
	TNT1 A 0
	Ready:
	TNT1 A 0
	Deselect:
	TNT1 A 0
	Select:
	TNT1 A 0
	Fire:
	TNT1 A 0
	Stop
	}
}