/*
ACTOR "AlphaNemesisRevolver" : Weapon //Trash weapon sry(
{
   Tag "Nemesis Revolver"
   Scale 0.8
   Weapon.PreferredSkin "LegendaryRevolver-Marine"
   Weapon.SelectionOrder 19
   Weapon.KickBack 160
   Inventory.PickupSound "revspin"
   Weapon.AmmoGive2 12
   Weapon.AmmoUse 1
   Weapon.AmmoType "NemesisRevolverSpinner"
   Weapon.AmmoType2 "NemesisDMGBulletMag"
   Inventory.Pickupmessage "Nemesis Revolver! Get ready to be rekt."
   Obituary "%o was gibbed to death by A Powerful shot from  %K's Nemesis Revolver ." 
   +NOAUTOFIRE
   +WEAPON.AMMO_OPTIONAL
   +WEAPON.NOALERT
   +INVENTORY.UNDROPPABLE
   States 
   { 
  Spawn: 
    ERVI A -1 
    Stop
  Ready:
	NE6C QP 1
	NE6R EDCBA 2
	NE6R C 2 A_PlaySound("REVCLOSE")
	TNT1 A 0 A_PlayWeaponSound("revspin")
  ReadyLoop:
	TNT1 A 0 A_TakeInventory("NemesisLegendaryRevolverAlt",1)
	TNT1 A 0 A_TakeInventory("NemesisRevolverBreaker",10)
	TNT1 A 0 A_JumpIfInventory("HandGrenadeAction",1,"GrenadeCheck")
	TNT1 A 0 A_JumpIfInventory("MineAction",1,"MineCheck")
	NE6C P 1 A_WeaponReady
	Loop
  Deselect:
	TNT1 A 0 A_PlayWeaponSound("weapons/weapondown")
  DeselectLoop:
	TNT1 A 0 A_Lower
    NE6C P 1 A_Lower
    Loop
  QuickSwitch:
    TNT1 A 0 A_PlayWeaponSound("weapons/quickswitch")
  QuickSwitchLoop:
    NE6C P 1 A_Lower
	TNT1 A 0 A_Lower
    Loop
  Select:
	TNT1 A 0 A_Raise
    Wait
  Fire: 
    TNT1 A 0
    TNT1 A 0 A_JumpifInventory("EnragedLegRuneToken",1,"FireRage")
	TNT1 A 0 A_JumpIfNoAmmo("Empty")
	TNT1 A 0 A_JumpIfInventory("NemesisLegendaryRevolverAlt",1,"MultipleShots")
	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("RedSGTracer",0,0,0,0)
	TNT1 A 0 Bright A_FireCustomMissile("E180-280Bullet",0,1,0,8,false,0)
	TNT1 A 0 A_Light1
	NE6F CDEF 1 Bright A_GunFlash
	TNT1 A 0 A_Light0
	TNT1 A 0 
	NE6F GHIJ 5
	TNT1 A 0 A_GiveInventory("NemesisLegendaryRevolverAlt",1)
	TNT1 A 0 A_ReFire("Fire")
	NE6C P 1 A_WeaponReady
	Goto ReadyLoop
  FireRage:
	TNT1 A 0 A_JumpIfNoAmmo("Empty")
	TNT1 A 0 A_JumpIfInventory("NemesisLegendaryRevolverAlt",1,"MultipleShotsRage")
	TNT1 A 0 A_PlaySound("revfire")
	TNT1 A 0 A_TakeInventory("LegendaryRevolverToken",5)
	TNT1 A 0 A_AlertMonsters
	TNT1 A 0 Radius_Quake(1,2,0,1,0)
	TNT1 A 0 Bright A_FireCustomMissile("ELegRevolverSpecialShot",0,1,0,8,false,0)
	TNT1 A 0 A_Light1
	NE6F CDEF 2 Bright A_GunFlash
	TNT1 A 0 A_Light0
	TNT1 A 0 
	NE6F GHIJ 5
	TNT1 A 0 A_GiveInventory("NemesisLegendaryRevolverAlt",1)
	TNT1 A 0 A_ReFire("FireRage")
	NE6F P 1 A_WeaponReady
	Goto ReadyLoop
  MultipleShots:
	TNT1 A 0 A_TakeInventory("NemesisLegendaryRevolverAlt",1)
	TNT1 A 0 A_GiveInventory("NemesisRevolverBreaker",1)
	NE6F F 1
	NE6F EDC 1
	NE6C QP 1
	TNT1 A 0 A_PlaySound("revfire",CHAN_WEAPON)
	TNT1 A 0 A_AlertMonsters
	TNT1 A 0 A_GunFlash
	TNT1 A 0 Radius_Quake(1,2,0,1,0)
    TNT1 A 0 A_FireCustomMissile("RedSGTracer",0,0,0,0)
	TNT1 A 0 Bright A_FireCustomMissile("E180-280Bullet",0,1,0,8,false,0)
	NE6F GHIJ 1 Bright A_Light1
	TNT1 A 0 A_Light0
	TNT1 A 0 A_JumpIfNoAmmo("Empty")
	TNT1 A 0 A_JumpIfInventory("LegendaryRevolverBreaker",10,"ReadyLoop")
	Goto MultipleShots
  MultipleShotsRage:
	TNT1 A 0 A_TakeInventory("NemesisLegendaryRevolverAlt",1)
	TNT1 A 0 A_GiveInventory("NemesisRevolverBreaker",1)
	NE6C QP 1
	NE6F FEDC 1
	TNT1 A 0 A_PlaySound("revfire",CHAN_WEAPON)
	TNT1 A 0 A_AlertMonsters
	TNT1 A 0 A_GunFlash
	TNT1 A 0 Radius_Quake(1,2,0,1,0)
	TNT1 A 0 Bright A_FireCustomMissile("ELegRevolverSpecialShot",frandom(-2,2),1,0,0,0,frandom(-2,2))
	NE6F GHIJ 1 Bright A_Light1
	TNT1 A 0 A_Light0
	TNT1 A 0 A_JumpIfNoAmmo("Empty")
	TNT1 A 0 A_JumpIfInventory("NemesisRevolverBreaker",10,"ReadyLoop")
	Goto MultipleShotsRage
  Empty:
    TNT1 A 0
    NE6R A 1 A_PlayWeaponSound("weapons/click")
  AltFire:
    TNT1 A 0
  	TNT1 A 0 A_JumpIfInventory("NemesisRevolverSpinner",6,2)
    TNT1 A 0 A_JumpIfInventory("ELegendaryLMGBulletMag",1,2)
	TNT1 A 0
	Goto ReadyLoop
    NE6R ABCEFGHIJK 2 
	NE6R L 1 A_PlaySound("REVOPEN")
	NE6R MNOQR 2 A_JumpIfInventory("NemesisRevolverSpinner",1,"MaxReload")
	TNT1 A 0 A_JumpIfInventory("ELegendaryLMGBulletMag",1,"Reload2")
  Reload:
	TNT1 A 0 A_TakeInventory("ELegendaryLMGBulletMag",1)
	TNT1 A 0 A_GiveInventory("NemesisRevolverSpinner",1)
	TNT1 A 0 A_JumpIfInventory("NemesisRevolverSpinner", 6,2)
	TNT1 A 0 A_JumpIfInventory("ELegendaryLMGBulletMag",1,"Reload")
	TNT1 A 0
	Goto ReadyLoop
  MaxReload:
    NE6C CC 0 A_SpawnItemEx("ELegBulletCasing",30,0,30,Random(2,4),Random(3,6),Random(3,6),0)
	NE6C DE 10 A_PlaySound("REVEJECT")
	NE6C FGH 2 A_PlaySound("REVINSR")
	NE6C IJKL 5 A_PlaySound("REVCLOSE")
	NE6C MNO 5
	NE6R PQR 5
	NE6R C 5
	TNT1 A 3 A_JumpIfInventory("ELegendaryLMGBulletMag",1,"Reload")
  Reload2:
	TNT1 A 0 A_TakeInventory("ELegendaryLMGBulletMag",1)
	TNT1 A 0 A_GiveInventory("NemesisRevolverSpinner",1)
	TNT1 A 0 A_JumpIfInventory("NemesisRevolverSpinner",6,"Full")
	TNT1 A 0 A_JumpIfInventory("ELegendaryLMGBulletMag",1,"Reload2")
	TNT1 A 0 A_TakeInventory("LegendaryRevolverToken",5)
  Full:
    NE6C CC 0 A_SpawnItemEx("ELegBulletCasing",30,0,30,Random(2,4),Random(3,6),Random(3,6),0)
	NE6C DE 10 A_PlaySound("REVEJECT")
	NE6C FGH 5 A_PlaySound("REVINSR")
	NE6C IJKL 5 A_PlaySound("REVCLOSE")
	NE6C MNO 5 A_PlayWeaponSound("revspin")
	NE6R PQR 5
	NE6R R 5 
	NE6C R 1 
	Goto ReadyLoop
  GrenadeCheck:
	TNT1 A 0 A_JumpIfInventory("HandGrenadeAmmo",1,"GrenadeToss")
	TNT1 A 0 A_TakeInventory("HandGrenadeAction",1)
	Goto ReadyLoop
  GrenadeToss:
  	TNT1 A 0 A_PlayWeaponSound("weapons/weapondown") 
	NE6U ABCDEF 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)
    NE6U FEDCBA 1
	Goto ReadyLoop
  MineCheck:
	TNT1 A 0 A_JumpIfInventory("MineAmmo",1,"MineToss")
	TNT1 A 0 A_TakeInventory("MineAction",1)
	Goto ReadyLoop
  MineToss:
  	TNT1 A 0 A_PlayWeaponSound("weapons/weapondown") 
	NE6U ABCDEF 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) 
	NE6U FEDCBA 1
	Goto ReadyLoop
	}
}

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

ACTOR NemesisRevolverSpinner : Ammo
{
Inventory.Amount 0
Inventory.MaxAmount 6
Ammo.BackpackAmount 0
Ammo.BackpackMaxAmount 6
Inventory.Icon "ERVIA0"
+IGNORESKILL
}

Actor NemesisLegendaryRevolverAlt : Ammo
{
+NOTIMEFREEZE
+INVENTORY.IGNORESKILL
+INVENTORY.UNTOSSABLE
Inventory.MaxAmount 1
Inventory.InterHubAmount 0
}

Actor NemesisRevolverBreaker : Ammo
{
+NOTIMEFREEZE
+INVENTORY.IGNORESKILL
+INVENTORY.UNTOSSABLE
Inventory.Amount 0
Inventory.MaxAmount 10
Ammo.BackpackAmount 0
Ammo.BackpackMaxAmount 10
Inventory.InterHubAmount 0
}

ACTOR ELegBulletCasing
{
	Radius 3
	Scale 0.18
	+MISSILE
    +CLIENTSIDEONLY
	+NOTELEPORT	
	+DOOMBOUNCE
	+THRUACTORS
	+DROPOFF
	BounceFactor 0.5
	WallBounceFactor 0.25
	BounceCount 3
	Seesound "weapons/casing1"
	States
	{
	Spawn:
	  TNT1 A 0
      TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(304) == 1, "Toaster")
	  ECAS ABCDEFGH 2
	  Loop
    Death:
	  TNT1 A 0
      TNT1 A 0 A_Jump(128,3)
      ECAS C 100
      ECAS C 5 A_FadeOut(0.10)
      Goto Death+3
      ECAS G 100
	  ECAS G 5 A_FadeOut(0.10)
	  Goto Death+5
    Toaster:
	  TNT1 A 0
	  Stop
	  }
}

ACTOR ELegRevolverSpecialShot : FastProjectile
{
Radius 4
Height 4
Speed 250
Damage 50
Species "Player"
DamageType "Legendary"
Missiletype "ELegCowboySpecialShotTrail"
MissileHeight 4
+THRUSPECIES
+EXTREMEDEATH
+NOTIMEFREEZE
+FORCERADIUSDMG
States
{
Spawn:
    TNT1 A 1
    Loop
Death:
	TNT1 A 5
	TNT1 A 0
    TNT1 AA 0 A_SpawnItemEx("EnragedParticleSpawner")
    TNT1 AAA 0 A_CustomMissile("EKaboomLN", 0, 0, random(0,360), 2, random(0,360))
    TNT1 A 1 A_SpawnItemEx("EKaboomLN", 0, 0, 0, 0, 0, 0, 0, 128)
	TNT1 A 0 A_Explode(45,110,0)
    TNT1 A 1 A_SpawnItemEx("EKaboomLN", 0, 0, 0, 0, 0, 0, 0, 128)
	TNT1 A 0 A_Explode(95,80,0)
    TNT1 A 1 A_SpawnItemEx("EKaboomLN", 0, 0, 0, 0, 0, 0, 0, 128)
	TNT1 A 0 A_Explode(110,50,0)
	TNT1 AA 0 A_CustomMissile("LegendarySmokeFX4",0,0,random(0,360),2,random(0,360))
	EROC B 3 Bright A_Explode
	EROC CD 2 Bright A_SetTranslucent(0.75,1)
	TNT1 A 1
	Stop
	}
}