Actor NewMana1Hexen : CustomInventory replaces Mana1
{
	Radius 8
	Height 8
	+FLOATBOB
	Inventory.PickupSound "pickup/mana"
	Inventory.PickupMessage "Blue Mana" // "BLUE MANA"
	Tag "Blue Mana"
	States
	{
	Spawn:
		MAN1 A 0
		MAN1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("WOC ISDROPPED") == 1, "Vanishing")
	Looper:
		MAN1 ABCDEFGHI 4 Bright Light("Mana1")
		Loop
	Pickup:
		MAN1 A 0 A_JumpIf(ACS_executewithresult(WOC_DECORATE,STATS,MAXMANA,ACTIVATOR)*0.075 < 15, "Pickup2")
		MAN1 A 0 A_GiveInventory("Mana1", ACS_executewithresult(WOC_DECORATE,STATS,MAXMANA,ACTIVATOR)*0.075)
		Stop
	Pickup2:
		MAN1 A 0 A_GiveInventory("Mana1", 15)
		Stop
	Vanishing:
		TNT1 A 0 A_SpawnItemEx ("NewMana1Drop", 0,0,0, momx,momy,momz, 0, SXF_ABSOLUTEMOMENTUM)
        stop
	}
}

Actor NewMana2Hexen : CustomInventory replaces Mana2
{
	Radius 8
	Height 8
	+FLOATBOB
	Inventory.PickupSound "pickup/mana"
	Inventory.PickupMessage "Green Mana" // "BLUE MANA"
	Tag "Green Mana"
	States
	{
	Spawn:
		MAN2 A 0
		MAN2 A 0 A_JumpIf(ACS_NamedExecuteWithResult("WOC ISDROPPED") == 1, "Vanishing")
	Looper:
		MAN2 ABCDEFGHIJKLMNOP 4 Bright Light("Mana2")
		Loop
	Pickup:
		MAN1 A 0 A_JumpIf(ACS_executewithresult(WOC_DECORATE,STATS,MAXMANA,ACTIVATOR)*0.075 < 15, "Pickup2")
		MAN2 A 0 A_GiveInventory("Mana2", ACS_executewithresult(WOC_DECORATE,STATS,MAXMANA,ACTIVATOR)*0.075)
		Stop
	Pickup2:
		MAN2 A 0 A_GiveInventory("Mana2", 15)
		Stop
	Vanishing:
		TNT1 A 0 A_SpawnItemEx ("NewMana2Drop", 0,0,0, momx,momy,momz, 0, SXF_ABSOLUTEMOMENTUM)
        stop
	}
}

Actor NewMana3Hexen : CustomInventory replaces Mana3
{
	Radius 8
	Height 8
	+FLOATBOB
	Inventory.PickupSound "pickup/mana"
	Inventory.PickupMessage "Combined Mana" // "COMBINED MANA"
	Tag "Combined Mana"
	States
	{
	Spawn:
		MAN3 A 0
		MAN3 A 0 A_JumpIf(ACS_NamedExecuteWithResult("WOC ISDROPPED") == 1, "Vanishing")
	Looper:
		MAN3 ABCDEFGHIJKLMNOP 4 Bright Light("Mana3")
		Loop
	Pickup:
		TNT1 A 0 A_JumpIf(ACS_executewithresult(WOC_DECORATE,STATS,MAXMANA,ACTIVATOR)*0.1 < 20, "Pickup2")
		TNT1 A 0 A_GiveInventory("Mana1", ACS_executewithresult(WOC_DECORATE,STATS,MAXMANA,ACTIVATOR)*0.1)
		TNT1 A 0 A_GiveInventory("Mana2", ACS_executewithresult(WOC_DECORATE,STATS,MAXMANA,ACTIVATOR)*0.1)
		Stop
	Pickup2:
		TNT1 A 0 A_GiveInventory("Mana1", 20)
		TNT1 A 0 A_GiveInventory("Mana2", 20)
		Stop
	Vanishing:
		TNT1 A 0 A_SpawnItemEx ("NewMana3Drop", 0,0,0, momx,momy,momz, 0, SXF_ABSOLUTEMOMENTUM)
        stop
	}
}

Actor NewMana1 : NewMana1Hexen
{
	Radius 20
	Height 16
}

Actor NewMana2 : NewMana2Hexen
{
	Radius 20
	Height 16
}

Actor NewMana3 : NewMana3Hexen
{
	Radius 20
	Height 16
}

Actor NewMana1Drop : NewMana1Hexen
{
	States
	{
	Spawn:
		MAN1 ABCDEFGHI 4 Bright Light("Mana1")
		Loop
	Pickup:
		MAN1 A 0 A_JumpIf(ACS_executewithresult(WOC_DECORATE,STATS,MAXMANA,ACTIVATOR)*0.0375 < 7, "Pickup2")
		MAN1 A 0 A_GiveInventory("Mana1", ACS_executewithresult(WOC_DECORATE,STATS,MAXMANA,ACTIVATOR)*0.0375)
		Stop
	Pickup2:
		MAN1 A 0 A_GiveInventory("Mana1", 7)
		Stop
	Vanishing:
        stop
	}
}

Actor NewMana2Drop : NewMana2Hexen
{
	States
	{
	Spawn:
		MAN2 ABCDEFGHIJKLMNOP 4 Bright Light("Mana2")
		Loop
	Pickup:
		MAN2 A 0 A_JumpIf(ACS_executewithresult(WOC_DECORATE,STATS,MAXMANA,ACTIVATOR)*0.0375 < 7, "Pickup2")
		MAN2 A 0 A_GiveInventory("Mana2", ACS_executewithresult(WOC_DECORATE,STATS,MAXMANA,ACTIVATOR)*0.0375)
		Stop
	Pickup2:
		MAN2 A 0 A_GiveInventory("Mana2", 7)
		Stop
	Vanishing:
        stop
	}
}
Actor NewMana3Drop : NewMana3Hexen
{
	States
	{
	Spawn:
		MAN3 ABCDEFGHIJKLMNOP 4 Bright Light("Mana3")
		Loop
	Pickup:
		TNT1 A 0 A_JumpIf(ACS_executewithresult(WOC_DECORATE,STATS,MAXMANA,ACTIVATOR)*0.05 < 10, "Pickup2")
		TNT1 A 0 A_GiveInventory("Mana1", ACS_executewithresult(WOC_DECORATE,STATS,MAXMANA,ACTIVATOR)*0.05)
		TNT1 A 0 A_GiveInventory("Mana2", ACS_executewithresult(WOC_DECORATE,STATS,MAXMANA,ACTIVATOR)*0.05)
		Stop
	Pickup2:
		TNT1 A 0 A_GiveInventory("Mana1", 10)
		TNT1 A 0 A_GiveInventory("Mana2", 10)
		Stop
	Vanishing:
        stop
	}
}

Actor Mana1Weapon : CustomInventory
{
	Radius 8
	Height 8
	+FLOATBOB
	Inventory.PickupSound "pickup/mana"
	Inventory.PickupMessage "$TXT_MANA_1" // "BLUE MANA"
	States
	{
	Spawn:
		MAN1 ABCDEFGHI 4 Bright
		Loop
	Pickup:
		TNT1 A 0 A_JumpIf(ACS_executewithresult(WOC_DECORATE,STATS,MAXMANA,ACTIVATOR)*0.125 < 25, "Pickup2")
		MAN1 A 0 A_GiveInventory("Mana1", ACS_executewithresult(WOC_DECORATE,STATS,MAXMANA,ACTIVATOR)*0.125)
		Stop
	Pickup2:
		MAN1 A 0 A_GiveInventory("Mana1", 25)
		Stop
	}
}

Actor Mana2Weapon : CustomInventory
{
	Radius 8
	Height 8
	+FLOATBOB
	Inventory.PickupSound "pickup/mana"
	Inventory.PickupMessage "$TXT_MANA_2" // "BLUE MANA"
	States
	{
	Spawn:
		MAN2 ABCDEFGHIJKLMNOP 4 Bright
		Loop
	Pickup:
		TNT1 A 0 A_JumpIf(ACS_executewithresult(WOC_DECORATE,STATS,MAXMANA,ACTIVATOR)*0.125 < 25, "Pickup2")
		MAN2 A 0 A_GiveInventory("Mana2", ACS_executewithresult(WOC_DECORATE,STATS,MAXMANA,ACTIVATOR)*0.125)
		Stop
	Pickup2:
		MAN2 A 0 A_GiveInventory("Mana2", 25)
		Stop
	}
}

Actor Mana1WeaponDrop : CustomInventory
{
	Radius 8
	Height 8
	+FLOATBOB
	Inventory.PickupSound "pickup/mana"
	Inventory.PickupMessage "$TXT_MANA_1" // "BLUE MANA"
	States
	{
	Spawn:
		MAN1 ABCDEFGHI 4 Bright
		Loop
	Pickup:
		TNT1 A 0 A_JumpIf(ACS_executewithresult(WOC_DECORATE,STATS,MAXMANA,ACTIVATOR)*0.0625 < 12, "Pickup2")
		MAN1 A 0 A_GiveInventory("Mana1", ACS_executewithresult(WOC_DECORATE,STATS,MAXMANA,ACTIVATOR)*0.0625)
		Stop
	Pickup2:
		MAN1 A 0 A_GiveInventory("Mana1", 12)
		Stop
	}
}

Actor Mana2WeaponDrop : CustomInventory
{
	Radius 8
	Height 8
	+FLOATBOB
	Inventory.PickupSound "pickup/mana"
	Inventory.PickupMessage "$TXT_MANA_2" // "BLUE MANA"
	States
	{
	Spawn:
		MAN2 ABCDEFGHIJKLMNOP 4 Bright
		Loop
	Pickup:
		TNT1 A 0 A_JumpIf(ACS_executewithresult(WOC_DECORATE,STATS,MAXMANA,ACTIVATOR)*0.0625 < 12, "Pickup2")
		MAN2 A 0 A_GiveInventory("Mana2", ACS_executewithresult(WOC_DECORATE,STATS,MAXMANA,ACTIVATOR)*0.0625)
		Stop
	Pickup2:
		MAN2 A 0 A_GiveInventory("Mana2", 12)
		Stop
	}
}