/*class Megasphere_Giver : RandomSpawner replaces Megasphere
{
	Default
	{
		DropItem "Megasphere2", 256, 20;
		
		DropItem "SurgeBringer", 256, 1;
		DropItem "BoosterBringer", 256, 1;
		DropItem "StimulantBringer", 256, 1;
		DropItem "LifterBringer", 256, 1;
	}
}*/

class Megasphere2 : Megasphere
{
	Default
	{
		//$Title Megasphere
		Tag "\c[Tan]Megasphere\c-";
		Inventory.PickupMessage "\c[Tan]Megasphere!";
		Inventory.PickupSound "Megasphere/Pickup";
		Renderstyle 'Add';
		+FLOATBOB
		+INVENTORY.ALWAYSPICKUP
	}
	
	int User_Fade;
	
	States
	{
	Spawn:
		MEGA AAAABBBBCCCCDDDDEEEEFFFFEEEEDDDDCCCCBBBB 1 Bright { 
			If(!(A_CheckSight("Null") || GetCVar("GC_PickupParticleChoker")))
			{
				if(Invoker.User_Fade % 4 == 0)
				{
					A_SpawnItemEx("MegaFade",0,0,0,0,0,0,0,SXF_CLIENTSIDE,0);
					Invoker.User_Fade = 0;
				}
				Invoker.User_Fade = Invoker.User_Fade + 1;
				A_SpawnItemEx("MegasphereParticle",
					frandom(10.0,-10.0),frandom(10.0,-10.0),
					35+frandom(10.0,-10.0),frandom(0.6,-0.6),
					frandom(0.6,-0.6),frandom(1.2,0.4),
					frandom(0.0,360.0),SXF_CLIENTSIDE,64);
			}
		}
		Loop;
	Pickup:
		TNT1 A 0 {
			A_GiveInventory("MegasphereArmor2", 1);
			A_GiveInventory("MegasphereHealth2", 1);
		}
		Stop;
	}
}

class MegasphereHealth2 : GC_ExtendingHealthBonus
{
	Default
	{
		Inventory.Amount 200;
		Inventory.MaxAmount 300;
	}
}


class MegasphereArmor2 : TankArmor
{
	Default
	{
		armor.saveamount 200;
	}
}

class MegaFade : Actor
{
	Default
	{
		Renderstyle 'Add';
		+NOINTERACTION
		+NOTONAUTOMAP
	}
	
	States
	{
	Spawn:
		MEGA C 1 NoDelay {
			A_SetScale(Scale.X + 0.02);
			A_FadeOut(0.12);
		}
		Loop;
	}
}
