/*
CREDITS:

Sprites - Marty Kirra

Up - Valve (Half-Life 2)
Fire - ? (Gigantic mashup of sounds, sigh.
*/

ACTOR Hydra : Weapon //BERNI KRZYKACZ!
{
  Inventory.PickupSound "misc/w_pkup"
  Inventory.PickupMessage "You got the ''Hydra'' burstshot pistol! Insert some lame pun here. (2)"
  Obituary "%o ended like a mythical hero which underestimated %k's ''Hydra''."
  Weapon.UpSound "Weapons/HydraUp"
  Weapon.SelectionOrder 6
  Weapon.AmmoGive 0
  Weapon.AmmoType "Boolet"
  Weapon.AmmoUse 1
  Weapon.Kickback 65
  Weapon.SlotNumber 2
  //+NOAUTOFIRE
  +WEAPON.CHEATNOTWEAPON
  States
  {
  //SINGLE PISTLO
  
   Ready:
      TNT1 A 0 A_JumpIfInventory("BasicUpgrade",1,"ZweiReady")
      XPSG DCA 2
   ReadyMain:
      TNT1 A 0 A_JumpIfInventory("BasicUpgrade",1,"ZweiActivate")
      XPSG A 1 A_WeaponReady
      Loop
   Deselect:
      TNT1 A 0 A_ZoomFactor(1)
      TNT1 A 0 A_JumpIfInventory("BasicUpgrade",1,"ZweiDeselect")
      XPSG A 1 A_Lower
      XPSG A 0 A_Lower
      Loop
   Select:
      TNT1 A 0 A_JumpIfInventory("BasicUpgrade",1,"ZweiSelect")
      XPSG A 1 A_Raise
      XPSG A 0 A_Raise
      Loop
   Fire:
      TNT1 A 0 A_GiveInventory("BooletCasing")
      TNT1 A 0 A_PlaySound("Weapons/HydraAdd",6,0.9)
      TNT1 A 0 A_PlaySound("Weapons/HydraFire",1)
      TNT1 A 0 A_AlertMonsters
      TNT1 A 0 A_JumpIfInventory("CaliberUpgrade",1,"CFire")
      TNT1 A 0 A_FireBullets(1.5,0.5,5,9,"BulletPuff",1)
   Rest:
      XPSF A 1 Bright A_SetPitch(Pitch-0.2)
      XPSF A 0 Bright A_SetAngle(Angle-0.2)
      XPSG DBC 1
      XPSG A 1
	  XPSG A 2 A_ReFire
      Goto ReadyMain
   CFire:
      TNT1 A 0 A_PlaySound("Weapons/WolgirHEndFire",4,0.6)
      TNT1 A 0 A_FireBullets(1.5,0.5,5,18,"CaliberPuff",1)
      Goto Rest
  
  //DOUBLE PISTLO
  
  ZweiSelect:
    XP3G A 0 A_Raise
	XP3G A 1 A_Raise
    Loop
  ZweiDeselect:
	TNT1 A 0 A_TakeInventory("SynthFireActive",1)
	TNT1 A 0 A_TakeInventory("SynthFireLeft",1)
	TNT1 A 0 A_TakeInventory("SynthFireRight",1)
  Zweihander:
    XP3G Z 0 A_Lower
    XP3G A 1 A_Lower
	Loop
  ZweiReady:
    XP3G CBA 2
  ZweiActivate:
  	XP3G A 0 A_GiveInventory("SynthFireActive",1)
	XP3G A 0 ACS_ExecuteAlways(720)
	XP3G A 0 ACS_ExecuteAlways(721)
	XP3G A 0 A_Gunflash
	Goto LIdle
	
  //LEFT PISTLO
  
  LIdle:
	  XP2G A 0 A_JumpIfInventory("SynthFireLeft",1,"LFire")
      XP2G A 1 A_WeaponReady(WRF_NOFIRE)
      Loop
  LFire:
      XP2G A 1 A_JumpIfInventory("Boolet",1,1)
	  Goto LIdle
      TNT1 A 0 A_GiveInventory("BooletCasing")
      TNT1 A 0 A_PlaySound("Weapons/HydraAdd",6,0.9)
      TNT1 A 0 A_PlaySound("Weapons/HydraFire",1)
      TNT1 A 0 A_AlertMonsters
      TNT1 A 0 A_JumpIfInventory("CaliberUpgrade",1,"CFireLeft")
      TNT1 A 0 A_FireBullets(1.5,0.5,5,9,"BulletPuff",1)
  LRest:
      XP2F A 1 Bright A_SetPitch(Pitch-0.2)
      XP2F A 0 Bright A_SetAngle(Angle+0.2)
      XP2G DBC 1
      XP2G A 1
	  XP2G A 2 A_JumpIfInventory("SynthFireLeft",1,"LFire")
      Goto LIdle
  CFireLeft:
      TNT1 A 0 A_PlaySound("Weapons/WolgirHEndFire",4,0.6)
      TNT1 A 0 A_FireBullets(1.5,0.5,5,18,"CaliberPuff",1)
      Goto LRest
  
  //RIGHT PISTLO
  
  Flash:
	TNT1 A 0 A_Light0 //I guess you put here the equal amount of time to the tics of select animation
  RIdle:
	XP1G A 0 A_JumpIfInventory("SynthFireRight",1,"RFire")
    XP1G A 1 //A_WeaponReady(WRF_NOFIRE) I'd put it here as well, but then the deselect screws up.
    Loop
  RFire:
    XP1G A 1 A_JumpIfInventory("Boolet",1,1)
	Goto RIdle
    TNT1 A 0 A_GiveInventory("BooletCasing")
    TNT1 A 0 A_PlaySound("Weapons/HydraAdd",6,0.9)
    TNT1 A 0 A_PlaySound("Weapons/HydraFire",1)
    TNT1 A 0 A_AlertMonsters
    TNT1 A 0 A_JumpIfInventory("CaliberUpgrade",1,"CFireRight")
    TNT1 A 0 A_FireBullets(1.5,0.5,5,9,"BulletPuff",1)
  RRest:
    XP1F A 1 Bright A_SetPitch(Pitch-0.2)
    XP1F A 0 Bright A_SetAngle(Angle-0.2)
    XP1G DBC 1
    XP1G A 1
	XP1G A 2 A_JumpIfInventory("SynthFireRight",1,"RFire")
    Goto RIdle
  CFireRight:
    TNT1 A 0 A_PlaySound("Weapons/WolgirHEndFire",4,0.6)
    TNT1 A 0 A_FireBullets(1.5,0.5,5,18,"CaliberPuff",1)
    Goto RRest
  Spawn:
    XPSG X -1
    Stop
	}
}