//These are the various inventory items that all heroes
//can use

//==Weapon and Utility actions==
//The heartbeat of GMOTA, these keys
//allow the heroes to use the vital 
//actions specific to their weapons

Actor ReloadBoolean : Inventory
{
    Inventory.MaxAmount 1
    +UNDROPPABLE
    -INVBAR
}

actor ActionButton : CustomInventory 
{
  -INVBAR
  +UNDROPPABLE
  Inventory.Amount 1
  Inventory.MaxAmount 1
  States
  {
      Use:
      TNT1 A 0 A_GiveInventory("ReloadBoolean", 1)
      Fail
  }
}

actor StopActionButton : CustomInventory 
{
  -INVBAR
  +UNDROPPABLE
  Inventory.Amount 1
  Inventory.MaxAmount 1
  States
  {
      Use:
      TNT1 A 0 A_TakeInventory("ReloadBoolean", 1)
      Fail
  }
}


Actor ZoomBoolean : Inventory
{
    Inventory.MaxAmount 1
    +UNDROPPABLE
    -INVBAR
}

actor UtilityButton : CustomInventory 
{
  -INVBAR
  +UNDROPPABLE
  Inventory.Amount 1
  Inventory.MaxAmount 1
  States
  {
      Use:
      TNT1 A 0 A_GiveInventory("ZoomBoolean", 1)
      Fail
  }
}

actor StopUtilitybutton : CustomInventory 
{
  -INVBAR
  +UNDROPPABLE
  Inventory.Amount 1
  Inventory.MaxAmount 1
  States
  {
      Use:
      TNT1 A 0 A_TakeInventory("ZoomBoolean", 1)
      Fail
  }
}



//==FLICKPUFF==

//This isn't actually an item exactly but
//a harmless hitscan attack to hit switches
//ensuring players never get stuck

actor flickpuff : bulletpuff
{
	renderstyle "normal"
	+FORCEXYBILLBOARD	
	+LOOKALLAROUND
	+bloodlessimpact
	+PUFFONACTORS
	states
	{
	spawn:
		TNT1 A 0
		stop
	}
}


actor POWbreakage
{
	radius 3
	height 6
	speed .1
	scale 0.8
	+missile
	+doombounce
	+FLOORCLIP
	+DONTSPLASH
	+thruactors
	+NOTELEPORT
	states
	{
	spawn:
		WTL1 AAAAAAA 1  Bright 
		WTL1 AAAAAAA 1 Bright 
		TNT1 AAA 1  Bright 
		WTL1 AAAA 1 Bright 
		TNT1 AA 1  Bright 
		WTL1 AA 1 Bright 
		TNT1 A 1  Bright 
		WTL1 A 1 Bright 
		TNT1 A 1  Bright 
		WTL1 A 1 Bright 
		Stop
	}
}

ACTOR GemShardLightBlue
{
	Radius 1
	Height 1
	Speed 15
	PROJECTILE
	+hexenbounce
	-NOGRAVITY
	+THRUACTORS
	bouncecount 5
	Gravity 0.9
	RenderStyle Add
	Alpha 0.8
	Scale 0.8
	States
	{
	Spawn:
		GISD ABCD 1
		Loop 
	Death:
		TNT1 A 0
		Stop
	}
}

actor GemShardRed : GemShardLightBlue
{
	states
	{
	spawn:
		GRSD ABCD 1
		loop
	}
}


//==ARMOR AMULET==

//Probably the simplest sub-item, using it
//will give the hero an instant 50 armor points
//useful if you want to keep your golden armor 
//repaired

actor armoramulet : custominventory
{
	Inventory.PickupMessage "Armor amulet! Defense up!"
	inventory.pickupsound "subitems/upgradeitem"
	Inventory.Amount 1
	Inventory.MaxAmount 1
	Inventory.InterHubAmount 1
	Inventory.Icon "AMUICN"
	scale 1.5
	+INVBAR
	+FLOORCLIP
	+floatbob
	+dropped
	states
	{
	spawn:
		ARAM A 10 bright
		ARAM A 4 
		loop
	pickup:
		TNT1 A 0 A_giveinventory ("amuletprotection", 1)
		TNT1 AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 0 a_giveinventory ("steelhelmet",1)
		stop
	}
}

actor amuletprotection : powerprotection
{
	damagefactor "normal", 0.60
	Powerup.Duration -90
	Powerup.Color 0, 0, 0, 0
    inventory.maxamount 1
    inventory.icon "ARAMA0"
    +INVENTORY.AUTOACTIVATE
}

