ACTOR "Vexed Nemesis Plasmatic Cannon" : "Legendary Plasmatic Cannon"
{
  Weapon.AmmoType "NLDemonAmmo"
  Weapon.AmmoUse 5
  Weapon.AmmoType2 "NLDemonAmmo"
  Weapon.AmmoUse2 1
  Weapon.Upsound "VexedNemesisPlasmaticCannon/Up	"
  Weapon.PreferredSkin "LegendaryCannon-Marine"
  Inventory.PickupSound "VexedNemesisPlasmaticCannon/Up	"
  Inventory.PickupMessage "You have acquired the Nemesis Plasmatic Cannon! None can stand before you!"
  Obituary "%o was seared from dark energy by %k's Nemesis Plasmatic Cannon."
  Tag "Nemesis Plasmatic Cannon"
  States 
  {
  Spawn:
	VCN6 Z -1
	Loop
  Ready:
	VCN6 A 0 A_WeaponReady
ReadyLoop:
	TNT1 A 0
	TNT1 A 0 A_JumpifInventory("NLDemonAmmo",5,"Looping")
	Goto ReadyLoopEmpty
Looping:
	TNT1 A 0 A_JumpifInventory("NemCannonCooldown",1,"ReadyLoopCooldown")
	TNT1 A 0 A_PlaySound("VexedNemesisPlasmaticCannon/Idle",5,0.7,1)
	VCN6 ABC 3 A_WeaponReady
	Goto ReadyLoop
ReadyLoopCooldown:
	TNT1 A 0 A_StopSound(5)
	VCN7 M 1 A_WeaponReady
	TNT1 A 0 A_JumpifInventory("NemCannonCooldown",1,"ReadyLoopCooldown")
	Goto ReadyLoop
ReadyLoopEmpty:
	TNT1 A 0 
	TNT1 A 0 A_JumpIfInventory("NLDemonAmmo",5,"ReadyLoop")
	TNT1 A 0 A_StopSound(5)
	VCN7 M 1 A_WeaponReady
	Loop
  Deselect:
	TNT1 A 0
	TNT1 A 0 A_TakeInventory("HandGrenadeAction",1)
	TNT1 A 0 A_TakeInventory("MineAction",1)
	TNT1 A 0 A_TakeInventory("RailgunAction",1)
	TNT1 A 0 A_PlayWeaponSound("weapons/weapondown")
  DeselectLoop:
	TNT1 A 0 A_StopSound(5)
	VCN6 A 0 A_Lower
	VCN6 D 1 A_Lower
	Loop
  Select:
	VCN6 D 0 A_Raise
	VCN6 D 1 A_Raise
	Loop
  Fire:
    TNT1 A 0 A_JumpIfInventory("NemesisCannonMode3",1,"Fire4")
	TNT1 A 0 A_JumpIfInventory("NemesisCannonMode2",1,"Fire3")
	TNT1 A 0 A_JumpIfInventory("NemesisCannonMode1",1,"Fire2")
	TNT1 A 0 A_JumpIfInventory("NLDemonAmmo",10,"FireContinue")
	Goto Ready
  FireContinue:
    TNT1 A 0
	TNT1 A 0 A_JumpIfInventory("NemesisRuneToken",1,"FireContinueExtreme")
	TNT1 A 0 A_GunFlash
	VCN7 B 2 Bright
	TNT1 A 0 A_PlaySound("NemesisCannon/Fire")
	TNT1 A 0 Radius_Quake(2,2,0,1,0)
	TNT1 A 0 A_TakeInventory("NLDemonAmmo",5,TIF_NOTAKEINFINITE)
	VCN7 C 2 Bright A_FireCustomMissile("NemesisCannonBallButFaster",0,1,0,0)
	VCN7 DE 2 Bright
	VCN7 FGHJLK 1
	VCN7 WVUTSRM 3 A_Refire
	Goto Ready
  FireContinueExtreme:
    TNT1 A 0 A_GunFlash
	VCN7 B 2 Bright
	TNT1 A 0 A_PlaySound("NemesisCannon/Fire")
	TNT1 A 0 Radius_Quake(2,2,0,1,0)
	TNT1 A 0 A_TakeInventory("NLDemonAmmo",5,TIF_NOTAKEINFINITE)
	VCN7 C 2 Bright A_FireCustomMissile("NemesisCannonBallButVeryFaster",0,1,0,0)
	VCN7 DE 2 Bright
	VCN7 FF 1
	TNT1 A 0 A_Refire("FireContinueExtreme")
	VCN7 FGHJLK 1
	VCN7 WVUTSRM 1
	Goto Ready
 FireContinueExtreme:
    TNT1 A 0 A_GunFlash
	VCN7 ABCDZ 1 Bright
	TNT1 A 0 A_StopSound(5)
	TNT1 A 0 A_PlaySound("VexedNemesisPlasmaticCannon/Fire")
	TNT1 A 0 Radius_Quake(2,2,0,1,0)
	VCN7 Y 2 Bright A_FireCustomMissile("NemesisCannonBallButVeryFaster",0,1,0,0)
	TNT1 A 0 A_TakeInventory("NLDemonAmmo",2)
	VCN7 XW 2
	VCN7 VUTTSS 1
	TNT1 A 0 A_Refire("Fire")
	VCN6 EFG 3
	Goto ReadyLoop
  Fire2:
    TNT1 A 0
	TNT1 A 0 A_JumpIfInventory("NemesisRuneToken",1,"Fire2Extreme")
	TNT1 A 0 A_GunFlash
	VCN7 B 2 Bright
	TNT1 A 0 A_PlaySound("NemesisCannon/Laser")
	TNT1 A 0 Radius_Quake(2,2,0,1,0)
	VCN7 C 2 Bright A_FireCustomMissile("NemesisCannonLaserPlayerButFaster",0,1,0,0)
	VCN7 DE 2 Bright
	VCN7 FGHJLK 1
	VCN7 WVUTSRM 3 A_Refire
	Goto Ready
  Fire2Extreme:
    TNT1 A 0 A_GunFlash
	VCN7 B 2 Bright
	TNT1 A 0 A_PlaySound("NemesisCannon/Laser")
	TNT1 A 0 Radius_Quake(2,2,0,1,0)
	VCN7 C 2 Bright A_FireCustomMissile("NemesisCannonLaserPlayerButVeryFaster",0,1,0,0) 
	VCN7 DE 2 Bright
	TNT1 A 0 A_Refire("Fire2Extreme")
	VCN7 FGHJLK 1
	VCN7 WVUTSRM 2 A_Refire
	Goto Ready
  Fire3:
	TNT1 A 0 A_JumpIfInventory("NLDemonAmmo",100,"Fire3Continue")
	Goto Ready
  Fire3Continue:
    TNT1 A 0
	TNT1 A 0 A_JumpIfInventory("NemesisRuneToken",1,"Fire3Extreme")
	TNT1 A 0 A_JumpIfInventory("AgilityRuneRage",1,"NoSpeedForYou3")
	VCN7 A 95 Bright A_PlaySound("VexedNemesisPlasmaticCannon/Fire2",1)
	TNT1 A 0 A_GunFlash
	VCN7 BBB 1 Bright
	TNT1 A 0 Radius_Quake(2,2,0,1,0)	
	TNT1 A 0 A_PlaySound("NemesisCannon/BigLaser",1)
	TNT1 A 0 A_TakeInventory("NLDemonAmmo",95,TIF_NOTAKEINFINITE)
	TNT1 A 0 A_FireCustomMissile("NemesisCannonIonBeamPlayerButFaster",0,1,0,0)
    VCN7 CCCDDDEEE 1 Bright
	TNT1 A 0 A_PlaySound ("legendarycannon/steam",7)
	TNT1 A 0 A_FireCustomMissile("LegendaryCannonSmoke",0,0,1,6)
    VCN7 FFFFFFGGGGGGHHHHHHIIIIIIIIJJJJKKKKLLLLNNOOPPQRR 1 A_FireCustomMissile("LegendaryCannonSmoke2",0,0,1,6)
	VCN7 M 3 A_Refire("Fire3")
	Goto Ready	
  NoSpeedForYou3:
	VCN7 A 190 Bright A_PlaySound("VexedNemesisPlasmaticCannon/Fire2",1)
	TNT1 A 0 A_GunFlash
	VCN7 BBB 1 Bright
	TNT1 A 0 Radius_Quake(2,2,0,1,0)	
	TNT1 A 0 A_PlaySound("NemesisCannon/BigLaser",1)
	TNT1 A 0 A_TakeInventory("NLDemonAmmo",95,TIF_NOTAKEINFINITE)
	TNT1 A 0 A_FireCustomMissile("NemesisCannonIonBeamPlayerButFaster",0,1,0,0)
    VCN7 CCCDDDEEE 1 Bright
	TNT1 A 0 A_PlaySound ("legendarycannon/steam",7)
	TNT1 A 0 A_FireCustomMissile("LegendaryCannonSmoke",0,0,1,6)
    VCN7 FFFFFFGGGGHHHHIIIIIIJJJJKKKLLLNNOOPPQRR 1 A_FireCustomMissile("LegendaryCannonSmoke2",0,0,1,6)
	VCN7 M 6 A_Refire("Fire3")
	Goto Ready
  Fire3Extreme:
    VCN7 A 65 Bright A_PlaySound("VexedNemesisPlasmaticCannon/Fire2",1)
	TNT1 A 0 A_GunFlash
	VCN7 BBB 1 Bright
	TNT1 A 0 Radius_Quake(2,2,0,1,0)	
	TNT1 A 0 A_PlaySound("NemesisCannon/BigLaser",1)
	TNT1 A 0 A_TakeInventory("NLDemonAmmo",95,TIF_NOTAKEINFINITE)
	TNT1 A 0 A_FireCustomMissile("NemesisCannonIonBeamPlayerButVeryFaster",0,1,0,0)
    VCN7 CCCDDDEEE 1 Bright
	TNT1 A 0 A_PlaySound ("legendarycannon/steam",7)
	TNT1 A 0 A_FireCustomMissile("LegendaryCannonSmoke",0,0,1,6)
    VCN7 FFFFGGGHHHIIIIJJJJKKKKLLLLNNOOPPQRR 1 A_FireCustomMissile("LegendaryCannonSmoke2",0,0,1,6)
	VCN7 M 3 A_Refire("Fire3Extreme")
	Goto Ready
  Fire4Continue:
    TNT1 A 0
	TNT1 A 0 A_JumpIfInventory("NemesisRuneToken",1,"Fire4Extreme")
	TNT1 A 0 A_JumpIfInventory("AgilityRuneRage",1,"NoSpeedForYou3")
	VCN7 A 95 Bright A_PlaySound("star/load3",1)
	TNT1 A 0 A_GunFlash
	VCN7 BBB 1 Bright
	TNT1 A 0 Radius_Quake(2,2,0,1,0)	
	TNT1 A 0 A_PlaySound("NemesisBFG/Altfire",1)
	TNT1 A 0 A_TakeInventory("NLDemonAmmo",95,TIF_NOTAKEINFINITE)
	TNT1 A 0 A_FireCustomMissile("PlayerMiniNemesisBFGBall",0,1,0,0)
    VCN7 CCCDDDEEE 1 Bright
	TNT1 A 0 A_PlaySound ("legendarycannon/steam",7)
	TNT1 A 0 A_FireCustomMissile("LegendaryCannonSmoke",0,0,1,6)
    VCN7 FFFFFFGGGGGGHHHHHHIIIIIIIIJJJJKKKKLLLLNNOOPPQRR 1 A_FireCustomMissile("LegendaryCannonSmoke2",0,0,1,6)
	VCN7 M 3 A_Refire("Fire4")
	Goto Ready	
  NoSpeedForYou4:
	VCN7 A 190 Bright A_PlaySound("star/load3",1)
	TNT1 A 0 A_GunFlash
	VCN7 BBB 1 Bright
	TNT1 A 0 Radius_Quake(2,2,0,1,0)	
	TNT1 A 0 A_PlaySound("NemesisBFG/Altfire",1)
	TNT1 A 0 A_TakeInventory("NLDemonAmmo",95,TIF_NOTAKEINFINITE)
	TNT1 A 0 A_FireCustomMissile("PlayerMiniNemesisBFGBall",0,1,0,0)
    VCN7 CCCDDDEEE 1 Bright
	TNT1 A 0 A_PlaySound ("legendarycannon/steam",7)
	TNT1 A 0 A_FireCustomMissile("LegendaryCannonSmoke",0,0,1,6)
    VCN7 FFFFFFGGGGGGHHHHHHIIIIIIIIJJJJKKKKLLLLNNOOPPQRR 1 A_FireCustomMissile("LegendaryCannonSmoke2",0,0,1,6)
	VCN7 M 6 A_Refire("Fire4")
	Goto Ready
  Fire4Extreme:
    VCN7 A 65 Bright A_PlaySound("star/load3",1)
	TNT1 A 0 A_GunFlash
	VCN7 BBB 1 Bright
	TNT1 A 0 Radius_Quake(2,2,0,1,0)	
	TNT1 A 0 A_PlaySound("NemesisBFG/Altfire",1)
	TNT1 A 0 A_TakeInventory("NLDemonAmmo",95,TIF_NOTAKEINFINITE)
	TNT1 A 0 A_FireCustomMissile("PlayerMiniNemesisBFGBallFaster",0,1,0,0)
    VCN7 CCCDDDEEE 1 Bright
	TNT1 A 0 A_PlaySound ("legendarycannon/steam",7)
	TNT1 A 0 A_FireCustomMissile("LegendaryCannonSmoke",0,0,1,6)
    VCN7 FFFFGGGHHHIIIIJJJJKKKKLLLLNNOOPPQRR 1 A_FireCustomMissile("LegendaryCannonSmoke2",0,0,1,6)
	VCN7 M 3 A_Refire("Fire4Extreme")
	Goto Ready
  Altfire:
    TNT1 A 0 A_JumpIfInventory("NemesisCannonMode3",1,"Altfire4")
	TNT1 A 0 A_JumpIfInventory("NemesisCannonMode2",1,"Altfire3")
	TNT1 A 0 A_JumpIfInventory("NemesisCannonMode1",1,"Altfire2")
	VCN7 D 1
	TNT1 A 0 A_Playsound("VexedNemesisPlasmaticCannon/Change")
	TNT1 A 0 A_GiveInventory("NemesisCannonMode1")
	TNT1 A 0 A_Print("\c[w2 ]Laser \c")
	VCN7 DEF 2 Offset(0,34)
	VCN7 AB 2 Offset(0,37)
	VCN7 C 2 Offset(0,34)
	VCN7 C 1
	TNT1 A 0 A_Refire("NoAutoAltFirePls")
	Goto Ready
  Altfire2:
	VCN7 D 1
	TNT1 A 0 A_Playsound("VexedNemesisPlasmaticCannon/Change")
	TNT1 A 0 A_TakeInventory("NemesisCannonMode1")
	TNT1 A 0 A_GiveInventory("NemesisCannonMode2")
	TNT1 A 0 A_GiveInventory("NemesisCannonMode3")
	TNT1 A 0 A_Print("\c[w2] Ion Beam \c-")
	VCN7 DEF 2 Offset(0,34)
	VCN7 AB 2 Offset(0,37)
	VCN7 C 2 Offset(0,34)
	VCN7 C 1
	TNT1 A 0 A_Refire("NoAutoAltFirePls")
	Goto Ready
  Altfire3:
	VCN7 D 1
	TNT1 A 0 A_Playsound("VexedNemesisPlasmaticCannon/Change")
	TNT1 A 0 A_TakeInventory("NemesisCannonMode2")
	TNT1 A 0 A_GiveInventory("NemesisCannonMode3")
	TNT1 A 0 A_Print("\c[w2] Cannon Ball \c-")
	VCN7 DEF 2 Offset(0,34)
	VCN7 AB 2 Offset(0,37)
	VCN7 C 2 Offset(0,34)
	VCN7 C 1
	TNT1 A 0 A_Refire("NoAutoAltFirePls")
	Goto Ready
   Altfire4:
	VCN7 A 1
	TNT1 A 0 A_Playsound("VexedNemesisPlasmaticCannon/Change")
	TNT1 A 0 A_TakeInventory("NemesisCannonMode3")
	TNT1 A 0 A_Print("\c[w2] Mini BFG \c-")
	VCN7 DEF 2 Offset(0,34)
	VCN7 AB 2 Offset(0,37)
	VCN7 C 2 Offset(0,34)
	VCN7 C 1
	TNT1 A 0 A_Refire("NoAutoAltFirePls")
	Goto Ready
  NoAutoAltFirePls:
	VCN7 A 1
	VCN7 A 1 A_Refire("NoAutoAltFirePls")
	Goto Ready
  Flash:
	TNT1 A 1 A_Light1
	TNT1 A 1 A_Light2
	TNT1 A 1 A_Light1
	TNT1 A 1 A_Light0
	Stop
	}
}

ACTOR NemesisCannonMode1 : Inventory { Inventory.MaxAmount 1 }
ACTOR NemesisCannonMode2 : Inventory { Inventory.MaxAmount 1 }
ACTOR NemesisCannonMode3 : Inventory { Inventory.MaxAmount 1 }

ACTOR NemesisCannonBallButVeryFaster : NemesisCannonBallButFaster
{
Speed 125
Damage 120
}

ACTOR NemesisCannonIonBeamPlayerButVeryFaster : NemesisCannonIonBeamPlayer { Speed 200 }

ACTOR NemesisCannonLaserPlayerButVeryFaster : NemesisCannonLaser
{
  Speed 80
  Height 6
  damage 25
  Species "Player"
  States
  {
  Death:
	TNT1 A 0
	TNT1 A 0 A_Explode(128,128,0,1)
	TNT1 A 0 A_CustomMissile("NemesisCannonShotExplosionPlayer")
	TNT1 A 0 A_SpawnItem("NemesisWhiteProjExplode")
	TNT1 AAAA 0 A_SpawnItemEx("NemesisWhiteParticleSpawner",0,0,0,0,0,0,0,SXF_CLIENTSIDE,0) 
	TNT1 AAA 0 A_CustomMissile("WhiteNemesisKaboom3",0,0,random(0,360),2,random(0,360))
	TNT1 AAA 0 A_CustomMissile("LegendarySmokeFX4",0,0,random(0,360),2,random(0,360))
    TNT1 A 10
    Stop
	}
}

ACTOR PlayerMiniNemesisBFGBallFaster : PlayerMiniNemesisBFGBall
{
Speed 80
Damage 150
}