// --------------------------------------------------------------------------
//
// Weapon Basis
//
// --------------------------------------------------------------------------

ACTOR LowWeapon : Weapon replaces Weapon
{
	+WEAPON.NOALERT //To avoid alerting enemies on alternate firing modes...
	+WEAPON.NOAUTOAIM // Trust your skills!
	Weapon.Kickback 100
	Weapon.SelectionOrder 100
	Weapon.bobstyle inversesmooth
  	Weapon.bobspeed 2.0
	Weapon.bobrangex 0.2
	Weapon.bobrangey 0.2
}

// Bullet puff -------------------------------------------------------------

ACTOR Bullet_Puff replaces BulletPuff
{
	+NOBLOCKMAP
	+NOGRAVITY
	+RANDOMIZE
	+FLOORCLIP
	RenderStyle Add
	Decal BulletChip
	Alpha 1.5
	Radius	1
	Height	1
	Speed 0
	States
	{
	Spawn:
		TNT1 A 0
	Crash:
		TNT1 A 0 A_SetScale(0.1)
		TNT1 A 0 A_SpawnDebris("BulletSparks")
		TNT1 A 0 A_SpawnItem("GunSmokeSpawner2")
		TNT1 A 0 A_PlaySound("weapons/ricochet")
		FLER A 2 BRIGHT
		Stop
	}
}

// Those things that pop up when you shoot a wall, "bullet sparks", derp.

ACTOR BulletSparks
{
	+Missile
	+BOUNCELIKEHERETIC
	+FLOORCLIP
	+DONTSPLASH
	+NOTELEPORT
	Health 4
	Radius 2
	Height 3
	Speed  1
	RenderStyle Add
	Alpha	1
	Scale	.032
	Mass	1
	States
	{
		BPUF A 1
		BPUF ABCDA 1  BRIGHT A_SetTranslucent(.8,1)
		BPUF BCDABC 1  BRIGHT A_SetTranslucent(.6,1)
		BPUF DABCDABC 1  BRIGHT A_SetTranslucent(.4,1)
		BPUF DABCDABCDA 1 BRIGHT A_SetTranslucent(.2,1)
		Stop
	}
}

// A variant used by the Karabiner98k and the Hunting Revolver to avoid nonsense extreme deaths.

ACTOR Bullet_Puff2 : Bullet_Puff
{
	+NOEXTREMEDEATH
}

// Kicking Commands by WildWeasel to avoid using ACS scripts.

ACTOR Action_Kick : CustomInventory
{
   Inventory.Amount 1
   Inventory.MaxAmount 1
   -INVBAR
   +INVENTORY.UNDROPPABLE
   States
   {
      Use:
       TNT1 A 0 A_GiveInventory("IsKicking",1)
       Fail
   }
}

ACTOR Action_KickCancel : CustomInventory
{
   Inventory.Amount 1
   Inventory.MaxAmount 1
   -INVBAR
   +INVENTORY.UNDROPPABLE
   States
   {
      Use:
       TNT1 A 0 A_TakeInventory("IsKicking",1)
       Fail
   }
}

ACTOR IsKicking : Inventory
{
   Inventory.Amount 1
   Inventory.MaxAmount 1
   -INVBAR
   +INVENTORY.UNDROPPABLE
}

// Quick TNT Commands to avoid using ACS scripts.

ACTOR Action_TNT : CustomInventory
{
   Inventory.Amount 1
   Inventory.MaxAmount 1
   -INVBAR
   +INVENTORY.UNDROPPABLE
   States
   {
      Use:
       TNT1 A 0 A_GiveInventory("ThrowTNT",1)
       Fail
   }
}

ACTOR Action_TNTCancel : CustomInventory
{
   Inventory.Amount 1
   Inventory.MaxAmount 1
   -INVBAR
   +INVENTORY.UNDROPPABLE
   States
   {
      Use:
       TNT1 A 0 A_TakeInventory("ThrowTNT",1)
       Fail
   }
}

ACTOR ThrowTNT : Inventory
{
   Inventory.Amount 1
   Inventory.MaxAmount 1
   -INVBAR
   +INVENTORY.UNDROPPABLE
}