
//**************** Here are all of the Corvus specific spawners ****************

//==============================================================================
//=============================== BACKPACK STUFF ===============================
//==============================================================================

ACTOR BrutalBagOfHolding : BackpackItem
{
	Inventory.PickupMessage "This bag of holding seems to have a few items already in it..."
	+COUNTITEM
	+FLOATBOB
	States
	{
		Spawn:
			BAGH A 1 Bright A_SpawnItemEx("WingsOfWrathFlare",0,0,31,0,0,0,0,SXF_NOCHECKPOSITION)
			Loop
	}
}

Actor BackpackSpawner : RandomSpawner
{
	DropItem "BackpackGroup1"
	DropItem "BackpackGroup2"
	DropItem "BackpackGroup3"
	DropItem "BackpackGroup4"
	DropItem "BackpackGroup5"
	DropItem "BackpackGroup6"
}

ACTOR BackpackGroup1 : CustomInventory
{
	+FLOATBOB
	Inventory.PickupSound "PICUP5"
	Inventory.PickupMessage "This bag of holding seems to have a few items already in it..."
	
	States
	{
		Spawn:
			BAGH A 1 Bright A_SpawnItemEx("WingsOfWrathFlare",0,0,31,0,0,0,0,SXF_NOCHECKPOSITION)
			Loop
		Pickup:
			TNT1 A 0 A_GiveInventory ("BrutalArtiTeleport", 1)
			TNT1 A 0 A_GiveInventory ("BrutalBagOfHolding", 1)
			TNT1 A 0 A_GiveInventory ("BottleBundle", 1)
			TNT1 A 0 A_GiveInventory ("Mana", 5)
			TNT1 A 0 A_GiveInventory ("Experience", (100 * GetCvar("ExpModifier")))
			TNT1 A 0 ACS_NamedExecute("GoldTrap")
			TNT1 A 0 ACS_NamedExecute("GreenTrap")
			TNT1 A 0 ACS_NamedExecute("BlueTrap")
			TNT1 A 0 ACS_NamedExecute("RedTrap")
			TNT1 A 0 ACS_NamedExecute("YellowTrap")
			TNT1 A 0 ACS_NamedExecute("OrangeTrap")
			stop
	}
}

ACTOR BackpackGroup2 : BackpackGroup1
{
	States
	{
		Pickup:
			TNT1 A 0 A_GiveInventory ("AdrenalineBooster",1)
			Goto Super:: Pickup+1
	}
}

ACTOR BackpackGroup3 : BackpackGroup1
{
	States
	{
		Pickup:
			TNT1 A 0 A_GiveInventory ("BrutalShadowSphere",1)
			Goto Super:: Pickup+1
	}
}

ACTOR BackpackGroup4 : BackpackGroup1
{
	States
	{
		Pickup:
			TNT1 A 0 A_GiveInventory ("BrutalChickenDevice", 1)
			Goto Super:: Pickup+1
	}
}

ACTOR BackpackGroup5 : BackpackGroup1
{
	States
	{
		Pickup:
			TNT1 A 0 A_GiveInventory ("RoosterRoaster", 1)
			Goto Super:: Pickup+1
	}
}

ACTOR BackpackGroup6 : BackpackGroup1
{
	States
	{
		Pickup:
			TNT1 A 0 A_GiveInventory ("BrutalArtiFly", 1)
			Goto Super:: Pickup+1	
	}
}


//==============================================================================
//================================ BOTTLE STUFF ================================
//==============================================================================



ACTOR BottleSpawner : RandomSpawner
{
	Dropitem "BrutalGreenSpawner"
	Dropitem "BrutalRedSpawner"
	Dropitem "BrutalBlueSpawner"
}

ACTOR BrutalGRSpawner : RandomSpawner
{
	Dropitem "BrutalGreenSpawner"
	Dropitem "BrutalRedSpawner"
}

ACTOR BrutalGBSpawner : RandomSpawner
{
	Dropitem "BrutalGreenSpawner"
	Dropitem "BrutalBlueSpawner"
}

ACTOR BrutalRBSpawner : RandomSpawner
{
	Dropitem "BrutalRedSpawner"
	Dropitem "BrutalBlueSpawner"
}

ACTOR BottleBundle : CustomInventory
{
	+FLOATBOB
	+NOGRAVITY
	-INVENTORY.INVBAR
	+INVENTORY.PICKUPFLASH
	+INVENTORY.FANCYPICKUPSOUND
	Inventory.PickupSound "PICUP5"
	Inventory.InterHubAmount 16
	//Inventory.PickupMessage "Picked up one of each Flechette"
	
	States
	{
		Spawn:
			TNT1 A 0
			Stop
		Pickup:
			TNT1 A 0
			{
				If (GetCVAR("WildBottles") == 0)
				{
					A_GiveInventory("BrutalExplosiveBottle",1);
					A_GiveInventory("BrutalDroppedBottle",1);
					A_GiveInventory("BrutalPoisonBottle",1);
					A_Print("Picked up one of each Flechette");
				}
				If (GetCVAR("WildBottles") == 1)
				{
					A_GiveInventory("BrutalExplosiveBottle",1);
					A_Print("Picked up a Green Flechette");
				}
				If (GetCVAR("WildBottles") == 2)
				{
					A_GiveInventory("BrutalDroppedBottle",1);
					A_Print("Picked up a Red Flechette");
				}
				If (GetCVAR("WildBottles") == 3)
				{
					A_GiveInventory("BrutalPoisonBottle",1);
					A_Print("Picked up a Blue Flechette");
				}
				If (GetCVAR("WildBottles") == 4)
				{
					A_GiveInventory("BrutalExplosiveBottle",1);
					A_GiveInventory("BrutalDroppedBottle",1);
					A_Print("Picked up both a Green and Red Flechette");
				}
				If (GetCVAR("WildBottles") == 5)
				{
					A_GiveInventory("BrutalExplosiveBottle",1);
					A_GiveInventory("BrutalPoisonBottle",1);
					A_Print("Picked up both a Green and Blue Flechette");
				}
				If (GetCVAR("WildBottles") == 6)
				{
					A_GiveInventory("BrutalDroppedBottle",1);
					A_GiveInventory("BrutalPoisonBottle",1);
					A_Print("Picked up both a Red and Blue Flechette");
				}
			}
			stop
	}
}


//==============================================================================
//============================ PICKUPS & ARTIFACTS =============================
//==============================================================================


ACTOR ManaBonusSpawner : CustomInventory
{
	+FLOAT
	+DONTSPLASH
	Inventory.PickupSound "ARTIUP"
	Inventory.PickupMessage "Blue Mana"
	
	States
	{
		Spawn:
			TNT1 A 0 NoDelay A_JumpIf(CheckClass("Corvette",AAPTR_PLAYER1),"Whoops")
			MAN1 A 1
			Loop
		Pickup:
			TNT1 A 0 A_GiveInventory ("Mana", 10)
			TNT1 A 0 A_GiveInventory ("Experience", (50 * GetCvar("ExpModifier")))
			stop
		Whoops:
			TNT1 A 0 A_SpawnItem("HealthBonusSpawner",0,0,False)
			TNT1 A 0 A_Remove(0)
			Stop
	}
}

ACTOR RoosterSpawner : CustomInventory
{
	+FLOATBOB
	+DONTSPLASH
	-INVENTORY.INVBAR
	Inventory.Icon "ARTIEGGC"
	Inventory.PickupMessage "This Morph Ovum looks different than usual..."	
	Inventory.PickupSound "CHICACT"
	
	States
	{
		Spawn:
			TNT1 A 0 NoDelay A_JumpIf(CheckClass("Corvette",AAPTR_PLAYER1),"Whoops")
			EGGC DDEEFF 1 Bright
			Loop
		Pickup:
			TNT1 A 0 A_GiveInventory ("RoosterRoaster", 1)
			TNT1 A 0 A_GiveInventory ("Experience", (100 * GetCvar("ExpModifier")))
			stop
		Whoops:
			TNT1 A 0 A_SpawnItem("ChickenSpawner",0,0,False)
			TNT1 A 0 A_Remove(0)
			Stop
	}
}

ACTOR RoosterTest : CustomInventory
{
	+FLOATBOB
	+DONTSPLASH
	-INVENTORY.INVBAR
	Inventory.Icon "ARTIEGGC"
	Inventory.PickupMessage "This Morph Ovum looks different than usual..."	
	Inventory.PickupSound "CHICACT"
	
	States
	{
		Spawn:
			EGGC DDEEFF 1 Bright
			Loop
		Pickup:
			TNT1 A 0 
			{
				If (CheckClass("Corvette",AAPTR_PLAYER1))
				{
					A_GiveInventory ("BrutalChickenDevice", 1);
					A_Print ("You're Playing as Corvette, Have a normal egg!");
				}
				Else If (CheckClass("BrutalCorvus",AAPTR_PLAYER1))
				{
					A_GiveInventory ("RoosterRoaster", 1);
					A_Print ("Corvus is worthy of the Chicken Lord!");
				}
			}
			TNT1 A 0 A_GiveInventory ("Experience", (100 * GetCvar("ExpModifier")))
			stop
	}
}