Actor EnragedLegendaryPowerShard : CustomInventory  
{
+DONTGIB
//$Category Powerups/ILCA
//$Sprite EPOSA0
//$Title "Enraged Legendary Power Shard"
  Inventory.PickupMessage "Enraged Legendary Power Shard, filled with Legendary energy corrupted with Rage."
  Inventory.PickupSound "legendarycrystal/take"
  Inventory.UseSound "legendary/defense"
  Inventory.Icon "EPOSZ0"
  Inventory.MaxAmount 1
  +INVBAR
  +COUNTITEM
  +INVENTORY.BIGPOWERUP
  +NOTIMEFREEZE
  +FLOAT
  +FLOATBOB
  Scale 0.75
  States
  {
  Use:
    TNT1 A 0
	TNT1 A 1 A_GiveInventory("ELegendaryCrystalProtect",1)
	TNT1 A 1 A_GiveInventory("ELegendaryCrystalHealing",1)	
    Stop  	
  Spawn:
    EPOS ABCDEF 4 Bright A_CustomMissile("ELegendaryDRuneFlameSpawner",-20,0,random(0,-360),2,random(0,360))
	Loop
  }
}

Actor ELegendaryCrystalHealing : PowerupGiver
{
    Powerup.Type ELegCrystalHeal
    +AUTOACTIVATE
    +ALWAYSPICKUP
}

Actor PowerELegCrystalHeal : PowerTargeter
{
    Powerup.Duration -30
    States
    {
    Targeter:
        TNT1 AA 0
		TNT1 A 0 HealThing(1,250)
		TNT1 A 0 A_GiveInventory("RedArmor")
		TNT1 A 0 A_GiveInventory("ELegCrystalArmorGiver",1)
		TNT1 A 0 A_CustomMissile("RedSparkleSpawner",0,0,random(0,-360),2,random(0,360))
		TNT1 AA 3 A_SpawnItemEx("RedPowerLine",random(32,-32),random(32,-32),random(8,48),0,0,random(1,4),0,128,0) 
        Loop
    }
}

ACTOR ELegCrystalArmorGiver : ArmorBonus
{
Armor.SavePercent 68
Armor.SaveAmount 1
Armor.MaxSaveAmount 600
Inventory.Icon "ARM3B0"
}

Actor ELegendaryCrystalProtectEffect : PowerProtection{DamageFActor "Normal",0.3}

Actor ELegendaryCrystalProtect: PowerupGiver
{
  Inventory.MaxAmount 0
  Powerup.Type ELegendaryCrystalProtectEffect
  Powerup.Color Red 0.15
  Powerup.Duration -30
  +INVENTORY.AUTOACTIVATE
  +INVENTORY.ALWAYSPICKUP
  States
  {
  Spawn:
    ROWL A 1 Bright
    Loop
  }
}

