Actor BluePotionBase : CustomInventory
{
	+INVENTORY.BIGPOWERUP
	+FLOATBOB
	Inventory.PickupSound "pickup/health"
}

actor BluePotionHexagon : BluePotionBase
{
	Inventory.PickupMessage "Major Crystal Potion" // "Quartz FLASK"
	Tag "Major Crystal Potion"
	States
	{
	Spawn:
		AHPT ABC 4
		Loop
	Pickup:
		TNT1 A 0 A_JumpIfHealthLower(ACS_ExecuteWithResult(553,0,0,0),"Pickedup")
		Fail
	Pickedup:
		TNT1 A 0 A_JumpIfInventory("PhilosopherStoneTracker",1,"PickedUp2")
		TNT1 A 0 A_JumpIf((ACS_ExecuteWithResult(WOC_DECORATE,STATS,MAXHEALTH)*0.165) < 16, 2)
		TNT1 A 0 ACS_ExecuteAlways(WOC_HEALSCRIPT,0,ACS_ExecuteWithResult(WOC_DECORATE,STATS,MAXHEALTH)*0.165,0,0)
		stop
		TNT1 A 0 ACS_ExecuteAlways(WOC_HEALSCRIPT,0,16,0,0)
		stop
	Pickedup2:
		TNT1 A 0 A_JumpIf((ACS_ExecuteWithResult(WOC_DECORATE,STATS,MAXHEALTH)*0.2475) < 24, 2)
		TNT1 A 0 ACS_ExecuteAlways(WOC_HEALSCRIPT,0,ACS_ExecuteWithResult(WOC_DECORATE,STATS,MAXHEALTH)*0.2475,0,0)
		stop
		TNT1 A 0 ACS_ExecuteAlways(WOC_HEALSCRIPT,0,24,0,0)
		stop
	}
}

actor BluePotionPentagon : BluePotionBase
{
	Inventory.PickupMessage "Crystal Potion" // "Quartz FLASK"
	Tag "Crystal Potion"
	States
	{
	Spawn:
		APPT ABC 4
		Loop
	Pickup:
		TNT1 A 0 A_JumpIfHealthLower(ACS_ExecuteWithResult(553,0,0,0),"Pickedup")
		Fail
	Pickedup:
		TNT1 A 0 A_JumpIfInventory("PhilosopherStoneTracker",1,"PickedUp2")
		TNT1 A 0 A_JumpIf((ACS_ExecuteWithResult(WOC_DECORATE,STATS,MAXHEALTH)*0.125) < 12, 2)
		TNT1 A 0 ACS_ExecuteAlways(WOC_HEALSCRIPT,0,ACS_ExecuteWithResult(WOC_DECORATE,STATS,MAXHEALTH)*0.125,0,0)
		stop
		TNT1 A 0 ACS_ExecuteAlways(WOC_HEALSCRIPT,0,12,0,0)
		stop
	Pickedup2:
		TNT1 A 0 A_JumpIf((ACS_ExecuteWithResult(WOC_DECORATE,STATS,MAXHEALTH)*0.1875) < 18, 2)
		TNT1 A 0 ACS_ExecuteAlways(WOC_HEALSCRIPT,0,ACS_ExecuteWithResult(WOC_DECORATE,STATS,MAXHEALTH)*0.1875,0,0)
		stop
		TNT1 A 0 ACS_ExecuteAlways(WOC_HEALSCRIPT,0,18,0,0)
		stop
	}
}

actor BluePotionRound : BluePotionBase
{
	Inventory.PickupMessage "Supreme Crystal Potion" // "Quartz FLASK"
	Tag "Supreme Crystal Potion"
	States
	{
	Spawn:
		ARPT ABC 4
		Loop
	Pickup:
		TNT1 A 0 A_JumpIfHealthLower(ACS_ExecuteWithResult(553,0,0,0),"Pickedup")
		Fail
	Pickedup:
		TNT1 A 0 A_JumpIfInventory("PhilosopherStoneTracker",1,"PickedUp2")
		TNT1 A 0 A_JumpIf((ACS_ExecuteWithResult(WOC_DECORATE,STATS,MAXHEALTH)*0.25) < 25, 2)
		TNT1 A 0 ACS_ExecuteAlways(WOC_HEALSCRIPT,0,ACS_ExecuteWithResult(WOC_DECORATE,STATS,MAXHEALTH)*0.25,0,0)
		stop
		TNT1 A 0 ACS_ExecuteAlways(WOC_HEALSCRIPT,0,25,0,0)
		stop
	Pickedup2:
		TNT1 A 0 A_JumpIf((ACS_ExecuteWithResult(WOC_DECORATE,STATS,MAXHEALTH)*0.375) < 37, 2)
		TNT1 A 0 ACS_ExecuteAlways(WOC_HEALSCRIPT,0,ACS_ExecuteWithResult(WOC_DECORATE,STATS,MAXHEALTH)*0.375,0,0)
		stop
		TNT1 A 0 ACS_ExecuteAlways(WOC_HEALSCRIPT,0,37,0,0)
		stop
	}
}

actor BluePotionVial : BluePotionBase
{
	Inventory.PickupMessage "Minor Crystal Potion"
	Tag "Minor Crystal Potion"
	States
	{
	Spawn:
		AVPT ABC 4
		Loop
	Pickup:
		TNT1 A 0 A_JumpIfHealthLower(ACS_ExecuteWithResult(553,0,0,0),"Pickedup")
		Fail
	Pickedup:
		TNT1 A 0 A_JumpIfInventory("PhilosopherStoneTracker",1,"PickedUp2")
		TNT1 A 0 A_JumpIf((ACS_ExecuteWithResult(WOC_DECORATE,STATS,MAXHEALTH)*0.05) < 5, 2)
		TNT1 A 0 ACS_ExecuteAlways(WOC_HEALSCRIPT,0,ACS_ExecuteWithResult(WOC_DECORATE,STATS,MAXHEALTH)*0.05,0,0)
		stop
		TNT1 A 0 ACS_ExecuteAlways(WOC_HEALSCRIPT,0,5,0,0)
		stop
	Pickedup2:
		TNT1 A 0 A_JumpIf((ACS_ExecuteWithResult(WOC_DECORATE,STATS,MAXHEALTH)*0.075) < 7, 2)
		TNT1 A 0 ACS_ExecuteAlways(WOC_HEALSCRIPT,0,ACS_ExecuteWithResult(WOC_DECORATE,STATS,MAXHEALTH)*0.075,0,0)
		stop
		TNT1 A 0 ACS_ExecuteAlways(WOC_HEALSCRIPT,0,7,0,0)
		stop
	}
}

/////////////////////////////////////////////////////////////Purple Carriable Potions

Actor PurplePotionBase : CustomInventory
{
	+INVENTORY.INVBAR
	+FLOATBOB
	+INVENTORY.PICKUPFLASH
	+INVENTORY.FANCYPICKUPSOUND
	+INVENTORY.BIGPOWERUP
	Inventory.PickupSound "pickup/qpotion"
	Inventory.UseSound ""
	Inventory.MaxAmount 0x7FFFFFFF
	Inventory.InterHubAmount 0x7FFFFFFF
}

actor PurplePotionHexagon : PurplePotionBase
{
	Inventory.Icon "PHPTZ0"
	Inventory.PickupMessage "Major Quartz Potion"
	Tag "Major Quartz Potion"
	States
	{
	Spawn:
		PHPT ABC 4
		Loop
	Pickup:
		TNT1 A 0 A_JumpIfInventory("PurplePotionHexagon", ACS_ExecuteWithResult(WOC_DECORATE,STATS,ITEMCAP,ACTIVATOR),"Failed")
		TNT1 A 0 ACS_ExecuteWithResult(WOC_DECORATE,STATS,ITEMCAP,ACTIVATOR)
		Stop
	Failed:
		TNT1 A 0
		Fail
	Use:
		TNT1 A 0 A_JumpIfHealthLower(ACS_ExecuteWithResult(553,0,0,0),"Pickedup")
		Fail
	Pickedup:
		TNT1 A 0 A_PlaySound("pickup/health")
		TNT1 A 0 A_JumpIfInventory("PhilosopherStoneTracker",1,"PickedUp2")
		TNT1 A 0 A_JumpIf((ACS_ExecuteWithResult(WOC_DECORATE,STATS,MAXHEALTH)*0.33) < 33, 2)
		TNT1 A 0 ACS_ExecuteAlways(WOC_HEALSCRIPT,0,ACS_ExecuteWithResult(WOC_DECORATE,STATS,MAXHEALTH)*0.33,0,0)
		stop
		TNT1 A 0 ACS_ExecuteAlways(WOC_HEALSCRIPT,0,33,0,0)
		stop
	Pickedup2:
		TNT1 A 0 A_JumpIf((ACS_ExecuteWithResult(WOC_DECORATE,STATS,MAXHEALTH)*0.495) < 49, 2)
		TNT1 A 0 ACS_ExecuteAlways(WOC_HEALSCRIPT,0,ACS_ExecuteWithResult(WOC_DECORATE,STATS,MAXHEALTH)*0.495,0,0)
		stop
		TNT1 A 0 ACS_ExecuteAlways(WOC_HEALSCRIPT,0,49,0,0)
		stop
	}
}

actor PurplePotionPentagon : PurplePotionBase
{
	Game Strife
	ConversationID 126
	Inventory.Icon "PPPTZ0"
	Inventory.PickupMessage "Quartz Potion"
	Tag "Quartz Potion"
	States
	{
	Spawn:
		PPPT ABC 4
		Loop
	Pickup:
		TNT1 A 0 A_JumpIfInventory("PurplePotionPentagon", ACS_ExecuteWithResult(WOC_DECORATE,STATS,ITEMCAP,ACTIVATOR),"Failed")
		TNT1 A 0 ACS_ExecuteWithResult(WOC_DECORATE,STATS,ITEMCAP,ACTIVATOR)
		Stop
	Failed:
		TNT1 A 0
		Fail
	Use:
		TNT1 A 0 A_JumpIfHealthLower(ACS_ExecuteWithResult(553,0,0,0),"Pickedup")
		Fail
	Pickedup:
		TNT1 A 0 A_PlaySound("pickup/health")
		TNT1 A 0 A_JumpIfInventory("PhilosopherStoneTracker",1,"PickedUp2")
		TNT1 A 0 A_JumpIf((ACS_ExecuteWithResult(WOC_DECORATE,STATS,MAXHEALTH)*0.25) < 25, 2)
		TNT1 A 0 ACS_ExecuteAlways(WOC_HEALSCRIPT,0,ACS_ExecuteWithResult(WOC_DECORATE,STATS,MAXHEALTH)*0.25,0,0)
		stop
		TNT1 A 0 ACS_ExecuteAlways(WOC_HEALSCRIPT,0,25,0,0)
		stop
	Pickedup2:
		TNT1 A 0 A_JumpIf((ACS_ExecuteWithResult(WOC_DECORATE,STATS,MAXHEALTH)*0.375) < 37, 2)
		TNT1 A 0 ACS_ExecuteAlways(WOC_HEALSCRIPT,0,ACS_ExecuteWithResult(WOC_DECORATE,STATS,MAXHEALTH)*0.375,0,0)
		stop
		TNT1 A 0 ACS_ExecuteAlways(WOC_HEALSCRIPT,0,37,0,0)
		stop
	}
}

actor PurplePotionRound : PurplePotionBase
{
	Inventory.Icon "PRPTZ0"
	Inventory.PickupMessage "Supreme Quartz Potion"
	Tag "Supreme Quartz Potion"
	States
	{
	Spawn:
		PRPT ABC 4
		Loop
	Pickup:
		TNT1 A 0 A_JumpIfInventory("PurplePotionRound", ACS_ExecuteWithResult(WOC_DECORATE,STATS,ITEMCAP,ACTIVATOR),"Failed")
		TNT1 A 0 ACS_ExecuteWithResult(WOC_DECORATE,STATS,ITEMCAP,ACTIVATOR)
		Stop
	Failed:
		TNT1 A 0
		Fail
	Use:
		TNT1 A 0 A_JumpIfHealthLower(ACS_ExecuteWithResult(553,0,0,0),"Pickedup")
		Fail
	Pickedup:
		TNT1 A 0 A_PlaySound("pickup/health")
		TNT1 A 0 A_JumpIfInventory("PhilosopherStoneTracker",1,"PickedUp2")
		TNT1 A 0 A_JumpIf((ACS_ExecuteWithResult(WOC_DECORATE,STATS,MAXHEALTH)*0.50) < 50, 2)
		TNT1 A 0 ACS_ExecuteAlways(WOC_HEALSCRIPT,0,ACS_ExecuteWithResult(WOC_DECORATE,STATS,MAXHEALTH)*0.50,0,0)
		stop
		TNT1 A 0 ACS_ExecuteAlways(WOC_HEALSCRIPT,0,50,0,0)
		stop
	Pickedup2:
		TNT1 A 0 A_JumpIf((ACS_ExecuteWithResult(WOC_DECORATE,STATS,MAXHEALTH)*0.75) < 75, 2)
		TNT1 A 0 ACS_ExecuteAlways(WOC_HEALSCRIPT,0,ACS_ExecuteWithResult(WOC_DECORATE,STATS,MAXHEALTH)*0.75,0,0)
		stop
		TNT1 A 0 ACS_ExecuteAlways(WOC_HEALSCRIPT,0,75,0,0)
		stop
	}
}

actor PurplePotionVial : PurplePotionBase
{
	Game Strife
	ConversationID 125
	Inventory.Icon "PVPTZ0"
	Inventory.PickupMessage "Minor Quartz Potion"
	Tag "Minor Quartz Potion"
	States
	{
	Spawn:
		PVPT ABC 4
		Loop
	Pickup:
		TNT1 A 0 A_JumpIfInventory("PurplePotionVial", ACS_ExecuteWithResult(WOC_DECORATE,STATS,ITEMCAP,ACTIVATOR),"Failed")
		TNT1 A 0 ACS_ExecuteWithResult(WOC_DECORATE,STATS,ITEMCAP,ACTIVATOR)
		Stop
	Failed:
		TNT1 A 0
		Fail
	Use:
		TNT1 A 0 A_JumpIfHealthLower(ACS_ExecuteWithResult(553,0,0,0),"Pickedup")
		Fail
	Pickedup:
		TNT1 A 0 A_PlaySound("pickup/health")
		TNT1 A 0 A_JumpIfInventory("PhilosopherStoneTracker",1,"PickedUp2")
		TNT1 A 0 A_JumpIf((ACS_ExecuteWithResult(WOC_DECORATE,STATS,MAXHEALTH)*0.10) < 10, 2)
		TNT1 A 0 ACS_ExecuteAlways(WOC_HEALSCRIPT,0,ACS_ExecuteWithResult(WOC_DECORATE,STATS,MAXHEALTH)*0.10,0,0)
		stop
		TNT1 A 0 ACS_ExecuteAlways(WOC_HEALSCRIPT,0,10,0,0)
		stop
	Pickedup2:
		TNT1 A 0 A_JumpIf((ACS_ExecuteWithResult(WOC_DECORATE,STATS,MAXHEALTH)*0.15) < 15, 2)
		TNT1 A 0 ACS_ExecuteAlways(WOC_HEALSCRIPT,0,ACS_ExecuteWithResult(WOC_DECORATE,STATS,MAXHEALTH)*0.15,0,0)
		stop
		TNT1 A 0 ACS_ExecuteAlways(WOC_HEALSCRIPT,0,15,0,0)
		stop
	}
}

Actor BluePotionRandomSpawner : RandomSpawner
{
	Dropitem "BluePotionVial" 255 4
	DropItem "BluePotionPentagon" 255 3
	DropItem "BluePotionHexagon" 255 2
	DropItem "BluePotionRound" 255 1
}

Actor PurplePotionRandomSpawner : RandomSpawner
{
	Dropitem "PurplePotionVial" 255 4
	DropItem "PurplePotionPentagon" 255 3
	DropItem "PurplePotionHexagon" 255 2
	DropItem "PurplePotionRound" 255 1
}

