//-----------Here Health and Armor Spawners---------//
Actor 20ShieldUnits : BasicArmorBonus 30007 //replaces ArmorBonus 
{
    Inventory.Pickupmessage "20 Shield Units"
	Inventory.PickupSound "ItemPickup"
	Armor.Savepercent 100
	Armor.Saveamount 20
	Armor.Maxsaveamount 200
	+COUNTITEM
	-INVENTORY.ALWAYSPICKUP
	States
	{
	Spawn:
	   DFW6 LM 8 Bright
	   Loop
	 }
}

Actor StartShield : 20ShieldUnits
{  
    Armor.Saveamount 100
}	
	 
	 
Actor DarkForcesMedikit : Health 30008
{
	Inventory.Amount 20
	Inventory.MaxAmount 100
	Inventory.PickupMessage "Medikit"
	Inventory.PickupSound "ItemPickup"
    States
	{
	Spawn:
        DFW6 N -1
		Stop
	}
}
//--------------------------------------------------------//

//--------------------Power Up-------------------------//
Actor ShieldSupercharge : PowerupGiver
{
	+COUNTITEM
	+INVENTORY.AUTOACTIVATE
	+INVENTORY.ALWAYSPICKUP
	+INVENTORY.BIGPOWERUP
	Inventory.MaxAmount 0
	Powerup.Type Invulnerable
	Powerup.Color White
}

ACTOR ShieldSuperchargeSpawner : CustomInventory 30009
{
	+COUNTITEM
	+INVENTORY.ALWAYSPICKUP
	Inventory.PickupMessage "Shield Supercharge!"
	Inventory.PickupSound "PowerUpPickup"
	States
	{
	Spawn:
		DFW8 ABCDEFGH 6 Bright
		Loop
	Pickup:
		TNT1 A 0 A_GiveInventory("ShieldSupercharge", 1)
		TNT1 A 0 A_GiveInventory("Revive", 1)
		Stop
	}
}

//-----------------------------------//
Actor WeaponSupercharge : PowerupGiver 30010
{ 
    +INVENTORY.AUTOACTIVATE
	+INVENTORY.ALWAYSPICKUP
	Inventory.MaxAmount 0
	Inventory.Pickupmessage "Weapon Supercharge!"
	Inventory.PickupSound "PowerUpPickup"
	Powerup.Type WeaponsSuper
	States
	{
	Spawn:
		DFW6 O -1 
		Stop
	}
}

Actor PowerWeaponsSuper : PowerUp
{
  Powerup.Duration -60
}
//-------------------------------// 
	
Actor Revive : BasicArmorPickup 30011
{
	Inventory.Pickupmessage "Revive!"
	Inventory.PickupSound "PowerUpPickup"
	-INVENTORY.ALWAYSPICKUP
	Armor.SavePercent 100
	Armor.SaveAmount 200
	States
	{
	Spawn:
		DFW7 ABCDEF 6 bright
		loop
	}
}

Actor ExtraLife : Health 30012
{
	Inventory.Amount 200
	Inventory.MaxAmount 200
	+INVENTORY.ALWAYSPICKUP
	Inventory.Pickupmessage "Extra Life!"
	Inventory.PickupSound "PowerUpPickup"
	States
	{
	Spawn:
		DFW9 ABCDEFGHIJKLMNOPQRS 3 bright
		loop
	}
}



Actor YourGear : CustomInventory 30013
{
    +INVENTORY.ALWAYSPICKUP
	Inventory.Pickupmessage "Your Gear"
	Inventory.PickupSound "CompletePickup"
	States
	{
	Spawn:
	   DFW6 R -1
	   Stop
	Pickup:
	   TNT1 A 0 
       TNT1 A 0 A_GiveInventory("KyleBlasterRifle", 1)
       TNT1 A 0 A_GiveInventory("KyleThermalDetonators", 1)
       TNT1 A 0 A_GiveInventory("KyleAutoGun", 1)
       TNT1 A 0 A_GiveInventory("KyleFusionCutter", 1)
       TNT1 A 0 A_GiveInventory("KyleIMMines", 1)
       TNT1 A 0 A_GiveInventory("KyleMortarGun", 1)
       TNT1 A 0 A_GiveInventory("KyleConcussionRifle", 1)
       TNT1 A 0 A_GiveInventory("KyleAssaultCannon", 1)
	   TNT1 A 0 A_GiveInventory("ThermalDetonators", 3)
	   TNT1 A 0 A_GiveInventory("ImMines", 3)
	   TNT1 A 0 A_GiveInventory("IceCleats", 1)
	   Stop
	   }
}


//---------------------Goggles(yeah it's not use power light------------------//
ACTOR InfaredGoggles : CustomInventory 30014
{
	Inventory.PickupMessage "Infared Goggles"
	Inventory.Icon "DFW6P0"
	Inventory.PickupSound "ItemPickup"
	+INVENTORY.ALWAYSPICKUP
    +INVENTORY.INVBAR
    -INVENTORY.AUTOACTIVATE
	+INVENTORY.PERSISTENTPOWER
	States
	{
	Spawn:
		DFW6 P -1
		stop
	Pickup:
	    TNT1 A 0 
	    TNT1 A 0 A_JumpIfInventory("InventoryBattery", 100, "PickupFull")
	    TNT1 A 0 A_GiveInventory("InventoryBattery", 100)
		Stop	
		PickupFull:
		TNT1 A 0 A_TakeInventory("InventoryBattery", 1)
		TNT1 A 0 A_GiveInventory("InventoryBattery", 100)
		Stop
	Use:
	TNT1 A 1 
	TNT1 A 0 A_JumpIfInventory("GogglesCheck", 1, "Use2")
	TNT1 A 0 A_GiveInventory("GogglesCheck", 1)
	TNT1 A 0 A_PlaySound("GogglesOn")
	TNT1 A 0 ACS_ExecuteAlways(905, 0,0,0)
	Fail
	Use2:
	TNT1 A 0 A_TakeInventory("GogglesCheck", 2)
	Fail
    }
}

ACTOR GogglesCheck : Inventory { Inventory.Amount 1}

Actor SpecialInfared : PowerDamage
{
	Powerup.Color 0, 60, 0 0.3
	Powerup.ColorMap 0, 60, 0
    Powerup.Duration 0x7FFFFFFF
	damagefactor "normal", 1.0
}
//----------------------------------------------------------------------------//

//-------------------Gas Mask-------------------------------------------------//
Actor GasMask : CustomInventory 30015
{
	Inventory.PickupMessage "Gas Mask"
	Inventory.Icon "DFW6Q0"
	Inventory.PickupSound "ItemPickup"
	Inventory.MaxAmount 1
    +INVENTORY.ALWAYSPickup
	+INVENTORY.INVBAR
    -INVENTORY.AUTOACTIVATE
	+INVENTORY.PERSISTENTPOWER
	States
	{
	Spawn:
		DFW6 Q -1
		stop
	Pickup:
	    TNT1 A 0 
	    TNT1 A 0 A_JumpIfInventory("InventoryBattery", 100, "PickupFull")
	    TNT1 A 0 A_GiveInventory("InventoryBattery", 100)
		Stop	
		PickupFull:
		TNT1 A 0 A_TakeInventory("InventoryBattery", 1)
		TNT1 A 0 A_GiveInventory("InventoryBattery", 100)
		Stop
	Use:
	TNT1 A 1 
	TNT1 A 0 A_JumpIfInventory("GasMaskCheck", 1, "Use2")
	TNT1 A 0 A_GiveInventory("GasMaskCheck", 1)
	TNT1 A 0 ACS_ExecuteAlways(906, 0,0,0)
	Fail
	Use2:
	TNT1 A 0 A_TakeInventory("GasMaskCheck", 2)
	Fail
    }
}

ACTOR GasMaskCheck : Inventory { Inventory.Amount 1}

Actor SpecialIronFeet : PowerIronFeet
{
	Powerup.Color 0, 0, 0 0.0
    Powerup.Duration 0x7FFFFFFF
}
//-----------HeadLight-------------//
Actor HeadLight : CustomInventory 30016
{
	Inventory.Icon "DFW6T0"
	Inventory.MaxAmount 1
	+INVENTORY.INVBAR
    -INVENTORY.AUTOACTIVATE
	+INVENTORY.PERSISTENTPOWER
	States
	{
    Use:
	TNT1 A 0 A_JumpIfInventory("HeadLightCheck", 1, "OffLight")
	TNT1 A 0 A_Light1
	TNT1 A 0 A_GiveInventory("HeadLightCheck", 1)
	TNT1 A 0 ACS_ExecuteAlways(907,0,30)
	Fail
	OffLight:
    TNT1 A 0 A_Light0
	TNT1 A 0 A_TakeInventory("HeadLightCheck", 1)
	Fail
	}
}	
	
	
	
ACTOR HeadLightCheck : Inventory { Inventory.Amount 1}
//--------------------------------------//
//--------Ice Cleats-------//
//It's PowerUp Not use battery my friend.
Actor IceCleats : CustomInventory 30017
{
	Inventory.Icon "DFW6S0"
	Inventory.PickupMessage "Ice Cleats"
	Inventory.MaxAmount 1
	+INVENTORY.INVBAR
    -INVENTORY.AUTOACTIVATE
	+INVENTORY.PERSISTENTPOWER
	States
	{
	Spawn:
		DFW6 S -1
		stop
    Use:
	TNT1 A 0 A_JumpIfInventory("IceCleatsCheck", 1, "OffIceCleats")
	TNT1 A 0 A_GiveInventory("IceCleatsCheck", 1)
	Fail
	OffIceCleats:
	TNT1 A 0 A_TakeInventory("IceCleatsCheck", 1)
	Fail
	}
}

 

ACTOR IceCleatsCheck : Inventory { Inventory.Amount 1}
//-------------Not PowerUp------------//
Actor DFBarrel 30018
{
	Health 20
	Radius 10
	Height 42
	Mass 500
	+SOLID
	+SHOOTABLE
	+NOBLOOD
	+ACTIVATEMCROSS
	+DONTGIB
	+NOICEDEATH
	+OLDRADIUSDMG
	DeathSound "MineExplode"
	States
	{
	Spawn:
		BAR2 ABCDCB 5 Bright
		Loop
	Death:
		BAR2 E 3 Bright A_Explode
		BAR2 F 3 Bright A_Scream
		BAR2 GHIJKLMNOPQ 3 BRIGHT
		TNT1 A 1050 BRIGHT A_BarrelDestroy
		TNT1 A 5 A_Respawn
		Wait
	}
}
