Class GHAGRageEssence : CustomInventory
{
	default
	{
		Inventory.amount 10;
		Inventory.MaxAmount 1;
		Inventory.PickupMessage "";
		+DontGib;
	}
	
	States {
		Spawn :
			WILL A 4 NoDelay A_SetTics(random(1, 16));
		Spawn.Loop :
			WILL BCDA 4 Bright;
			loop;
	}
	
	override bool TryPickup(in out Actor toucher)
	{
		let gardie = GHAGGardevoir(Players[consoleplayer].mo);
		int rage = gardie.GetRageValue();
		if (rage <= gardie.rageconstant) {
			gardie.addAnger(self.amount);
			GoAwayAndDie();
			return true;
		}
		
		return false;
	}
}