Actor KylePistol : Weapon
{
     Weapon.AmmoType1 "EnergyUnits"
	 Weapon.AmmoUse1 1
	 Inventory.PickupMessage "Pistol"
     Inventory.PickupSound "CompletePickup"
	 Weapon.BobStyle InverseSmooth
	 Weapon.BobSpeed 0.9
	 +AMMO_OPTIONAL
	 +UNDROPPABLE
     States
	 {
	 Ready1:
	    DF01 A 1 A_WeaponReady
		Loop
	Ready:
	    DF01 A 1 A_WeaponReady
		Loop
		
	//-------Spesial Select and Deselect animations, using offset------//	
	 Select:
	    NULL A 0 A_PlaySound("WeaponSelect")
		DF01 A 1 offset(27, 68)
		DF01 A 1 offset(21, 60)
		DF01 A 1 offset(15, 52)
		DF01 A 1 offset(9, 44)
		DF01 A 1 offset(3, 36)	
		DF01 AAAAAAAAAAAAAAAAAAAA 0 A_Raise
	    DF01 A 1 A_Raise
	    Goto Select+5
	  Deselect:
	    DF01 A 1 offset(3, 36)
		DF01 A 1 offset(9, 44)
		DF01 A 1 offset(15, 52)
		DF01 A 1 offset(21, 60)
		DF01 A 1 offset(27, 68)
		TNT1 A 0 A_TakeInventory("UseAmmo", 999)
		DF01 AAAAAAAAAAAAAAAAAAA 0 A_Lower
	    DF01 A 1 A_Lower
		Goto Deselect+6
	//-------------------------------------------------------------------//	
	//----------------Fire, Easy State----------------------------------//	
      Fire:
	    TNT1 A 0 A_JumpIfInventory("PowerWeaponsSuper", 1, "FastFire")
		NULL A 0 A_JumpIfNoAmmo("OutOfAmmo")
	    NULL A 0 A_PlaySound("PistolFire")
	    DF01 B 1 Bright A_FireCustomMissile("PistolRedBolt", 0, 1, 5, 0)
		DF01 B 3 Bright  
		DF01 C 4 Bright
		DF01 A 10
		Goto Ready
		FastFire:
		NULL A 0 A_JumpIfNoAmmo("OutOfAmmo")
	    TNT1 A 0 A_JumpIfInventory("UseAmmo", 1, "FastFireUseAmmo")  
		NULL A 0 A_PlaySound("PistolFire")
	    DF01 B 1 Bright A_FireCustomMissile("PistolRedBolt", 0, 0, 5, 0)
		TNT1 A 0 A_GiveInventory("UseAmmo", 1)
		DF01 B 2 Bright  
		DF01 C 2 Bright
		DF01 A 4
		Goto Ready
		FastFireUseAmmo:
		NULL A 0 A_JumpIfNoAmmo("OutOfAmmo")  
		NULL A 0 A_PlaySound("PistolFire")
	    DF01 B 1 Bright A_FireCustomMissile("PistolRedBolt", 0, 1, 5, 0)
		TNT1 A 0 A_TakeInventory("UseAmmo", 1)
		DF01 B 2 Bright  
		DF01 C 2 Bright
		DF01 A 4
		Goto Ready
	//-------------------------------------------------------------------//	
	//-------Out Of Ammo-----------------//	
	  OutOfAmmo:
	    DF01 A 2 A_WeaponReady
		NULL A 0 A_PlaySound("PistolOut")
	    Goto ready
	//------------------------------------//
	
	//Sorry, but it weapon never spawn on map xd)//
	   //Spawn:
		 //Stop
	//----------------------------------------//
		}
		
}

//-------------Standart--------------//
Actor StandartRedBolt //: FastProjectile
{
	Radius 2
	Height 2
	Speed 60
	Projectile
	+NOGRAVITY
	+FORCEPAIN
	DeathSound "BoltExplode"
	States
	{
	Spawn:  
		PRBT A 1 Bright 
		Loop
	Death:
		DFP3 ABCDEF 3 Bright
		Stop
	}
}
//----------------------------------------//

//-----------Standart Green Bolt-------------//
Actor StandartGreenBolt //: FastProjectile
{
	Radius 2
	Height 2
	Speed 60
	Projectile
	+NOGRAVITY
	+FORCEPAIN
	DeathSound "BoltExplode"
	States
	{
	Spawn:  
		PGBT A 1 Bright
		Loop
	Death:
		DFP3 ABCDEF 3 Bright
		Stop
	}
}
//---------------------------------------------//

//-------Warning! Red Bolt using model!-----//
Actor PistolRedBolt : StandartRedBolt { Damage (10) -FORCEPAIN }
//-----------------------------------------------//


Actor UseAmmo : Inventory { Inventory.Amount 1}	 