Actor KyleAssaultCannon : Weapon 30006
{
     Weapon.AmmoType1 "PlasmaCartridges"
	 Weapon.AmmoType2 "AssaultCannonMissiles"
	 Weapon.AmmoUse1 1
	 Weapon.AmmoUse2 1
	 Weapon.AmmoGive1 30
	 Inventory.PickupMessage "Assault Cannon"
     Inventory.PickupSound "ItemPickup"
	 Weapon.BobStyle InverseSmooth
	 Weapon.BobSpeed 0.9	 
	 +AMMO_OPTIONAL
	 +ALT_AMMO_OPTIONAL
	 States
	 {
	 Ready:
	    DF09 A 1 A_WeaponReady
		Loop
	//-------Spesial Select and Deselect animations, using offset------//	
	 Select:
	    NULL A 0 A_PlaySound("WeaponSelect")
		DF09 A 1 offset(27, 68)
		DF09 A 1 offset(21, 60)
		DF09 A 1 offset(15, 52)
		DF09 A 1 offset(9, 44)
		DF09 A 1 offset(3, 36)	
		DF09 AAAAAAAAAAAAAAAAAAAA 0 A_Raise
	    DF09 A 1 A_Raise
	    Goto Select+5
	  Deselect:
	    DF09 A 1 offset(3, 36)
		DF09 A 1 offset(9, 44)
		DF09 A 1 offset(15, 52)
		DF09 A 1 offset(21, 60)
		DF09 A 1 offset(27, 68)
		TNT1 A 0 A_TakeInventory("UseAmmo", 999)
		DF09 AAAAAAAAAAAAAAAAAAA 0 A_Lower
	    DF09 A 1 A_Lower
		Goto Deselect+6
	//-----------------------------------------------------------------//	
//------------------------------------------------------------------//		
	 Fire:
	    TNT1 A 0 A_JumpIfInventory("PowerWeaponsSuper", 1, "FastFire")
	    NULL A 0 A_JumpIfNoAmmo("OutOfAmmo")
	    NULL A 0 A_PlaySound("AssaultPlasmaFire")
	    DF09 B 1 Bright A_FireCustomMissile("AssaultPlasmaBall", 1, 1, 12, -3)
		DF09 B 7 Bright
		NULL A 0 A_ReFire
		Goto Ready
		
		//-------------Weapon Supercharge-------------//
		FastFire:
		TNT1 A 0 A_JumpIfInventory("UseAmmo", 1, "FastFireUseAmmo")
		NULL A 0 A_JumpIfNoAmmo("OutOfAmmo")
	    NULL A 0 A_PlaySound("AssaultPlasmaFire")
	    DF09 B 1 Bright A_FireCustomMissile("AssaultPlasmaBall", 1, 0, 12, -3)
		TNT1 A 0 A_GiveInventory("UseAmmo", 1)
		DF09 B 3 Bright
		NULL A 0 A_ReFire
		Goto Ready
		FastFireUseAmmo:
		NULL A 0 A_JumpIfNoAmmo("OutOfAmmo")
	    NULL A 0 A_PlaySound("AssaultPlasmaFire")
	    DF09 B 1 Bright A_FireCustomMissile("AssaultPlasmaBall", 1, 1, 12, -3)
		TNT1 A 0 A_TakeInventory("UseAmmo", 1)
		DF09 B 3 Bright
		NULL A 0 A_ReFire
		Goto Ready
//----------------------------------------------------------------------------//

//----------------------Alt-Fire----------------------------------------------//	
	AltFire:
	    TNT1 A 0 A_JumpIfInventory("PowerWeaponsSuper", 1, "FastAltFire")
	    NULL A 0 A_JumpIfNoAmmo("OutOfAmmo")
	    DF09 C 8 Bright
		NULL A 0 A_PlaySound("AssaultMissileFire")
		DF09 D 1 A_FireCustomMissile("AssaultMissile", 1, 1, 15, 0)
		DF09 D 20 Bright
		DF09 A 15
		Goto Ready
		
		//---------Weapon Supercharge---------//
		FastAltFire:
		TNT1 A 0 A_JumpIfInventory("UseAmmo", 1, "FastAltFireUseAmmo")
	    NULL A 0 A_JumpIfNoAmmo("OutOfAmmo")
	    DF09 C 4 Bright
		NULL A 0 A_PlaySound("AssaultMissileFire")
		DF09 D 1 A_FireCustomMissile("AssaultMissile", 1, 0, 15, 0)
		TNT1 A 0 A_GiveInventory("UseAmmo", 1)
		DF09 D 12 Bright
		DF09 A 6
		Goto Ready
		
		FastAltFireUseAmmo:
	    NULL A 0 A_JumpIfNoAmmo("OutOfAmmo")
	    DF09 C 4 Bright
		NULL A 0 A_PlaySound("AssaultMissileFire")
		DF09 D 1 A_FireCustomMissile("AssaultMissile", 1, 1, 15, 0)
		TNT1 A 0 A_TakeInventory("UseAmmo", 1)
		DF09 D 12 Bright
		DF09 A 6
		Goto Ready
//----------------------------------------------------------------------------//
     //------------Out of Ammo------------//
	 OutOfAmmo:
	    DF09 A 2 A_WeaponReady
		DF09 A 0 A_PlaySound("AssaultOut")
		Goto Ready
	//-------------------------------------//	
	//----Ahhh, ok. It's Spawn on map too)----//
	Spawn:
	    DFW5 B -1
		Stop
	//----------------------------------------//	
		}
}


Actor AssaultPlasmaBall
{
	Radius 4
	Height 4
	Speed 60
	scale 1.0
	Damage (30)
	Projectile
	+NOGRAVITY
	DeathSound "MortarGunExplode"
	States
	{
	Spawn: 
		DFP8 ABCD 3 Bright 
		Loop
	Death:
		DFP8 EFGHIJ 3 Bright
		Stop
	XDeath:
		DFP8 EFGHIJ 3 Bright
		Stop	
	}
}

Actor AssaultMissile
{
	Radius 5
	Height 5
	Speed 30
	scale 1.0
	Damage (60)
	Projectile
	+NOGRAVITY
	SeeSound "AssaultRocket"
	ActiveSound "AssaultRocket"
	DeathSound "MortarGunExplode"
	States
	{
	Spawn: 
		DFP9 AB 10 Bright A_LoopActiveSound
		Loop
	Death:
	    NULL A 1 A_Explode(60, 200)
		DFP9 CDEFGHIJKLMN 3 Bright
	    Stop
	XDeath:
	    NULL A 1 A_Explode(60, 200)
	    DFP9 CDEFGHIJKLMN 3 Bright
	    Stop	
	}
}
