ACTOR SwatGrenades : Weapon
{
    Inventory.PickupMessage "You unlocked hand grenades!"
    Inventory.RestrictedTo "SwatClass"
	Weapon.AmmoGive1 1
    +INVENTORY.ALWAYSPICKUP
    +INVENTORY.UNDROPPABLE
    +INVENTORY.INVBAR
    +NOALERT

    States
    {
    Spawn:
        PGRN D -1
        Loop
    Pickup:
        TNT1 A 0 A_GiveInventory("HasSwatGrenades", 1)
        TNT1 A 0 A_GiveInventory("SwatGrenadeAmmo", 1)
        TNT1 A 0 A_TakeInventory("SwatGrenades", 1)
        Stop
    Ready:
        Stop
    }
}

ACTOR HasSwatGrenades : Inventory
{
    Inventory.MaxAmount 1
}

ACTOR SwatGrenadeAmmo : Ammo
{
	Inventory.Amount 1
	Inventory.Maxamount 15
	Ammo.Backpackamount 1
	Ammo.BackpackMaxamount 30
}

ACTOR ThrowPower : Ammo
{
   Inventory.MaxAmount 30
   Ammo.BackpackMaxAmount 30
   Inventory.Icon THROW
}

ACTOR ThrownGrenade1
{
   Radius 5
   Height 5
   Speed 1
   Damage 10
   Scale 0.3
   	Mass 9
	Damage 10
	BounceType "Doom" //actor bounces off planes and walls.
   SeeSound "weapons/grnbounce"
	PROJECTILE
	-NOGRAVITY
	+CANBOUNCEWATER
	+FORCERADIUSDMG
	Species "Player"
	Obituary "%o was fragged by %k's grenade."
	SelfObituary "%o got fragged."
	BounceFactor 0.8
	WallBounceFactor 0.5
	BounceCount 6
	ReactionTime 9 //About 3 Seconds
	RenderStyle NORMAL
	Decal Scorch
   States
   {
   Spawn:
      FGRN A 4 A_Countdown
      FGRN BCDEF 4
      Loop
   Death:
      FGRN G 0 A_PlaySound("weapons/grnexplode")
	  TNT1 A 0 A_SetScale(1, 1)
      TNT1 A 0 A_ChangeFlag("NoGravity", 1)
      TNT1 A 0 A_AlertMonsters
      FGRN G 0 A_Explode (500,150)
      FGRN GHIJ 3 Bright
      Stop
   }
}


ACTOR ThrownGrenade2 : ThrownGrenade1
{
   Speed 2
}

ACTOR ThrownGrenade3 : ThrownGrenade1
{
   Speed 3
}

ACTOR ThrownGrenade4 : ThrownGrenade1
{
   Speed 4
}

ACTOR ThrownGrenade5 : ThrownGrenade1
{
   Speed 5
}

ACTOR ThrownGrenade6 : ThrownGrenade1
{
   Speed 6
}

ACTOR ThrownGrenade7 : ThrownGrenade1
{
   Speed 7
}

ACTOR ThrownGrenade8 : ThrownGrenade1
{
   Speed 8
}

ACTOR ThrownGrenade9 : ThrownGrenade1
{
   Speed 9
}

ACTOR ThrownGrenade10 : ThrownGrenade1
{
   Speed 10
}

ACTOR ThrownGrenade11 : ThrownGrenade1
{
   Speed 11
}

ACTOR ThrownGrenade12 : ThrownGrenade1
{
   Speed 12
}

ACTOR ThrownGrenade13 : ThrownGrenade1
{
   Speed 13
}

ACTOR ThrownGrenade14 : ThrownGrenade1
{
   Speed 14
}

ACTOR ThrownGrenade15 : ThrownGrenade1
{
   Speed 15
}

ACTOR ThrownGrenade16 : ThrownGrenade1
{
   Speed 16
}

ACTOR ThrownGrenade17 : ThrownGrenade1
{
   Speed 17
}

ACTOR ThrownGrenade18 : ThrownGrenade1
{
   Speed 18
}

ACTOR ThrownGrenade19 : ThrownGrenade1
{
   Speed 19
}

ACTOR ThrownGrenade20 : ThrownGrenade1
{
   Speed 20
}

ACTOR ThrownGrenade21 : ThrownGrenade1
{
   Speed 21
}

ACTOR ThrownGrenade22 : ThrownGrenade1
{
   Speed 22
}

ACTOR ThrownGrenade23 : ThrownGrenade1
{
   Speed 23
}

ACTOR ThrownGrenade24 : ThrownGrenade1
{
   Speed 24
}

ACTOR ThrownGrenade25 : ThrownGrenade1
{
   Speed 25
}

ACTOR ThrownGrenade26 : ThrownGrenade1
{
   Speed 26
}

ACTOR ThrownGrenade27 : ThrownGrenade1
{
   Speed 27
}

ACTOR ThrownGrenade28 : ThrownGrenade1
{
   Speed 28
}

ACTOR ThrownGrenade29 : ThrownGrenade1
{
   Speed 29
}

ACTOR ThrownGrenade30 : ThrownGrenade1
{
   Speed 30
}
