// --------------------------------------------------------------------------
//
//	Flame Cannon
//
// --------------------------------------------------------------------------

ACTOR DualUFlameCannon : BaseWeapon
{
	Weapon.AmmoUse 0
	Weapon.AmmoGive 50
	Weapon.AmmoType "Gasoline"
	Weapon.SelectionOrder 5550
	Obituary "%o was burned to ashes by %k's flame cannons."
	Inventory.PickupSound "CLIPINSS"
	Inventory.PickupMessage "You got the Mancubus Flame Cannon!"
	-WEAPON.CHEATNOTWEAPON
	+POWERED_UP
	Weapon.SisterWeapon "U_FlameCannon"
	tag "Dual Flame Cannons"
	States
	{
	Spawn:
		MANA H -1
		Stop
		
	Select:
		TNT1 A 0 A_JumpIfInventory("IsPlayingAsPurist", 1, "PuristGun")
		TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(1002,7)==0, "PuristGun")
		TNT1 A 0 A_Giveinventory("FlameCannonSelected",1)
		TNT1 A 0 A_Giveinventory("GoSpecial",1)
		TNT1 A 0 A_Takeinventory("Unloading",1)
		TNT1 A 0 A_Takeinventory("Reloading",1)
		TNT1 A 0 A_TakeInventory("TossGrenade", 1)
		TNT1 A 0 A_Takeinventory("WeapSpecial",1)
		TNT1 A 0 A_Takeinventory("SwitchFlashlight",1)
		TNT1 A 0 A_Takeinventory("Taunting",1)
		TNT1 A 0 A_Takeinventory("IdleCounter",200)
		TNT1 A 4
		TNT1 A 0 A_Raise
		Wait
		
	Deselect:
		FLMD DEFGHI 1
		TNT1 A 0 A_TakeInventory("FlameCannonSelected", 1)
		TNT1 A 0 A_Lower
		Wait
		
	Ready:
		TNT1 A 0 A_JumpIfInventory("GoFatality", 1, "Steady")
		TNT1 A 0 A_PlaySound("CLIPINSS")
	Ready1:
		FLMD IHGFED 1
	Ready2:
		TNT1 A 0 //A_GunFlash
		TNT1 A 0 A_JumpIfInventory("Kicking",1,"DoKick")
		TNT1 A 0 A_JumpIfInventory("Taunting",1,"Taunt")
		TNT1 A 0 A_JumpIfInventory("Salute1",1,"Salute")
		TNT1 A 0 A_JumpIfInventory("Salute2",1,"Salute")
		TNT1 A 0 A_JumpIfInventory("TossGrenade",1,"TossGrenade")
		TNT1 A 0 A_JumpIfInventory("IdleCounter",200,"PlayerIsIdle")
		FLMD A 2 A_WeaponReady
		Goto Ready2
		
	PuristGun:
		TNT1 A 0 A_TakeInventory("U_FlameCannon", 1)
		Goto Deselect
		
// --------------------------------------------------------------------------
//
//	Fire
//
// --------------------------------------------------------------------------
		
	Fire:
		TNT1 A 0 A_JumpIfInventory("Gasoline", 6, 2)
		TNT1 A 0 A_StopSound(CHAN_WEAPON)
		Goto DryFire
		TNT1 A 0 A_FireCustomMissile("U_FlamethrowerMissile", 0, 1, 10, 0)
		TNT1 A 0 A_PlaySound("FLAMER", CHAN_WEAPON, 1, 1)
		TNT1 A 0 A_TakeInventory("Gasoline", 3)
		FLMD B 1 BRIGHT A_SetAngle(frandom(2, -2) + angle)
		TNT1 A 0 A_TakeInventory("Gasoline", 3)
		TNT1 A 0 A_FireCustomMissile("U_FlamethrowerMissile", 0, 1, -10, 0)
		FLMD C 1 BRIGHT A_SetPitch(frandom(2, -2) + pitch)
		TNT1 A 0 A_ReFire
		TNT1 A 0 A_PlaySound("FLAMSTOP", CHAN_WEAPON)
		Goto Ready2

	AltFire:
		TNT1 A 0 A_JumpIfInventory("Gasoline", 24, 2)
		TNT1 A 0 A_StopSound(CHAN_WEAPON)
		Goto DryFire
		FLMD B 1 BRIGHT
		TNT1 A 0 A_FireCustomMissile("U_BigFireBall", 0, 1, 10, 0)
		TNT1 A 0 A_FireCustomMissile("U_BigFireBall", 0, 1, -10, 0)
		TNT1 A 0 A_SetPitch(-6.0 + pitch)
		TNT1 A 0 A_TakeInventory("Gasoline", 24)
		TNT1 A 0 A_FireCustomMissile("ShakeYourAssDouble", 0, 0, 0, 0)
		FLMD CB 1 BRIGHT 
		FLMD AA 1 A_SetPitch(+3.0 + pitch)
		FLMD A 10
		TNT1 A 0 A_ReFire
		Goto Ready2
		
	DryFire:
		FLMD A 10 A_PlaySound("weapons/empty")
		Goto Ready2
		
// --------------------------------------------------------------------------
//
//	End Stuff
//
// --------------------------------------------------------------------------
		
	KickFlash:
		FLMD JKLMN 1
		FLMD O 7
		FLMD NMLKJ 1
		FLMD A 1
		Stop
		
	AirKickFlash:
		FLMD JKLMN 1
		FLMD O 9
		FLMD NMLKJ 1
		FLMD A 1
		Stop
		
	Taunt:
		FLMD A 5
		TNT1 A 0 A_PlaySound("FUCK",2)
		TNT1 A 0 A_FireCustomMissile("Taunter",0,0,-1,0)
		TNT1 A 0 A_FireCustomMissile("Taunter",-9,0,-1,0)
		TNT1 A 0 A_FireCustomMissile("Taunter",9,0,-1,0)
		TNT1 A 0 A_AlertMonsters
		FLMD A 20
		TNT1 A 0 A_Takeinventory("Taunting",1)
		Goto Ready2

	GrenadeFlash:
		FLMD DEFGHI 1
		Stop
	}
}