ACTOR "Vexed Nemesis Rifle" : "Legendary Plasmatic Rifle"
{
  Weapon.AmmoType "NLDemonMagazine"   
  Weapon.AmmoType2 "NLDemonAmmo"
  Inventory.PickupSound "NemesisRifle/up"
  Inventory.PickupMessage "You got the Vexed Nemesis Rifle! A surge of dark energy flows through you."
  Obituary "%o was obliterated by pure dark energy."
  States
  {
  Spawn:
	NTEP A -1
	Loop
  Ready:
	TNT1 A 0 A_PlaySound("NemesisRifle/up",7)
	VTE0 ABCDE 1 
  ReadyLoop:
	TNT1 A 0 A_JumpIfInventory("NLDemonMagazine",1,2)
	TNT1 A 0
	Goto NoBuzzing
	VTE0 AAA 1 A_WeaponReady
	TNT1 A 0 A_JumpIfInventory("HandGrenadeAction",1,"GrenadeCheck")
	TNT1 A 0 A_JumpIfInventory("MineAction",1,"MineCheck")
	VTE0 AAA 1 A_WeaponReady
	TNT1 A 0 A_JumpIfInventory("HandGrenadeAction",1,"GrenadeCheck")
	TNT1 A 0 A_JumpIfInventory("MineAction",1,"MineCheck")
	VTE0 AAA 1 A_WeaponReady
	TNT1 A 0 A_JumpIfInventory("HandGrenadeAction",1,"GrenadeCheck")
	TNT1 A 0 A_JumpIfInventory("MineAction",1,"MineCheck")
	VTE0 AAA 1 A_WeaponReady	 
	TNT1 A 0 A_JumpIfInventory("HandGrenadeAction",1,"GrenadeCheck")
	TNT1 A 0 A_JumpIfInventory("MineAction",1,"MineCheck")
	VTE0 AAA 1 A_WeaponReady
	TNT1 A 0 A_JumpIfInventory("HandGrenadeAction",1,"GrenadeCheck")
	TNT1 A 0 A_JumpIfInventory("MineAction",1,"MineCheck")
	VTE0 AAA 1 A_WeaponReady
	TNT1 A 0 A_JumpIfInventory("HandGrenadeAction",1,"GrenadeCheck")
	TNT1 A 0 A_JumpIfInventory("MineAction",1,"MineCheck")
	VTE0 AAA 1 A_WeaponReady
	TNT1 A 0 A_JumpIfInventory("HandGrenadeAction",1,"GrenadeCheck")
	TNT1 A 0 A_JumpIfInventory("MineAction",1,"MineCheck")
	VTE0 AAA 1 A_WeaponReady
	TNT1 A 0 A_JumpIfInventory("HandGrenadeAction",1,"GrenadeCheck")
	TNT1 A 0 A_JumpIfInventory("MineAction",1,"MineCheck")
	VTE0 AAA 1 A_WeaponReady
	TNT1 A 0 A_JumpIfInventory("HandGrenadeAction",1,"GrenadeCheck")
	TNT1 A 0 A_JumpIfInventory("MineAction",1,"MineCheck")
	VTE0 AAA 1 A_WeaponReady
	TNT1 A 0 A_PlaySound("NemesisRifle/Idle")
	TNT1 A 0 A_JumpIfInventory("HandGrenadeAction",1,"GrenadeCheck")
	TNT1 A 0 A_JumpIfInventory("MineAction",1,"MineCheck")
	VTE0 BB 1 A_WeaponReady
	TNT1 A 0 A_JumpIfInventory("HandGrenadeAction",1,"GrenadeCheck")
	TNT1 A 0 A_JumpIfInventory("MineAction",1,"MineCheck")
	VTE0 BB 1 A_WeaponReady
	TNT1 A 0 A_JumpIfInventory("HandGrenadeAction",1,"GrenadeCheck")
	TNT1 A 0 A_JumpIfInventory("MineAction",1,"MineCheck")
	VTE0 CC 1 A_WeaponReady
	TNT1 A 0 A_JumpIfInventory("HandGrenadeAction",1,"GrenadeCheck")
	TNT1 A 0 A_JumpIfInventory("MineAction",1,"MineCheck")
	VTE0 CC 1 A_WeaponReady
	TNT1 A 0 A_JumpIfInventory("HandGrenadeAction",1,"GrenadeCheck")
	TNT1 A 0 A_JumpIfInventory("MineAction",1,"MineCheck")
	VTE0 DD 1 A_WeaponReady
	TNT1 A 0 A_JumpIfInventory("HandGrenadeAction",1,"GrenadeCheck")
	TNT1 A 0 A_JumpIfInventory("MineAction",1,"MineCheck")
	VTE0 DD 1 A_WeaponReady
	TNT1 A 0 A_JumpIfInventory("HandGrenadeAction",1,"GrenadeCheck")
	TNT1 A 0 A_JumpIfInventory("MineAction",1,"MineCheck")
	VTE0 EE 1 A_WeaponReady
	TNT1 A 0 A_JumpIfInventory("HandGrenadeAction",1,"GrenadeCheck")
	TNT1 A 0 A_JumpIfInventory("MineAction",1,"MineCheck")
	VTE0 EE 1 A_WeaponReady
	TNT1 A 0 A_JumpIfInventory("HandGrenadeAction",1,"GrenadeCheck")
	TNT1 A 0 A_JumpIfInventory("MineAction",1,"MineCheck")
	Goto ReadyLoop
  NoBuzzing:
	TNT1 A 0 A_JumpIfInventory("HandGrenadeAction",1,"GrenadeCheck")
	TNT1 A 0 A_JumpIfInventory("MineAction",1,"MineCheck")
	VTE0 A 1 A_WeaponReady
	Loop
  Deselect:
    TNT1 A 0 A_PlayWeaponSound("weapons/weapondown")
    TNT1 A 0 A_Lower
	VTE0 A 1 A_Lower
	Goto Deselect+1
  Select:
	TNT1 A 0
	TNT1 A 0 A_Raise
	Wait
  Fire:
	TNT1 A 0 A_JumpIfNoAmmo("Empty")
	TNT1 A 0 A_JumpIfInventory("NemesisRuneToken",1,"FireExtreme")
	TNT1 A 0 A_AlertMonsters
	TNT1 A 0 Radius_Quake(4,2,0,1,0)
	TNT1 A 0 A_Light1
	TNT1 A 0 A_PlayWeaponSound("NemesisRifle/Fire")
	TNT1 A 0 A_FireCustomMissile("NemesisRifleShotPlayerButFaster",Random(100,-100)/100.00,1,0,0,0,Random(100,-100)/100.00)
	VTE1 AA 1 Bright
	VTE1 BB 1 Bright A_Light2
	VTE1 CC 1 A_Light0
	TNT1 A 0 A_ReFire("Fire")
	Goto ReadyLoop
  FireExtreme:
    TNT1 A 0
    TNT1 A 0 A_JumpIfNoAmmo("Empty")
    TNT1 A 0 A_AlertMonsters
	TNT1 A 0 Radius_Quake(4,2,0,1,0)
	TNT1 A 0 A_Light1
	TNT1 A 0 A_PlayWeaponSound("NemesisRifle/Fire")
	TNT1 A 0 A_FireCustomMissile("NemesisRifleShotPlayerButVeryFuckingFaster",Random(100,-100)/100.00,1,0,0,0,Random(100,-100)/100.00)
	VTE1 A 1 Bright
	VTE1 B 1 Bright A_Light2
	TNT1 A 0 A_Refire("FireExtreme")
	VTE1 C 1 A_Light0
	//TNT1 A 0 A_ReFire
	Goto ReadyLoop
  Empty:
	TNT1 A 0 A_PlaySound("weapons/click2")
	VTE0 AAAAAAAAAA 1 A_WeaponReady(WRF_NOFIRE)
  AltFire:
	TNT1 A 0 A_JumpIfInventory("NLDemonMagazine",50,2)
	TNT1 A 0 A_JumpIfInventory("NLDemonAmmo",1,2)
	TNT1 A 0
	Goto ReadyLoop
	VTE2 ABC 2
	VTE2 D 3
	VTE2 E 4 A_PlaySound("weapons/demontecheject")
	TNT1 A 0 Radius_Quake(2,2,0,1,0)
	VTE2 F 2 A_PlaySound("weapons/demontechsteam")
	VTE2 G 2 Radius_Quake(2,2,0,1,0)
	VTE2 HIJK 2 Radius_Quake(2,2,0,1,0)
	VTE2 L 18 A_FireCustomMissile("LDemonTechEmptyMag", 0, 0, 0, 1)
	VTE2 MNO 2
	TNT1 A 0 A_JumpIfInventory("NLDemonAmmo",1,"Reload")	
  ReloadContinue:
	TNT1 A 0 A_PlayWeaponSound("weapons/demontechload")
	VTE2 ED 2
	TNT1 A 0 A_PlayWeaponSound("weapons/demontechclick")
	VTE2 CBA 3
	Goto ReadyLoop
  Reload:
	TNT1 A 0 A_TakeInventory("NLDemonAmmo",1)
	TNT1 A 0 A_GiveInventory("NLDemonMagazine",1)
	TNT1 A 0 A_JumpIfInventory("NLDemonMagazine",50,"ReloadContinue")
	TNT1 A 0 A_JumpIfInventory("NLDemonAmmo",1,"Reload")
	Goto ReloadContinue
  GrenadeCheck:
	TNT1 A 0 A_JumpIfInventory("HandGrenadeAmmo",1,"GrenadeToss")
	TNT1 A 0 A_TakeInventory("HandGrenadeAction",1)
	Goto Ready+6
  GrenadeToss:
	TNT1 A 0 A_PlayWeaponSound("weapons/weapondown") 
	VTE0 EDCBA 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,TIF_NOTAKEINFINITE)
	HGRN J 1 A_FireCustomMissile("ThrownGrenade",0,0,0,0,false)
	HGRN K 1
	HGRN LMNO 2
	TNT1 A 6 A_TakeInventory("HandGrenadeAction",1)
	Goto Ready+1
  MineCheck:
	TNT1 A 0 A_JumpIfInventory("MineAmmo",1,"MineToss")
	TNT1 A 0 A_TakeInventory("MineAction",1)
	Goto Ready+6
  MineToss:
	TNT1 A 0 A_PlayWeaponSound("weapons/weapondown") 
	VTE0 EDCBA 1
	TNT1 A 10
	TNT1 A 0 A_PlayWeaponSound("weapons/hgrenadethrow")
	MINE ABCDEF 1	
	TNT1 A 0 A_TakeInventory("MineAmmo",1,TIF_NOTAKEINFINITE)	  
	MINE G 1 A_FireCustomMissile("ThrownMine",0,0,0,0,false)
	MINE HI 1
	MINE JK 2
	TNT1 A 5 A_TakeInventory("MineAction",1)
	Goto Ready+1
	}
}

ACTOR NemesisRifleShotPlayerButVeryFuckingFaster : NemesisRifleShotEnemy
{
+THRUSPECIES
+FOILINVUL
Damage 120
Speed 125
Species "Player"
DamageType "Legendary"
States
  {
  Death:
	TNT1 A 0 A_SpawnItemEx("NemesisWhiteParticleSpawner",0,0,0,0,0,0,0,SXF_CLIENTSIDE,0)
	TNT1 AAA 0 A_CustomMissile("WhiteNemesisKaboom7",0,0,random(0,360),CMF_AIMDIRECTION,random(0,360))
	TNT1 AAA 0 A_CustomMissile("LegendarySmokeFX4",0,0,random(0,360),CMF_AIMDIRECTION,random(0,360))
	TNT1 A 0 A_SpawnItemEx("NemesisADemonTechEx",0,0,0,0,0,0,0,SXF_CLIENTSIDE,0)
	TNT1 A 1 A_CustomMissile("NemesisRifleShotExplosionPlayer",0,0,0,2)
	Stop
	}
}