Actor ZamasuRune : CustomInventory
{
//Creator: Nolram + Eshkere Jason
//Origin: Infinity Gods 
//Sprite: ZNRN
//Title: "Zamasu Rune"
+FloatBob
+DONTGIB
+Inventory.InvBar
+Inventory.PickupFlash
+Inventory.FancyPickupSound
+INVENTORY.HUBPOWER
+INVENTORY.PERSISTENTPOWER
+Inventory.AUTOACTIVATE
Inventory.Amount 1
Inventory.MaxAmount 0
Inventory.Icon "ZNRND0"
ActiveSound "VoidRune/Idle"
Inventory.PickupMessage "Zamasu Rune: Receives Resistance and Speed equivalent to that of Zamasu's creatures + increased Nemesis damage"
States
{
  Spawn:
	TNT1 A 0 A_PlaySound("VoidRune/Idle",7,1.0,1)
	TNT1 A 0 A_SpawnItemEx("NemesisRuneLineSpawner")
	ZNRN AAA 4 Bright A_SpawnItemEx("NemesisArmorSoul",random(-30,30),random(-30,30),random(3,10),frandom(-0.2,0.2),frandom(-0.2,0.2),frandom(0.5,2),random(0,360),0,128)
	TNT1 A 0 A_SpawnItemEx("NemesisRuneLineSpawner")
	ZNRN BBB 4 Bright A_SpawnItemEx("NemesisArmorSoul",random(-30,30),random(-30,30),random(3,10),frandom(-0.2,0.2),frandom(-0.2,0.2),frandom(0.5,2),random(0,360),0,128)
	TNT1 A 0 A_SpawnItemEx("NemesisRuneLineSpawner")
	ZNRN CCC 4 Bright A_SpawnItemEx("NemesisArmorSoul",random(-30,30),random(-30,30),random(3,10),frandom(-0.2,0.2),frandom(-0.2,0.2),frandom(0.5,2),random(0,360),0,128)
	Goto Spawn+3
  Pickup:
	TNT1 A 0
	TNT1 A 0 A_JumpIfInventory("ZamasuRuneItem",1,"Nope")
	TNT1 A 0 A_JumpIfInventory("ZamasuGodRuneItem",1,"Nope")
	TNT1 A 0 A_PlaySound("nemesisrune/consoom",6)
	TNT1 A 0 A_GiveInventory("ZamasuRuneCheck")
	TNT1 A 0 A_GiveInventory("ZamasuRuneResistance")
	TNT1 A 0 A_GiveInventory("ZamasuRuneSpeed")
	TNT1 A 0 A_GiveInventory("ZamasuRuneDamage")
	TNT1 A 0 A_GiveInventory("ZamasuRuneItem")
	Stop
  Nope:
	BLRN A 1
	Fail
  DontHaveTrueRune:
	TNT1 A 0 A_Print("You need the True Legendary Rune to get the Zamasu Rune")
	Fail
  Remove:
	TNT1 A 0
	Stop
	}
}

ACTOR ZamasuRuneResistance : PowerProtection 
{
+INVENTORY.HUBPOWER
+INVENTORY.PERSISTENTPOWER
+NOTIMEFREEZE
Powerup.Duration 0x7FFFFFFF
+NORADIUSDMG
+DONTRIP
+DONTSQUASH
DamageFactor "normal", 0.9
}


Actor ZamasuRuneSpeed : PowerSpeed 
{
  +INVENTORY.HUBPOWER
  +INVENTORY.PERSISTENTPOWER
  +NOTIMEFREEZE
  Powerup.Duration 0x7FFFFFFF
  Speed 1.25
}

Actor ZamasuRuneDamage : PowerDamage
{
  +INVENTORY.HUBPOWER
  +INVENTORY.PERSISTENTPOWER
  +NOTIMEFREEZE
  DamageFactor "PlayerNemesisPlasma", 1.075
  Powerup.Duration 0x7FFFFFFF
}

ACTOR ZamasuRuneCheck : Inventory {Inventory.MaxAmount 1}

Actor ZamasuRuneItem : LegendaryRuneItem { }

Actor ZamasuGodRune : CustomInventory
{
//Creator: Nolram + Eshkere Jason
//Origin: Infinity Gods "Divine Infinity"
//Sprite: ZNRN
//Title: "Zamasu God Rune"
+FloatBob
+DONTGIB
+Inventory.InvBar
+Inventory.PickupFlash
+Inventory.FancyPickupSound
+INVENTORY.HUBPOWER
+INVENTORY.PERSISTENTPOWER
+Inventory.AUTOACTIVATE
Inventory.Amount 1
Inventory.MaxAmount 0
Inventory.Icon "ZGRNE0"
ActiveSound "VoidRune/Idle"
Inventory.PickupMessage "Zamasu God Rune: Permanent Power Sphere Buff + More Nemesis, Legendary and Enraged Legendary Weapons Damage"
States
{
  Spawn:
	TNT1 A 0 A_PlaySound("VoidRune/Idle",7,1.0,1)
	TNT1 A 0 A_SpawnItemEx("NemesisRuneLineSpawner")
	TNT1 A 0 A_CustomMissile("NemesisCyberFlameSpawner3", 0, 0, random(0,-360), 2, random(0,360))
	ZGRN ABC 4 Bright A_SpawnItemEx("NemesisArmorSoul",random(-30,30),random(-30,30),random(3,10),frandom(-0.2,0.2),frandom(-0.2,0.2),frandom(0.5,2),random(0,360),0,128)
	TNT1 A 0 A_CustomMissile("NemesisCyberFlameSpawner3", 0, 0, random(0,-360), 2, random(0,360))
	TNT1 A 0 A_SpawnItemEx("NemesisRuneLineSpawner")
	ZGRN DAB 4 Bright A_SpawnItemEx("NemesisArmorSoul",random(-30,30),random(-30,30),random(3,10),frandom(-0.2,0.2),frandom(-0.2,0.2),frandom(0.5,2),random(0,360),0,128)
	TNT1 A 0 A_CustomMissile("NemesisCyberFlameSpawner3", 0, 0, random(0,-360), 2, random(0,360))
	TNT1 A 0 A_SpawnItemEx("NemesisRuneLineSpawner")
	ZGRN CDA 4 Bright A_SpawnItemEx("NemesisArmorSoul",random(-30,30),random(-30,30),random(3,10),frandom(-0.2,0.2),frandom(-0.2,0.2),frandom(0.5,2),random(0,360),0,128)
	TNT1 A 0 A_CustomMissile("NemesisCyberFlameSpawner3", 0, 0, random(0,-360), 2, random(0,360))
	TNT1 A 0 A_SpawnItemEx("NemesisRuneLineSpawner")
	ZGRN ABC 4 Bright A_SpawnItemEx("NemesisArmorSoul",random(-30,30),random(-30,30),random(3,10),frandom(-0.2,0.2),frandom(-0.2,0.2),frandom(0.5,2),random(0,360),0,128)
	TNT1 A 0 A_CustomMissile("NemesisCyberFlameSpawner3", 0, 0, random(0,-360), 2, random(0,360))
	TNT1 A 0 A_SpawnItemEx("NemesisRuneLineSpawner")
	ZGRN DAB 4 Bright A_SpawnItemEx("NemesisArmorSoul",random(-30,30),random(-30,30),random(3,10),frandom(-0.2,0.2),frandom(-0.2,0.2),frandom(0.5,2),random(0,360),0,128)
	TNT1 A 0 A_CustomMissile("NemesisCyberFlameSpawner3", 0, 0, random(0,-360), 2, random(0,360))
	TNT1 A 0 A_SpawnItemEx("NemesisRuneLineSpawner")
	ZGRN CDA 4 Bright A_SpawnItemEx("NemesisArmorSoul",random(-30,30),random(-30,30),random(3,10),frandom(-0.2,0.2),frandom(-0.2,0.2),frandom(0.5,2),random(0,360),0,128)
	TNT1 A 0 A_CustomMissile("NemesisCyberFlameSpawner3", 0, 0, random(0,-360), 2, random(0,360))
	TNT1 A 0 A_SpawnItemEx("NemesisRuneLineSpawner")
	ZGRN ABC 4 Bright A_SpawnItemEx("NemesisArmorSoul",random(-30,30),random(-30,30),random(3,10),frandom(-0.2,0.2),frandom(-0.2,0.2),frandom(0.5,2),random(0,360),0,128)
	TNT1 A 0 A_CustomMissile("NemesisCyberFlameSpawner3", 0, 0, random(0,-360), 2, random(0,360))
	TNT1 A 0 A_SpawnItemEx("NemesisRuneLineSpawner")
	ZGRN DAB 4 Bright A_SpawnItemEx("NemesisArmorSoul",random(-30,30),random(-30,30),random(3,10),frandom(-0.2,0.2),frandom(-0.2,0.2),frandom(0.5,2),random(0,360),0,128)
	TNT1 A 0 A_CustomMissile("NemesisCyberFlameSpawner3", 0, 0, random(0,-360), 2, random(0,360))
	TNT1 A 0 A_SpawnItemEx("NemesisRuneLineSpawner")
	ZGRN CDA 4 Bright A_SpawnItemEx("NemesisArmorSoul",random(-30,30),random(-30,30),random(3,10),frandom(-0.2,0.2),frandom(-0.2,0.2),frandom(0.5,2),random(0,360),0,128)
	TNT1 A 0 A_CustomMissile("NemesisCyberFlameSpawner3", 0, 0, random(0,-360), 2, random(0,360))
	TNT1 A 0 A_SpawnItemEx("NemesisLightning2")
	Goto Spawn+3
  Pickup:
	TNT1 A 0
	TNT1 A 0 A_JumpIfInventory("ZamasuGodRuneItem",1,"Nope")
	TNT1 A 0 A_JumpIfInventory("ZamasuRuneItem",1,1)
	Goto DontHaveZamasuRune
	TNT1 A 0 A_PlaySound("NemesisOmega/Loop",6)
	TNT1 A 0 A_TakeInventory("ZamasuRuneItem",1)
	TNT1 A 0 A_TakeInventory("ZamasuRuneCheck",1)
	TNT1 A 0 A_GiveInventory("ZamasuGodRuneCheck")
	TNT1 A 0 A_GiveInventory("ZamasuResistance")
	TNT1 A 0 A_GiveInventory("ZamasuRuneSpeed")
	TNT1 A 0 A_GiveInventory("ZamasuGodRuneItem")
	TNT1 A 0 A_GiveInventory("ZamasuGodRuneDamage")
	TNT1 A 0 A_GiveInventory("PermanentSphereOfPower")
	Stop
  Nope:
	BLRN A 1
	Fail
  DontHaveZamasuRune:
	TNT1 A 0 A_Print("you need the zamasu rune to get the Zamasu God Rune")
	Fail
  Remove:
	TNT1 A 0
	Stop
	}
}

actor PermanentSphereOfPower : SphereOfPowerItem
{
+INVENTORY.HUBPOWER
+INVENTORY.PERSISTENTPOWER
+NOTIMEFREEZE
Powerup.Duration 0x7FFFFFFF
}

Actor ZamasuGodRuneDamage : PowerDamage
{
  +INVENTORY.HUBPOWER
  +INVENTORY.PERSISTENTPOWER
  +NOTIMEFREEZE
  DamageFactor "Legendary", 1.25
  DamageFactor "PlayerNemesisPlasma", 1.075
  Powerup.Duration 0x7FFFFFFF
}

ACTOR ZamasuGodRuneCheck : Inventory {Inventory.MaxAmount 1}

Actor ZamasuGodRuneItem : LegendaryRuneItem { }


Actor HellFireRune : CustomInventory
{
//Creator: Nolram + Eshkere Jason
//Origin: Infinity Gods "Divine Infinity"
//Sprite: HFRN
//Title: "HellFire Rune"
+FloatBob
+DONTGIB
+Inventory.InvBar
+Inventory.PickupFlash
+Inventory.FancyPickupSound
+INVENTORY.HUBPOWER
+INVENTORY.PERSISTENTPOWER
+Inventory.AUTOACTIVATE
Inventory.Amount 1
Inventory.MaxAmount 0
Inventory.Icon "HFRNE0"
ActiveSound "VoidRune/Idle"
Inventory.PickupMessage "HellFire Rune: Increases resistance to elemental damage + 50% Fire damage + Shoots Fireballs Around Every 15 Seconds"
States
{
  Spawn:
	TNT1 A 0 A_PlaySound("VoidRune/Idle",7,1.0,1)
	TNT1 A 0 A_SpawnItemEx("NemesisArmorFX")
	HFRN AAB 2 Bright A_SpawnItemEx("HellFireBaronFlameSpawner",random(-30,30),random(-30,30),random(3,10),frandom(-0.2,0.2),frandom(-0.2,0.2),frandom(0.5,2),random(0,360),0,128)
	TNT1 A 0 A_SpawnItemEx("NemesisArmorFX")
	HFRN CDC 2 Bright A_SpawnItemEx("HellFireBaronFlameSpawner",random(-30,30),random(-30,30),random(3,10),frandom(-0.2,0.2),frandom(-0.2,0.2),frandom(0.5,2),random(0,360),0,128)
	TNT1 A 0 A_SpawnItemEx("NemesisArmorFX")
	HFRN BBA 2 Bright A_SpawnItemEx("HellFireBaronFlameSpawner",random(-30,30),random(-30,30),random(3,10),frandom(-0.2,0.2),frandom(-0.2,0.2),frandom(0.5,2),random(0,360),0,128)
	Goto Spawn+3
  Pickup:
	TNT1 A 0
	TNT1 A 0 A_PlaySound("HFCyb/Laugh",6)
	TNT1 A 0 ACS_NamedExecuteAlways("HellfireBurnPower", 0)
	TNT1 A 0 A_GiveInventory("HellFireRuneCheck")
	TNT1 A 0 A_GiveInventory("HellFireRuneResistance")
	TNT1 A 0 A_GiveInventory("HellfireRuneDamage")
	TNT1 A 0 A_GiveInventory("HellFireRuneItem")
	Stop
  DontHaveTrueRune:
	TNT1 A 0 A_Print("You need the True Legendary Rune to get the HellFire Rune")
	Fail
  Nope:
	BLRN A 1
	Fail
  Remove:
	TNT1 A 0
	Stop
	}
}

ACTOR HellFireRuneResistance : PowerProtection 
{
+INVENTORY.HUBPOWER
+INVENTORY.PERSISTENTPOWER
+NOTIMEFREEZE
Powerup.Duration 0x7FFFFFFF
+NORADIUSDMG
+DONTRIP
+DONTSQUASH
DamageFactor "Fire", 0.5
DamageFactor "Ice", 0.65
DamageFactor "FreezerBurn", 0.65
Damagefactor "PoisonCloud", 0.65
Damagefactor "Electric", 0.65
Damagefactor "Acid", 0.65
Damagefactor "Poison", 0.65
DamageFactor "PyroShot", 0.85
}

Actor HellfireRuneDamage : PowerDamage
{
  +INVENTORY.HUBPOWER
  +INVENTORY.PERSISTENTPOWER
  +NOTIMEFREEZE
  DamageFactor "Fire", 1.5
  Powerup.Duration 0x7FFFFFFF
}

ACTOR HellFireRuneCheck : Inventory {Inventory.MaxAmount 1}

Actor HellFireRuneItem : LegendaryRuneItem { }

actor HellFireRuneBlast
{
    Radius 20
    Height 16
    +NOGRAVITY
    +NOCLIP
    +FORCEXYBILLBOARD
    +NOBLOCKMAP
    +NOTELEPORT
    +NOTARGET
	+NOBLOCKMONST
    DamageType "Normal"
	Species "Player"
    States
    {
    Spawn:
        HFEB A 3 
		TNT1 AAAA 0 A_SpawnItemEx("PlayerPoweredFlamethrowerShot",0,0,0,FRandom(10,-10),FRandom(10,-10),FRandom(4,10),0,SXF_TRANSFERPOINTERS)
        HFEB B 3 
		HFEB C 3 
		HFEB A 3 
		TNT1 AAAA 0 A_SpawnItemEx("PlayerPoweredFlamethrowerShot",0,0,0,FRandom(10,-10),FRandom(10,-10),FRandom(4,10),0,SXF_TRANSFERPOINTERS)
        HFEB B 3 
		HFEB C 3 
        Stop
    }
}

Actor PlayerHellfireRunePoweredFlamethrowerShot : BasePoweredFireSpawner //for some reason it dealt damage to the player
{
Damage (random(350,420))
Species "Player"
DamageType "Normal"
+THRUSPECIES
+MTHRUSPECIES
States
{
  Death:
	TNT1 AAA 0 A_StopSound(CHAN_BODY)
	TNT1 A 0 A_Stop
	TNT1 A 0 A_NoGravity
	TNT1 A 0 A_SpawnItemEx("BlueParticleSpawner",0,0,0,0,0,0,0,SXF_CLIENTSIDE,0)
	TNT1 AA 0 A_CustomMissile("Kaboom69",0,0,random(0,360),CMF_AIMDIRECTION,random(0,360))
	TNT1 AA 0 A_CustomMissile("SmokeFX7",0,0,random(0,360),CMF_AIMDIRECTION,random(0,360))
	TNT1 A 0 A_SpawnItemEx("PlayerHellfireRunePoweredFireFlare",0,0,0,0,0,0,0,SXF_NOCHECKPOSITION|SXF_TRANSFERPOINTERS|SXF_SETMASTER)
	TNT1 AAAA 0 A_SpawnItemEx("PlayerHellfireRunePoweredFireFlare",0,0,0,random(2,4),random(2,4),2,random(0,360),SXF_NOCHECKPOSITION|SXF_TRANSFERPOINTERS|SXF_SETMASTER,64)
	FR1M CDE 3 Bright
	Stop
	}
}

Actor PlayerHellfireRunePoweredFireFlare : BasePoweredFireFlare
{
Damage 10 // 3
Scale 1.2
DamageType "Normal"
Species "Player"
+FORCERADIUSDMG
States
{
  Death:
	TNT1 A 0
	TNT1 A 0 A_JumpIf(waterlevel > 1, "Nop")
	TNT1 A 0 A_ChangeFlag(MOVEWITHSECTOR,1)
	BFCF AABBCC 1 Bright A_spawnItemEx("HemBlueFlareFire",random(-3,3),random(-3,3),random(0,9),0,0,random(2,9),random(0,360)
	,SXF_NOCHECKPOSITION|SXF_CLIENTSIDE,64)
	TNT1 A 0 A_SetUserVar(user_firecount,user_firecount+1)
  DeathLoop:
	TNT1 A 0 A_FadeOut(0.015,0)
	TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("Hem_SelfDamageCVAR") != 0,3)
	TNT1 A 0 A_Explode(user_firedamage+random(275,350),50,0,0)
	TNT1 A 0 A_Jump(256,2)
	TNT1 A 0 A_Explode(user_firedamage+random(275,350),50,0,0)
	BFCF DDEEFF 1 Bright A_spawnItemEx("HemBlueFlareFire",random(-3,3),random(-3,3),random(0,9),0,0,random(2,9),random(0,360)
	,SXF_NOCHECKPOSITION|SXF_CLIENTSIDE,64+user_firecount)
	TNT1 A 0 A_SetUserVar(user_firecount,user_firecount+1)
	TNT1 A 0 A_FadeOut(0.015,0)
	TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("Hem_SelfDamageCVAR") != 0,3)
	TNT1 A 0 A_Explode(user_firedamage+random(200,450),50,0,0)
	TNT1 A 0 A_Jump(256,2)
	TNT1 A 0 A_Explode(user_firedamage+random(275,350),50,0,0)
	BFCF GGHHII 1 Bright A_spawnItemEx("HemBlueFlareFire",random(-3,3),random(-3,3),random(0,9),0,0,random(2,9),random(0,360)
	,SXF_NOCHECKPOSITION|SXF_CLIENTSIDE,64+user_firecount)
	TNT1 A 0 A_SetUserVar(user_firecount,user_firecount+1)
	TNT1 A 0 A_FadeOut(0.015,0)
	TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("Hem_SelfDamageCVAR") != 0,3)
	TNT1 A 0 A_Explode(user_firedamage+random(200,450),50,0,0)
	TNT1 A 0 A_Jump(256,2)
	TNT1 A 0 A_Explode(user_firedamage+random(275,350),50,0,0)
	BFCF KKLLMM 1 Bright A_spawnItemEx("HemBlueFlareFire",random(-3,3),random(-3,3),random(0,9),0,0,random(2,9),random(0,360)
	,SXF_NOCHECKPOSITION|SXF_CLIENTSIDE,64+user_firecount)
	TNT1 A 0 A_SetUserVar(user_firecount,user_firecount+1)
	TNT1 A 0 A_FadeOut(0.015,0)
	TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("Hem_SelfDamageCVAR") != 0,3)
	TNT1 A 0 A_Explode(user_firedamage+random(200,450),50,0,0)
	TNT1 A 0 A_Jump(256,2)
	TNT1 A 0 A_Explode(user_firedamage+random(275,350),50,0,0)
	BFCF AABBCC 1 Bright A_spawnItemEx("HemBlueFlareFire",random(-3,3),random(-3,3),random(0,9),0,0,random(2,9),random(0,360)
	,SXF_NOCHECKPOSITION|SXF_CLIENTSIDE,64+user_firecount)
	TNT1 A 0 A_SetUserVar(user_firecount,user_firecount+1)
	TNT1 A 0 A_JumpIf(user_deathtimer >= 8,"DeathEnd")	
	TNT1 A 0 A_SetUserVar(user_deathtimer,user_deathtimer+1)
    Loop
  DeathEnd:
	TNT1 A 0 A_FadeOut(0.015,0)
	TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("Hem_SelfDamageCVAR") != 0,3)
	TNT1 A 0 A_Explode(user_firedamage+random(200,450),50,0,0)
	TNT1 A 0 A_Jump(256,2)
	TNT1 A 0 A_Explode(user_firedamage+random(200,450),50,1,0)
	BFCF DDEEFF 1 Bright A_spawnItemEx("HemBlueFlareFire",random(-3,3),random(-3,3),random(0,9),0,0,random(2,9),random(0,360)
	,SXF_NOCHECKPOSITION|SXF_CLIENTSIDE,64+user_firecount)
	TNT1 A 0 A_SetUserVar(user_firecount,user_firecount+1)
	TNT1 A 0 A_FadeOut(0.015,0)
	TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("Hem_SelfDamageCVAR") != 0,3)
	TNT1 A 0 A_Explode(user_firedamage+random(200,450),50,0,0)
	TNT1 A 0 A_Jump(256,2)
	TNT1 A 0 A_Explode(user_firedamage+random(300,450),50,1,0)
	BFCF GGHHII 1 Bright A_spawnItemEx("HemBlueFlareFire",random(-3,3),random(-3,3),random(0,9),0,0,random(2,9),random(0,360)
	,SXF_NOCHECKPOSITION|SXF_CLIENTSIDE,64+user_firecount)
	TNT1 A 0 A_SetUserVar(user_firecount,user_firecount+1)
	TNT1 A 0 A_FadeOut(0.015,0)
	TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("Hem_SelfDamageCVAR") != 0,3)
	TNT1 A 0 A_Explode(user_firedamage+random(200,450),50,0,0)
	TNT1 A 0 A_Jump(256,2)
	TNT1 A 0 A_Explode(user_firedamage+random(200,450),50,1,0)
	BFCF KKLLMM 1 Bright A_spawnItemEx("HemBlueFlareFire",random(-3,3),random(-3,3),random(0,9),0,0,random(2,9),random(0,360)
	,SXF_NOCHECKPOSITION|SXF_CLIENTSIDE,64+user_firecount)
	TNT1 A 0 A_SetUserVar(user_firecount,user_firecount+1)
	TNT1 A 0 A_FadeOut(0.015,0)
	TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("Hem_SelfDamageCVAR") != 0,3)
	TNT1 A 0 A_Explode(user_firedamage+random(200,450),50,0,0)
	TNT1 A 0 A_Jump(256,2)
	TNT1 A 0 A_Explode(user_firedamage+random(200,450),50,1,0)
	BFCF MNOP 2 Bright
	Stop
  Nop:
	TNT1 A 1 Bright A_ChangeFlag("MISSILE",0)
	Stop
	}
}

Actor TrueDarkLegendaryRune : CustomInventory
{
//Creator: Nolram + Eshkere Jason
//Origin: Infinity Gods "Divine Infinity"
//Sprite: TDRN
//Title: "True Dark Legendary Rune"
+FloatBob
+DONTGIB
+Inventory.InvBar
+Inventory.PickupFlash
+Inventory.FancyPickupSound
+INVENTORY.HUBPOWER
+INVENTORY.PERSISTENTPOWER
+Inventory.AUTOACTIVATE
Inventory.Amount 1
Inventory.MaxAmount 0
Inventory.Icon "TDRNA0"
ActiveSound "VoidRune/Idle"
Inventory.PickupMessage "True Dark Legendary Rune: Periodically receives a true dark leg energy that regenerates your hp and increases your legendary damage."
States
{
  Spawn:
	TNT1 A 0 A_PlaySound("VoidRune/Idle",7,1.0,1)
	TNT1 A 0 A_SpawnItemEx("BlueSparkleSpawner")
	TDRN AA 2 Bright A_SpawnItemEx("TrueLegendaryRuneFlameSpawner",random(-30,30),random(-30,30),random(3,10),frandom(-0.2,0.2),frandom(-0.2,0.2),frandom(0.5,2),random(0,360),0,128)
	TNT1 A 0 A_SpawnItemEx("BlueSparkleSpawner")
	TDRN AA 2 Bright A_SpawnItemEx("TrueLegendaryRuneFlameSpawner",random(-30,30),random(-30,30),random(3,10),frandom(-0.2,0.2),frandom(-0.2,0.2),frandom(0.5,2),random(0,360),0,128)
	TNT1 AA 0 A_SpawnItemEx("BlueSparkleSpawner")
	TDRN AA 2 Bright A_SpawnItemEx("TrueLegendaryRuneFlameSpawner",random(-30,30),random(-30,30),random(3,10),frandom(-0.2,0.2),frandom(-0.2,0.2),frandom(0.5,2),random(0,360),0,128)
	Goto Spawn+3
  Pickup:
	TNT1 A 0
	TNT1 A 0 A_JumpIfInventory("TrueLegendaryRuneItem2",1,1)
	Goto DontHaveUpgradedTrueRune
	TNT1 A 0 A_PlaySound("TrueLegRune/Pickup",6)
	TNT1 A 0 A_GiveInventory("TrueDarkLegendaryRuneCheck")
	TNT1 A 0 A_GiveInventory("TrueDarkLegendaryRuneItem")
	TNT1 A 0 ACS_NamedExecuteAlways("TrueDarkLegendaryRuneHealPower", 0)
	Stop
  Nope:
	BLRN A 1
	Fail
  DontHaveTrueRune:
	TNT1 A 0 A_Print("You need the Upgraded True Legendary Rune to get the True Dark Legendary Rune")
	Fail
  Remove:
	TNT1 A 0
	Stop
	}
}

ACTOR TrueDarkLegendaryRuneCheck : Inventory {Inventory.MaxAmount 1}

Actor TrueDarkLegendaryRuneHealEffect : CustomInventory
{
Scale 0.2
Inventory.PickupSound "truelegsphere/pickup"
Inventory.PickupMessage "\c[z4]True Dark Energy Healing\c-"
-COUNTITEM
States
{
Spawn:
TLUS AABBCCDD 2 Bright A_CustomMissile ("TrueLegendarySphereFlameSpawner", -20, 0, random(0,-360), 2, random(0,360)) 
Loop
Pickup:
TNT1 A 0 A_GiveInventory("TrueDarkLegendaryRunePowerDamage")
TNT1 A 0 A_GiveInventory("TrueDarkLegendaryRuneHeal")
Stop
	}
}

ACTOR TrueDarkLegendaryRunePowerDamage : PowerDamage
{
  DamageFactor "Legendary", 1.2
  DamageFactor "LegendaryGuru", 1.075
  DamageFactor "LegendaryGuruPlayer", 1.075
  DamageFactor "TrueLegendaryPlayer", 1.125
  DamageFactor "TrueLegendaryDamage", 1.125
  Powerup.Color DarkBlue 0.2
  PowerUp.Duration -15
}


Actor TrueDarkLegendaryRuneHeal : PowerTargeter
{
    Powerup.Duration -15
    States
    {
    Targeter:
        TNT1 AA 0
		TNT1 A 3 HealThing(1,1350)
		TNT1 A 1 A_GiveInventory("VexedNemesisPowerShardArmorGiver")
		TNT1 A 2 A_CustomMissile("NBlackSparkleSpawner",0,0,random(0,-360),2,random(0,360))
		TNT1 A 2 A_SpawnItemEx("NBlackPowerLineSpawner",random(32,-32),random(32,-32),random(8,48),0,0,random(1,4),0,128,0)
        Loop
    }
}


Actor TrueDarkLegendaryRuneItem : LegendaryRuneItem { }

Actor TrueDarkEnragedLegendaryRune : CustomInventory
{
//Creator: Nolram + Eshkere Jason
//Origin: Infinity Gods "Divine Infinity"
//Sprite: TDRN
//Title: "True Dark Legendary Rune"
+FloatBob
+DONTGIB
+Inventory.InvBar
+Inventory.PickupFlash
+Inventory.FancyPickupSound
+INVENTORY.HUBPOWER
+INVENTORY.PERSISTENTPOWER
+Inventory.AUTOACTIVATE
Inventory.Amount 1
Inventory.MaxAmount 0
Inventory.Icon "EDRNA0"
ActiveSound "VoidRune/Idle"
Inventory.PickupMessage "True Dark Enraged Legendary Rune: Periodically enter a state of Dark Rage, increasing your damage and resistance"
States
{
  Spawn:
	TNT1 A 0 A_PlaySound("VoidRune/Idle",7,1.0,1)
	TNT1 A 0 A_SpawnItemEx("EnragedSparkleSpawner")
	EDRN AA 2 Bright A_SpawnItemEx("EnragedLegendaryRuneFlameSpawner",random(-30,30),random(-30,30),random(3,10),frandom(-0.2,0.2),frandom(-0.2,0.2),frandom(0.5,2),random(0,360),0,128)
	TNT1 A 0 A_SpawnItemEx("EnragedSparkleSpawner")
	EDRN AA 2 Bright A_SpawnItemEx("EnragedLegendaryRuneFlameSpawner",random(-30,30),random(-30,30),random(3,10),frandom(-0.2,0.2),frandom(-0.2,0.2),frandom(0.5,2),random(0,360),0,128)
	TNT1 AA 0 A_SpawnItemEx("EnragedSparkleSpawner")
	EDRN AA 2 Bright A_SpawnItemEx("EnragedLegendaryRuneFlameSpawner",random(-30,30),random(-30,30),random(3,10),frandom(-0.2,0.2),frandom(-0.2,0.2),frandom(0.5,2),random(0,360),0,128)
	Goto Spawn+3
  Pickup:
	TNT1 A 0
	TNT1 A 0 A_JumpIfInventory("EnragedLegRuneToken",1,1)
	Goto DontHaveEnragedRune
	TNT1 A 0 A_PlaySound("TrueLegRune/Pickup",6)
	TNT1 A 0 A_GiveInventory("TrueDarkEnragedLegendaryRuneCheck")
	TNT1 A 0 A_GiveInventory("TrueDarkEnragedLegendaryRuneItem")
	TNT1 A 0 ACS_NamedExecuteAlways("TrueDarkEnragedLegendaryRuneRagePower", 0)
	Stop
  Nope:
	EDRN A 1
	Fail
  DontHaveEnragedRune:
	TNT1 A 0 A_Print("You need the Enraged Legendary Rune to get the True Dark Enraged Legendary Rune")
	Fail
  Remove:
	TNT1 A 0
	Stop
	}
}

ACTOR TrueDarkEnragedLegendaryRuneCheck : Inventory {Inventory.MaxAmount 1}

Actor TrueDarkEnragedLegendaryRuneRageEffect : CustomInventory
{
Scale 0.2
Inventory.PickupSound "powerup/quad"
Inventory.PickupMessage "\c[z4]Enraged Rush\c-"
-COUNTITEM
States
{
Spawn:
DMS0 AABBCCDD 2 Bright A_CustomMissile ("HellFireBaronFlameSpawner", -20, 0, random(0,-360), 2, random(0,360)) 
Loop
Pickup:
TNT1 A 0 A_GiveInventory("TrueDarkEnragedLegendaryRunePowerDamage")
TNT1 A 0 A_GiveInventory("TrueDarkEnragedLegendaryRunePowerResistance")
Stop
	}
}

ACTOR TrueDarkEnragedLegendaryRunePowerDamage : PowerDamage
{
  DamageFactor "Normal", 1.3
  DamageFactor "Legendary", 1.25
  DamageFactor "LegendaryGuru", 1.05
  DamageFactor "LegendaryGuruPlayer", 1.05
  DamageFactor "PlayerNemesisPlasma", 1.2
  DamageFactor "PlayerDevBall", 1.15
  DamageFactor "PlayerDevBall2", 1.15
  DamageFactor "PDTBFG", 1.15
  DamageFactor "PlayerDevTracer", 1.15
  DamageFactor "PlayerPyro", 1.05
  DamageFactor "PlayerBHole", 1.05
  Powerup.Color DarkRed 0.3
  PowerUp.Duration -15
}

ACTOR TrueDarkEnragedLegendaryRunePowerResistance : PowerProtection
{
DamageFactor "Normal", 0.85
PowerUp.Duration -15
}

Actor TrueDarkEnragedLegendaryRuneItem : LegendaryRuneItem { }

Actor MLGRune : CustomInventory
{
//Creator: Nemesiscaptain(uwu)and Makarov
//Origin: Infinity Gods
//Sprite: THRN
//Title: "MLGRune"
  +FLOATBOB
  +COUNTITEM
  //+INVENTORY.AUTOACTIVATE
  +NOTIMEFREEZE
  ActiveSound "Pickups/Legruneidle"
  Inventory.PickupMessage "GG! The MLG Rune is now yours. Clutch time begins"
  Inventory.Amount 1
  Inventory.MaxAmount 1
  States
  {
  Spawn:
    TNT1 A 0 A_SpawnItemEx ("GreenSparkleSpawner")
    TNT1 A 0 A_LoopActiveSound
	MLRN AAAAAA 10 Bright A_CustomMissile ("MLGRuneFlameSpawner", -20, 0, random(0,-360), 2, random(0,360)) 
    Loop
  Pickup:
    TNT1 A 0
	TNT1 A 0 A_PlaySound("Pickups/MLGRune")
	TNT1 A 0 A_GiveInventory("EvadeCheck",1)
	TNT1 A 0 A_GiveInventory("MLGRuneHaste",1)
    TNT1 A 0 A_GiveInventory("MLGRuneResistance",1)
	TNT1 A 0 A_GiveInventory("MLGRuneItem",1)
	TNT1 A 1 A_StopSound
	Stop
  Nope:
	MLRN A 1
	Stop	
  }
}

ACTOR MLGRuneFlameSpawner : LegendarySphereFlameSpawner
{
  States
  {
  Spawn:
    TNT1 A 0
    TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(304) == 1, "Toaster")
    TNT1 AAAAAA 0 A_SpawnItemEx("GHellionSmoke",random(20,-20),random(20,-20),random(20,40),0,0,random(2,6),0,128,0)
    TNT1 A 0
    Stop
  Toaster:
    TNT1 A 0
	Stop
  }
}

Actor MLGRuneHaste : PowerSpeed
{
	+INVENTORY.HUBPOWER
	+INVENTORY.PERSISTENTPOWER
    +NOTIMEFREEZE
	Powerup.Duration 0x7FFFFFFF
	Speed 1.25
}

ACTOR MLGRuneResistance : PowerProtection 
{
+INVENTORY.HUBPOWER
+INVENTORY.PERSISTENTPOWER
+NOTIMEFREEZE
Powerup.Duration 0x7FFFFFFF
+NORADIUSDMG
+DONTRIP
+DONTSQUASH
DamageFactor "Ice", 0.0
}

ACTOR MLGRuneItem : LegendaryRuneItem { }

actor MLGDashEffect : Inventory
{
+INVENTORY.HUBPOWER
+INVENTORY.PERSISTENTPOWER
+INVENTORY.UNTOSSABLE
+INVENTORY.ALWAYSPICKUP
  States
  {
  Spawn:
	TNT1 A 1 ACS_NamedExecuteAlways("MLGDashPower", 0) //MLG Dashes
   	Stop
  }
}


Actor VexedNemesisRune : CustomInventory
{
//Creator: Nolram 
//Origin: Infinity Gods
//Sprite: VXRN
//Title: "Vexed Nemesis Rune"
+FloatBob
+DONTGIB
+Inventory.InvBar
+Inventory.PickupFlash
+Inventory.FancyPickupSound
+INVENTORY.HUBPOWER
+INVENTORY.PERSISTENTPOWER
+Inventory.AUTOACTIVATE
Inventory.Amount 1
Inventory.MaxAmount 0
Inventory.Icon "ZNRND0"
ActiveSound "VoidRune/Idle"
Inventory.PickupMessage "Vexed Nemesis Rune: Your nemesis weapons are empowered with vexed power."
States
{
  Spawn:
	TNT1 A 0 A_PlaySound("VoidRune/Idle",7,1.0,1)
	TNT1 A 0 A_SpawnItemEx("NemesisRuneLineSpawner")
	VXRN AAB 4 Bright A_SpawnItemEx("NemesisArmorSoul",random(-30,30),random(-30,30),random(3,10),frandom(-0.2,0.2),frandom(-0.2,0.2),frandom(0.5,2),random(0,360),0,128)
	TNT1 A 0 A_SpawnItemEx("NemesisRuneLineSpawner")
	VXRN CDE 4 Bright A_SpawnItemEx("NemesisArmorSoul",random(-30,30),random(-30,30),random(3,10),frandom(-0.2,0.2),frandom(-0.2,0.2),frandom(0.5,2),random(0,360),0,128)
	TNT1 A 0 A_SpawnItemEx("NemesisRuneLineSpawner")
	VXRN FGG 4 Bright A_SpawnItemEx("NemesisArmorSoul",random(-30,30),random(-30,30),random(3,10),frandom(-0.2,0.2),frandom(-0.2,0.2),frandom(0.5,2),random(0,360),0,128)
	Goto Spawn+3
  Pickup:
	TNT1 A 0
	TNT1 A 0 A_JumpIfInventory("VexedNemesisRuneItem",1,"Nope")
	TNT1 A 0 A_JumpIfInventory("NemesisRuneToken",1,1)
	Goto DontHaveNemesisRune
	TNT1 A 0 A_PlaySound("nemesisrune/consoom",6)
	TNT1 A 0 A_GiveInventory("VexedNemesisRuneCheck")
	TNT1 A 0 A_GiveInventory("VexedNemesisRuneItem")
	Stop
  Nope:
	BLRN A 1
	Fail
  DontHaveNemesisRune:
	TNT1 A 0 A_Print("You need the Nemesis Rune to get the Vexed Nemesis Rune")
	Fail
  Remove:
	TNT1 A 0
	Stop
	}
}

ACTOR VexedNemesisRuneCheck : Inventory {Inventory.MaxAmount 1}

Actor VexedNemesisRuneItem : LegendaryRuneItem { }
