ACTOR Medbag : CustomInventory replaces ArtiSuperHealth
{
   Inventory.Amount 100
   Inventory.MaxAmount 500
   Inventory.InterHubAmount 500
   Inventory.PickupSound "Health/Pickup"
   Inventory.UseSound ""
   Inventory.PickupMessage "You are in possession of a medic bag!"
   Inventory.Icon ARTIMBAG
   Tag "Medbag"
   +INVBAR
   +INVENTORY.UNDROPPABLE
   States
   {
   Spawn:
      MBAG A -1
      Stop
   Use:
	  TNT1 A 0 A_JumpIfInventory("PowerMedbagFake",1,"Nope")
	  TNT1 A 0 ACS_NamedExecuteAlways("MedbagHealing")
	  Fail
   Nope:
	  TNT1 A 0
	  Fail
   } 
}

actor MedbagDelay : PowerupGiver
{
  Inventory.Amount 0
  Powerup.Type "MedbagFake"
  Powerup.Duration -15
  +INVENTORY.AUTOACTIVATE
  +INVENTORY.ADDITIVETIME
}

actor PowerMedbagFake : PowerDamage
{	
	Inventory.Icon "HEALED0"
	DamageFactor "Normal", 1.0
}

ACTOR MedbagEffect : CustomInventory
{
	+INVENTORY.AUTOACTIVATE
	States
	{	
		Spawn:
			TNT1 A 0
			Stop
		Pickup:
			TNT1 A 0 A_PlaySound("Health/Use",3)
			TNT1 A 0 A_SetBlend("Red",0.15,25)
			Stop
	}
}

ACTOR MedbagHealth : Health
{
  Inventory.Amount 1
}

ACTOR MedbagGiver : CustomInventory
{
  Inventory.MaxAmount 0
  +INVENTORY.AUTOACTIVATE
  +INVENTORY.ALWAYSPICKUP
  States
  {
  Spawn:
    TNT1 A -1
    Stop
  Pickup:
    TNT1 A 0 A_GiveInventory("Medbag",100)
    Stop
  }
}