Actor INFGODSVitalityRune : VitalityRune Replaces VitalityRune
{
  Inventory.PickupMessage "Vitality Rune: Regeneration and Resistance"
  States
  {
  Spawn:
	TNT1 A 0 NoDelay A_JumpIf(ACS_NamedExecuteWithResult("TrueHardMode") == 1, "Remove")
	TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("NexusNoFloat") == 0,2)
	TNT1 A 0 A_ChangeFlag(FLOATBOB,0)
	TNT1 A 0 A_PlaySound("Pickups/Legruneidle",7,1.0,1)
    TNT1 A 0 A_SpawnItemEx("VitalityRuneFXSpawner")
	VRUN AAA 10 Bright A_SpawnItemEx("VitalityRuneFlameSpawner",0,0,-20)
    Goto Spawn+3
  Pickup:
	TNT1 A 0 A_JumpIfInventory("RuneArmorResetCooldown",1,"Nope")
	TNT1 A 0 A_JumpIfInventory("TrueLegendaryRuneItem2",1,"Nope")
	TNT1 A 0 A_JumpIfInventory("TrueLegendaryRuneItem",1,"Enhance")
    TNT1 A 0 A_JumpIfInventory("VitalityRuneToken",1,"Nope")
	TNT1 A 0 A_PlaySound("Pickups/Vitrune1",6)
	TNT1 A 0 A_Print("\c[j5]Vitality Rune: Regeneration and Resistance\c-")
	TNT1 A 0 A_GiveInventory("VitalityRuneProtection",1)
	TNT1 A 0 A_GiveInventory("VitalityRuneIronFeet",1)
	TNT1 A 0 ACS_NamedExecuteAlways("RuneRegenerationNexus",0,1)
	TNT1 A 0 A_GiveInventory("VitalityRuneToken",1)
	TNT1 A 1 A_StopSound(7)
	Stop
  Enhance:
	TNT1 A 0 A_JumpIfInventory("VitalityRuneUpgradeToken",1,"Nope")
	TNT1 A 0 A_JumpIfInventory("LegendaryRuneUpgradeToken",1,"Enhance2")
	TNT1 A 0 A_JumpIfInventory("AgilityRuneUpgradeToken",1,"Enhance3")
	TNT1 A 0 A_PlaySound("Pickups/Vitrune1",6)
	TNT1 A 0 A_GiveInventory("VitalityRuneUpgradeToken",1)
	TNT1 A 0 A_Print("\c[z3]Acquire the last two runes to further upgrade the True Legendary Rune!")
	TNT1 A 1 A_StopSound(7)
	Stop
  Enhance2:
	TNT1 A 0 A_JumpIfInventory("AgilityRuneUpgradeToken",1,"Done")
	TNT1 A 0 A_PlaySound("Pickups/Vitrune1",6)
	TNT1 A 0 A_GiveInventory("VitalityRuneUpgradeToken",1)
	TNT1 A 0 A_Print("\c[z3]Acquire the last rune to further upgrade the True Legendary Rune!")
	TNT1 A 1 A_StopSound(7)
	Stop
  Enhance3:
	TNT1 A 0 A_JumpIfInventory("LegendaryRuneUpgradeToken",1,"Done")
	TNT1 A 0 A_PlaySound("Pickups/Vitrune1",6)
	TNT1 A 0 A_GiveInventory("VitalityRuneUpgradeToken",1)
	TNT1 A 0 A_Print("\c[z3]Acquire the last rune to further upgrade the True Legendary Rune!")
	TNT1 A 1 A_StopSound(7)
	Stop
  Done:
	TNT1 A 0 A_PlaySound("Pickups/Vitrune1",6)
	TNT1 A 0 A_GiveInventory("VitalityRuneUpgradeToken",1)
	TNT1 A 0 A_GiveInventory("TrueLegendaryRuneUpgradeToken",1)
	TNT1 A 0 A_Print("\c[z3]Acquire another True Legendary Rune!")
	TNT1 A 1 A_StopSound(7)
	Stop
	}
}

//Mini buff
Actor VitalityRuneProtection : PowerProtection
{
  +INVENTORY.PERSISTENTPOWER
  +INVENTORY.HUBPOWER
  +NOTIMEFREEZE
  Powerup.Duration 0x7FFFFFFF
  +NORADIUSDMG
  DamageFactor "Normal", 0.70
  Damagefactor "PlayerPhase", 0.0
  DamageFactor "PlayerPyro", 0.010
  DamageFactor "Explosion", 0.10
  DamageFactor "Mine", 0.10
  DamageFactor "Slime", 0.0
}