/*
CREDITS:

Sprites - Marty Kirra

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

ACTOR BernieScreamer : Weapon //BERNI KRZYKACZ!
{
  Tag "Bernie Screamer"
  Inventory.PickupSound "misc/w_pkup"
  Inventory.PickupMessage "You got the ''Bernie Screamer'' revolver! (2)"
  Obituary "AND THE PANTS WERE DEAD, so %k freeman shoot his gun - really fast, killing %o with ''Bernie Screamer''." //No one will really play this mod in deathmatch. If you read this then your dumb.
  Weapon.UpSound "Weapons/BernieUp"
  Weapon.SelectionOrder 6
  Weapon.AmmoType "Boolet"
  Weapon.AmmoGive 0
  Weapon.AmmoUse 1
  Weapon.AmmoType2 "Boolet"
  Weapon.AmmoUse2 1
  Weapon.Kickback 150
  Weapon.SlotNumber 2
  AttackSound ""
  +WEAPON.CHEATNOTWEAPON
  States
  {
  //SINGLE LEVORVEL
  
   Ready:
      TNT1 A 0 A_JumpIfInventory("BasicUpgrade",1,"ZweiReady")
      REVG A 5
      REVG CDACDACDA 1
   ReadyMain:
      TNT1 A 0 A_JumpIfInventory("BasicUpgrade",1,"ZweiActivate")
      REVG A 1 A_WeaponReady
      Loop
   Deselect:
      TNT1 A 0 A_ZoomFactor(1)
      TNT1 A 0 A_JumpIfInventory("BasicUpgrade",1,"ZweiDeselect")
      REVG A 1 A_Lower
      REVG A 0 A_Lower
      Loop
   Select:
      TNT1 A 0 A_JumpIfInventory("BasicUpgrade",1,"ZweiSelect")
      REVG A 1 A_Raise
      REVG A 0 A_Raise
      Loop
   Fire:
      TNT1 A 0 A_GiveInventory("BooletCasing")
      REVF A 0 A_Recoil(2.5)
      REVF A 0 A_PlaySound("Weapons/BernieFire",1,0.6)
      REVF A 0 A_PlaySound("Weapons/ErasusAmbient",5,0.8)
      REVF A 0 A_JumpIfInventory("CaliberUpgrade",1,"CFire")
      REVF A 0 A_FireBullets(2.0,1.0,1,100,"BulletPuff",1)
   Rest:
	  REVF A 0 A_Light2
      REVF A 0 A_ZoomFactor(0.98)
      REVF A 1 Bright A_SetPitch(pitch-1.2)
	  REVF A 0 Bright A_SetAngle(angle-1.0)
      REVF A 0 A_ZoomFactor(0.985)
      REVF B 1 Bright A_SetPitch(pitch-0.6)
	  REVF B 0 Bright A_SetAngle(angle-0.5)
      REVF A 0 A_Light1
      REVC C 1 A_ZoomFactor(0.99)
      REVC D 1 A_ZoomFactor(0.995)
      REVC E 1 A_ZoomFactor(1)
      REVF A 0 A_Light0
      REVC FGHI 1
      REVG CDA 2
      REVG A 4 A_ReFire
      Goto ReadyMain
   CFire:
      REVF A 0 A_PlaySound("Weapons/WolgirHEndFire",6,0.7)
      REVF A 0 A_FireBullets(2.0,1.0,-1,200,"CaliberPuff",1)
      Goto Rest
  
  //DOUBLE LEVORVEL
  
  ZweiSelect:
    RE2G Z 0 A_Raise
	RE2G Z 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:
    RE2G Z 0 A_Lower
    RE2G A 1 A_Lower
	Loop
  ZweiReady:
    RE3G A 5
    RE3G CDACDACDA 1
  ZweiActivate:
  	RE2G A 0 A_GiveInventory("SynthFireActive",1)
	RE2G A 0 ACS_ExecuteAlways(720)
	RE2G A 0 ACS_ExecuteAlways(721)
	RE2G A 0 A_Gunflash
	Goto LIdle
	
  //LEFT LEVORVEL
  
  LIdle:
	RE2G A 0 A_JumpIfInventory("SynthFireLeft",1,"LFire")
    RE2G A 1 A_WeaponReady(WRF_NOFIRE)
    Loop
  LFire:
    RE2G A 1 A_JumpIfInventory("Boolet",1,1)
	Goto LIdle
    TNT1 A 0 A_GiveInventory("BooletCasing")
    RE2F A 0 A_Recoil(2.5)
    RE2F A 0 A_PlaySound("Weapons/BernieFire",1,0.6)
    RE2F A 0 A_PlaySound("Weapons/ErasusAmbient",5,0.8)
    RE2F A 0 A_JumpIfInventory("CaliberUpgrade",1,"CFireLeft")
    RE2F A 0 A_FireBullets(2.0,1.0,-1,100,"BulletPuff",1)
   LRest:
    RE2F A 0 A_Light2
    RE2F A 0 A_ZoomFactor(0.98)
    RE2F A 1 Bright A_SetPitch(pitch-1.2)
	RE2F A 0 Bright A_SetAngle(angle+1.0)
    RE2F A 0 A_ZoomFactor(0.985)
    RE2F B 1 Bright A_SetPitch(pitch-0.6)
	RE2F B 0 Bright A_SetAngle(angle+0.5)
    RE2F A 0 A_Light1
    RE2C C 1 A_ZoomFactor(0.99)
    RE2C D 1 A_ZoomFactor(0.995)
    RE2C E 1 A_ZoomFactor(1)
    REVF A 0 A_Light0
    RE2C FGHI 1
    RE2G CDA 2
    RE2G A 4 A_JumpIfInventory("SynthFireLeft",1,"LFire")
    Goto LIdle
   CFireLeft:
    REVF A 0 A_PlaySound("Weapons/WolgirHEndFire",6,0.7)
    REVF A 0 A_FireBullets(2.0,1.0,-1,200,"CaliberPuff",1)
    Goto LRest
  
  //RIGHT LEVORVEL
  
   Flash:
	TNT1 A 0 A_Light0 //I guess you put here the equal amount of time to the tics of select animation
   RIdle:
	REVG A 0 A_JumpIfInventory("SynthFireRight",1,"RFire")
	REVG A 1
    Loop
  RFire:
    RE2G A 1 A_JumpIfInventory("Boolet",1,1)
	Goto RIdle
    TNT1 A 0 A_GiveInventory("BooletCasing")
    REVF A 0 A_Recoil(2.5)
    REVF A 0 A_PlaySound("Weapons/BernieFire",1,0.6)
    REVF A 0 A_PlaySound("Weapons/ErasusAmbient",5,0.8)
    REVF A 0 A_JumpIfInventory("CaliberUpgrade",1,"CFireRight")
    REVF A 0 A_FireBullets(2.0,1.0,-1,100,"BulletPuff",1)
   RRest:
    REVF A 0 A_Light2
    REVF A 0 A_ZoomFactor(0.98)
    REVF A 1 Bright A_SetPitch(pitch-1.2)
	REVF A 0 Bright A_SetAngle(angle-1.0)
    REVF A 0 A_ZoomFactor(0.985)
    REVF B 1 Bright A_SetPitch(pitch-0.6)
	REVF B 0 Bright A_SetAngle(angle-0.5)
    REVF A 0 A_Light1
    REVC C 1 A_ZoomFactor(0.99)
    REVC D 1 A_ZoomFactor(0.995)
    REVC E 1 A_ZoomFactor(1)
    REVF A 0 A_Light0
    REVC FGHI 1
    REVG CDA 2
    REVG A 4 A_JumpIfInventory("SynthFireRight",1,"RFire")
    Goto RIdle
   CFireRight:
    REVF A 0 A_PlaySound("Weapons/WolgirHEndFire",6,0.7)
    REVF A 0 A_FireBullets(2.0,1.0,-1,200,"CaliberPuff",1)
    Goto RRest
  Spawn:
    TNT1 A -1
    Stop
	}
}