//no push mod for djb's lca

ACTOR "Legendary Revolver" : Weapon 
{
   Tag "Legendary Revolver"
   Scale 0.50
   Weapon.PreferredSkin "Handgun-Marine"
   Weapon.SelectionOrder 19
   Weapon.KickBack 160
   Inventory.PickupSound "revspin"
   Weapon.AmmoGive2 12
   Weapon.AmmoUse 1
   Weapon.AmmoType "LEGENDARYRevolverSpinner"
   Weapon.AmmoType2 "LegendaryBulletMag"
   Inventory.Pickupmessage "Legendary Revolver! Get ready to be rekt."
   Obituary "%o was gibbed to death by A Powerful shot from  %K's Legendary Revolver ." 
   +NOAUTOFIRE
   +WEAPON.AMMO_OPTIONAL
   +WEAPON.NOALERT
   +INVENTORY.UNDROPPABLE
   States 
   { 
   Spawn: 
      LRVI A -1 
      Stop
   Ready:
	  LRVL ABCD 1
	  LRSU AB 5
	  LRSU C 5 A_PlaySound("REVCLOSE")
	  TNT1 A 0 A_PlayWeaponSound("revspin")
	  TNT1 A 0 A_JumpIfInventory("HandGrenadeAction",1,"GrenadeCheck")
	  TNT1 A 0 A_JumpIfInventory("MineAction",1,"MineCheck")
	  LRVL E 1 A_WeaponReady
	 Goto Ready+8
   Deselect:
	  TNT1 A 0 A_PlayWeaponSound("weapons/weapondown")
      LRVL E 1 A_Lower
   Goto Deselect+1
	QuickSwitch:
    TNT1 A 0 A_PlayWeaponSound("weapons/quickswitch")
    LRVL E 1 A_Lower
	TNT1 A 0 A_Lower
    Goto QuickSwitch+1
   Select:
	  TNT1 A 0 A_Raise
      Wait
   Fire:
	  TNT1 A 0 A_JumpIfNoAmmo("Empty")
	  TNT1 A 0 A_PlaySound("revfire")
	  TNT1 A 0 A_AlertMonsters
	  TNT1 A 0 Radius_Quake(1,2,0,1,0)	  	
      TNT1 A 0 A_FireCustomMissile("BlueSGTracer",0,0,0,0)
	  //TNT1 A 0 A_FireBullets(0, 0, -1,Random(160,260),"LegendaryRevBulletPuff")
	  TNT1 A 0 Bright A_FireCustomMissile("160-260Bullet", 0, true, 0, 8, false, 0)
	  TNT1 A 0 A_Light1
	  LRVL F 1 Bright A_GunFlash
	  TNT1 A 0 A_Light0
	  TNT1 A 0 
	  LRVL G 5
	  LRVL G 1 A_WeaponReady
	  Goto Ready+8
   Empty:
      LRVL E 1 A_PlayWeaponSound("weapons/click")
   AltFire:
  	  TNT1 A 0 A_JumpIfInventory("LEGENDARYRevolverSpinner",6,2)
      TNT1 A 0 A_JumpIfInventory("LegendaryBulletMag",1,2)
	  TNT1 A 0
	  Goto Ready+8
	  LRVL HIJKL 2 
	  LRVL M 1 A_PlaySound("REVOPEN")
	  LRVL N 2 A_JumpIfInventory("LEGENDARYRevolverSpinner",1,"MaxReload")
	  TNT1 A 0 A_JumpIfInventory("LegendaryBulletMag",1,"Reload2")
   Reload:
	  TNT1 A 0 A_TakeInventory("LegendaryBulletMag",1)
	  TNT1 A 0 A_GiveInventory("LEGENDARYRevolverSpinner",1)
	  TNT1 A 0 A_JumpIfInventory("LEGENDARYRevolverSpinner", 6,2)
	  TNT1 A 0 A_JumpIfInventory("LegendaryBulletMag",1,"Reload")
	  TNT1 A 0
	  Goto Ready+8
   MaxReload:
      LRVL NNNNNN 0 A_SpawnItemEx("LEGBulletCasing",30,0,30,Random(2,4),Random(3,6),Random(3,6),0)
	  LRVL N 10 A_PlaySound("REVEJECT")
	  LRVL OPQR 2
	  LRVL ST 5 A_PlaySound("REVINSR")
	  LRVL U 5
	  LRSU AB 5
	  LRSU C 5 A_PlaySound("REVCLOSE")
	  TNT1 A 3 A_JumpIfInventory("LegendaryBulletMag",1,"Reload")
   Reload2:
	  TNT1 A 0 A_TakeInventory("LegendaryBulletMag",1)
	  TNT1 A 0 A_GiveInventory("LEGENDARYRevolverSpinner",1)
	  TNT1 A 0 A_JumpIfInventory("LEGENDARYRevolverSpinner",6,"Full")
	  TNT1 A 0 A_JumpIfInventory("LegendaryBulletMag",1,"Reload2")
   Full:
      LRVL NNNNNN 0 A_SpawnItemEx("LEGBulletCasing",30,0,30,Random(2,4),Random(3,6),Random(3,6),0)
	  LRVL N 10 A_PlaySound("REVEJECT")
	  LRVL OPQR 2
	  LRVL ST 5 A_PlaySound("REVINSR")
	  LRVL U 5
	  LRSU AB 5
	  LRSU C 5 A_PlaySound("REVCLOSE")
	  LRVL E 1 A_PlayWeaponSound("revspin")
	  Goto Ready+8
	QuickSwitch:
    TNT1 A 0 A_PlayWeaponSound("weapons/quickswitch")
    LRVL E 1 A_Lower
	TNT1 A 0 A_Lower
    Goto QuickSwitch+1
  GrenadeCheck:
	TNT1 A 0 A_JumpIfInventory("HandGrenadeAmmo",1,"GrenadeToss")
	TNT1 A 0 A_TakeInventory("HandGrenadeAction",1)
	Goto Ready+8
  GrenadeToss:
  	TNT1 A 0 A_PlayWeaponSound("weapons/weapondown") 
	LRVT ABCDEFGH 1
	TNT1 A 6
	HGRN ABC 1
	HGRN D 3
	HGRN EFGHI 2
	TNT1 A 14 A_PlayWeaponSound("weapons/hgrenadepin")
	TNT1 A 0 A_PlayWeaponSound("weapons/hgrenadethrow")
	TNT1 A 0 A_TakeInventory("HandGrenadeAmmo",1)
	HGRN J 1 A_FireCustomMissile("ThrownGrenade",0,0,0,0)
	HGRN KLM 2
	TNT1 A 6
	TNT1 A 0 A_JumpIfInventory("HandGrenadeAmmo",1,2)
    TNT1 A 0 A_TakeInventory("Hand Grenade",1)
	TNT1 A 0 A_TakeInventory("HandGrenadeAction",1)
    LRVT HGFEDCBA 1
	Goto Ready+8
  MineCheck:
	TNT1 A 0 A_JumpIfInventory("MineAmmo",1,"MineToss")
	TNT1 A 0 A_TakeInventory("MineAction",1)
	Goto Ready+8
  MineToss:
  	TNT1 A 0 A_PlayWeaponSound("weapons/weapondown") 
	LRVT ABCDEFGH 1
	TNT1 A 10
	TNT1 A 0 A_PlayWeaponSound("weapons/hgrenadethrow")
	MINE ABCDEF 1		
	TNT1 A 0 A_TakeInventory("MineAmmo",1)	  
	MINE G 1 A_FireCustomMissile("ThrownMine",0,0,0,0)
	MINE HI 1
	MINE JK 2
	TNT1 A 0 A_JumpIfInventory("MineAmmo",1,2)
    TNT1 A 0 A_TakeInventory("Land Mine",1)
	TNT1 A 0 A_TakeInventory("MineAction",1) 
	LRVT HGFEDCBA 1
	Goto Ready+8  
 }
}

ACTOR "Legendary Sawed-Off Shotgun" : Weapon
{
  Scale 0.85
  Weapon.PreferredSkin "DoubleBarrelSG-Marine"
  Weapon.SelectionOrder 400
  Weapon.KickBack 100
  Weapon.AmmoUse 0
  Weapon.AmmoGive 0
  Weapon.AmmoGive2 8
  Weapon.AmmoType "LegendaryPellets"
  Weapon.AmmoType2 "LegendaryShell"
  Inventory.PickupMessage "Legendary Super Shotgun"
  Inventory.PickupSound "Pickups/LegSSG"
  Obituary "%o now got legendary holes by %k's Legendary Super Shotgun."
  Decal LegBulletChip
  +WEAPON.AMMO_OPTIONAL
  +WEAPON.NOALERT
  +INVENTORY.UNDROPPABLE
  States
  {
  Ready:
    TNT1 A 0 A_PlayWeaponSound("Pickups/LegSSG")
	LSSZ ACEGIKMO 1
	TNT1 A 0 A_JumpIfInventory("LegendaryPellets",2,"Ready2")
	TNT1 A 0 A_JumpIfInventory("LegendaryPellets",1,"Ready3")
	TNT1 A 0 A_JumpIfInventory("HandGrenadeAction",1,"GrenadeCheck")
	TNT1 A 0 A_JumpIfInventory("MineAction",1,"MineCheck")
    LSSD A 1 A_WeaponReady
    Goto Ready+11
  Ready2:
  	TNT1 A 0 A_JumpIfInventory("HandGrenadeAction",1,"GrenadeCheck")
	TNT1 A 0 A_JumpIfInventory("MineAction",1,"MineCheck")
    LSSD A 1 A_WeaponReady
    Goto Ready+11
  Ready3:
  	TNT1 A 0 A_JumpIfInventory("HandGrenadeAction",1,"GrenadeCheck")
	TNT1 A 0 A_JumpIfInventory("MineAction",1,"MineCheck")
    LSSD A 1 A_WeaponReady
    Goto Ready+11
  Deselect: 
    TNT1 A 0 A_PlayWeaponSound("weapons/weapondown")
	TNT1 A 0 A_JumpIfInventory("LegendaryPellets",2,"Deselect2")
	TNT1 A 0 A_JumpIfInventory("LegendaryPellets",1,"Deselect3")
    LSSD A 1 A_Lower
    Goto Deselect+3
  Deselect2: 
    TNT1 A 0 A_PlayWeaponSound("weapons/weapondown")
    LSSD A 1 A_Lower
    Goto Deselect2+1
  Deselect3: 
    TNT1 A 0 A_PlayWeaponSound("weapons/weapondown")
    LSSD A 1 A_Lower
    Goto Deselect3+1
  Select:
	TNT1 A 0 A_Raise
    Wait
  Fire:
	TNT1 A 0 A_JumpIfInventory("LegendaryPellets",2,"FireBoth")
	TNT1 A 0 A_JumpIfInventory("LegendaryShell",1,"Reload")
	Goto Empty
  FireBoth:
    TNT1 A 0 A_AlertMonsters
    TNT1 A 0 A_GunFlash
	TNT1 A 0 A_Light1
	TNT1 A 0 A_PlaySound("Weapons/LegSGboth")
	TNT1 A 0 Radius_Quake(10,5,0,1,0)
	TNT1 A 0 A_TakeInventory("LegendaryPellets",2)
	TNT1 AAAAAAAA 0 Bright A_FireCustomMissile("BlueSGTracer",Random(8,-8),0,0,Random(8,-8))
    //LSSF A 1 Bright A_FireBullets(6.2,3.1,26,25,"LegendaryASGBulletPuff")
	LSSF AAAAAAAAAAAAAAAAAAAAAAAAAA 0 Bright A_FireCustomMissile("25Bullet", frandom(-6.2, 6.2), false, 0, 8, false, frandom(-3.1, 3.1))
    LSSF B 1 A_Recoil(16)
	LSSF CD 1 Bright A_Light2
	LSSF E 1 Radius_Quake(10,5,0,1,0)
	LSSF F 1
	LSSF GH 1 A_Light0
    LSSD AAAAAA 1
  SSGReloadCheck:
  	TNT1 A 0 A_JumpIfInventory("LegendaryShell",2,2)
	LSSC D 2
	Goto Ready+17
	TNT1 A 0
	Goto ReloadBoth+4
  AltFire:
    TNT1 A 0 A_JumpIfInventory("LegendaryPellets",2,"FireRight")
	TNT1 A 0 A_JumpIfInventory("LegendaryPellets",1,1)
	Goto Reload
    TNT1 A 0 A_PlaySound("Weapons/LegSGsingle")
    TNT1 A 0 A_AlertMonsters
    TNT1 A 0 A_GunFlash
	TNT1 A 0 A_Light1
    TNT1 A 0 Radius_Quake(10,5,0,1,0)
	TNT1 A 0 A_TakeInventory("LegendaryPellets",1)
	TNT1 AAAA 0 A_FireCustomMissile("BlueSGTracer",Random(6,-6),0,0,Random(6,-6))
    //L1SF A 1 Bright A_FireBullets(2.2,1.3,9,Random(24,28),"LegendaryASGBulletPuff")
	L1SF AAAAAAAAA 0 Bright A_FireCustomMissile("24-28Bullet", frandom(-2.2, 2.2), false, 0, 8, false, frandom(-1.3, 1.3))
	L1SF B 1 Bright A_Light2
	TNT1 A 0 A_Light0
	TNT1 A 0 A_Recoil(8)
	L1SF CDEF 1
	LSSD A 2
    Goto Ready+17
  FireRight:
    TNT1 A 0 A_PlaySound("Weapons/LegSGsingle")
    TNT1 A 0 A_AlertMonsters
    TNT1 A 0 A_GunFlash
	TNT1 A 0 A_Light1
    TNT1 A 0 Radius_Quake(10,5,0,1,0)
	TNT1 A 0 A_TakeInventory("LegendaryPellets",1)
	TNT1 AAAA 0 A_FireCustomMissile("BlueSGTracer",Random(6,-6),0,0,Random(6,-6))
    //L2SF A 1 Bright A_FireBullets(2.2,1.3,9,Random(24,28),"LegendaryASGBulletPuff")
	L1SF AAAAAAAAA 0 Bright A_FireCustomMissile("24-28Bullet", frandom(-2.2, 2.2), false, 0, 8, false, frandom(-1.3, 1.3))
	L2SF B 1 Bright A_Light2
	TNT1 A 0 A_Light0
	TNT1 A 0 A_Recoil(8)
	L2SF CDEF 1
	LSSD A 2
    Goto Ready+17
  Empty:
    TNT1 A 0 A_JumpIfInventory("LegendaryPellets",1,"Empty2")
    LSSD A 10 A_PlaySound("weapons/click")
	Goto Ready+17
  Empty2:
    LSSD A 10 A_PlaySound("weapons/click")
	Goto Ready+17
  Reload:
	TNT1 A 0 A_JumpIfInventory("LegendaryPellets",1,"ReloadRight")	
	TNT1 A 0 A_JumpIfInventory("LegendaryShell",2,"ReloadBoth")
	Goto Empty		
  ReloadBoth:
    TNT1 A 0 A_JumpIfInventory("LegendaryShell",2,1)
	Goto Ready+17
	LSSR EDCBA 1
	LSSR ABCDEF 1
	LSSR G 1 A_PlayWeaponSound("Weapons/LegSGopen")
	LSSR HI 1
	LSSR J 1
	TNT1 AA 0 A_SpawnItemEx("BlueShellCasing",25,-2,25,Random(2,4),Random(-3,-6),Random(3,6),0)
	LSS2 A 2
    LSS2 B 2
	LSS2 CD 2
	LSS2 EFG 1
    LSS2 H 1 A_PlayWeaponSound("Weapons/LegSGin")
	LSS2 IJKLMN 1
	TNT1 A 0 A_TakeInventory("LegendaryShell",2)
	TNT1 A 0 A_GiveInventory("LegendaryPellets",2)
	LSSR KKKK 2
	LSSC AC 1
	LSSC D 1 A_PlayWeaponSound("Weapons/LegSGclose")
	LSSC F 1
	LSSC GIJL 1
	LSSC MOPR 1
	Goto Ready+17
  ReloadRight:
    TNT1 A 0 A_JumpIfInventory("LegendaryShell",1,1)
	Goto Ready+17
	LSSR EDCBA 1
	LSSR ABCDEFGHI 1
    L2SR B 2 A_PlayWeaponSound("Weapons/LegSGopen")	
 	L2SR CCCCC 1
	L2SR D 2
	L2SR EF 2
	TNT1 A 0 A_SpawnItemEx("BlueShellCasing",25,-2,25,Random(2,4),Random(-3,-6),Random(3,6),0)
	L2SR GH 2
	L2SR I 1 A_PlayWeaponSound("Weapons/LegSGin")
	TNT1 A 0 A_TakeInventory("LegendaryShell",1)
	TNT1 A 0 A_GiveInventory("LegendaryPellets",1)
	LSSC AC 1
	LSSC D 1 A_PlayWeaponSound("Weapons/LegSGclose")
	LSSC F 1
	LSSC GIJL 1
	LSSC MOPR 1
	Goto Ready+17
  GrenadeCheck:
	TNT1 A 0 A_JumpIfInventory("HandGrenadeAmmo",1,"GrenadeToss")
	TNT1 A 0 A_TakeInventory("HandGrenadeAction",1)
	Goto Ready+17
  GrenadeToss:
  	TNT1 A 0 A_PlayWeaponSound("weapons/weapondown") 
	LSGN ABCDE 1
	TNT1 A 4
	HGRN ABC 1
	HGRN D 2
	HGRN EFG 1
	HGRN HI 2
	TNT1 A 15 A_PlayWeaponSound("weapons/hgrenadepin")
	TNT1 A 0 A_PlayWeaponSound("weapons/hgrenadethrow")
	TNT1 A 0 A_TakeInventory("HandGrenadeAmmo",1)
	HGNE A 1 A_FireCustomMissile("ThrownGrenade",0,0,0,0)
	HGRN J 1
	HGRN KLM 2
	HGRN NO 1
	TNT1 A 6
	TNT1 A 0 A_JumpIfInventory("HandGrenadeAmmo",1,2)
    TNT1 A 0 A_TakeInventory("Hand Grenade",1)
	TNT1 A 0 A_TakeInventory("HandGrenadeAction",1)
	TNT1 A 0
	LSGN EDCBA 1
	Goto Ready+17
  MineCheck:
	TNT1 A 0 A_JumpIfInventory("MineAmmo",1,"MineToss")
	TNT1 A 0 A_TakeInventory("MineAction",1)
	Goto Ready+17
  MineToss:
  	TNT1 A 0 A_PlayWeaponSound("weapons/weapondown") 
	LSGN ABCDE 1
	TNT1 A 8
	TNT1 A 0 A_PlayWeaponSound("weapons/hgrenadethrow")
	MINE ABCDEF 1		
	TNT1 A 0 A_TakeInventory("MineAmmo",1)	  
	MINE G 1 A_FireCustomMissile("ThrownMine",0,0,0,0)
	MINE HI 1
	MINE JK 2
	TNT1 A 0 A_JumpIfInventory("MineAmmo",1,2)
    TNT1 A 0 A_TakeInventory("Land Mine",1)
	TNT1 A 0 A_TakeInventory("MineAction",1)
	TNT1 A 0
	TNT1 A 5
	LSGN EDCBA 1
	Goto Ready+17
  Spawn:
    LSSW A -1
    Stop
    }
} 
 
actor "160-260Bullet" : FastProjectile {
    Scale 0.1
    Height 1
    Radius 1
    Damage (random(160,260))
    Speed 400
    Projectile
    Renderstyle ADD
    Species "Player"
    +FORCEXYBILLBOARD
    +DONTSPLASH
    +BloodSplatter
    +THRUSPECIES
    +NOTIMEFREEZE
    Decal LegBulletChip
    DamageType "Legendary"
    States {
    Spawn:
        TRAC A 1 BRIGHT
        Loop
    Death:
        PUFF A 0 A_SpawnItemEx("LegendaryASGBulletPuff")
        PUFF ABCD 4
        Stop
    XDeath:
        TNT1 A 0
        Stop
    }
}

actor "25Bullet" : FastProjectile {
    Scale 0.1
    Height 1
    Radius 1
    Damage 25
    Speed 400
    Projectile
    Renderstyle ADD
    Species "Player"
    +FORCEXYBILLBOARD
    +DONTSPLASH
    +BloodSplatter
    +THRUSPECIES
    +NOTIMEFREEZE
    Decal LegBulletChip
    DamageType "Legendary"
    States {
    Spawn:
        TRAC A 1 BRIGHT
        Loop
    Death:
        PUFF A 0 A_SpawnItemEx("LegendaryASGBulletPuff")
        PUFF ABCD 4
        Stop
    XDeath:
        TNT1 A 0
        Stop
    }
}


actor "24-28Bullet" : FastProjectile {
    Scale 0.1
    Height 1
    Radius 1
    Damage (random(24,28))
    Speed 400
    Projectile
    Renderstyle ADD
    Species "Player"
    +FORCEXYBILLBOARD
    +DONTSPLASH
    +BloodSplatter
    +THRUSPECIES
    +NOTIMEFREEZE
    Decal LegBulletChip
    DamageType "Legendary"
    States {
    Spawn:
        TRAC A 1 BRIGHT
        Loop
    Death:
        PUFF A 0 A_SpawnItemEx("LegendaryASGBulletPuff")
        PUFF ABCD 4
        Stop
    XDeath:
        TNT1 A 0
        Stop
    }
}



ACTOR LegendaryRailgunPROJ : FastProjectile
{
Radius 6
Height 6
Speed 250
Damage (Random(500,1000))
Scale 1
DamageType "Legendary"
SeeSound "monsters/darkcyberrail"
MissileType "LegendaryRailgunTrail"
Species "Cybers"
DeathSound "cyberrail/impact"
+RIPPER
+THRUSPECIES
+EXTREMEDEATH
+BLOODLESSIMPACT
+NODAMAGETHRUST
States
{
Spawn:
    LRSH A 1 Bright
    Loop
Death:
	TNT1 A 0
	TNT1 A 0 A_SpawnItemEx("BFGShockwaveBlue", 0, 0, 0, 0, 0, 0, 0, 128)
    TNT1 AAAA 0 A_CustomMissile("KaboomBlue2", 0, 0, random(0,360), 2, random(0,360))	
	TNT1 A 1 A_SpawnItem("RailGunImpactEffectBlue")
	Stop
	}
}