ACTOR "Nemesis Demon Tech Devastator" : Weapon
{	
//$Category Weapons/BFG20K
//$Sprite WNDVA0
//$Title "Nemesis Demon Tech Devastator"
+INVENTORY.UNDROPPABLE
Inventory.PickupSound "LegDevastator/Pickup"
Inventory.PickupMessage "The Nemesis Devastator"
Obituary "%o was turned into a mere spec of dust by %k's Nemesis Devastor."
Weapon.PreferredSkin "Devastator-Marine"
Weapon.AmmoUse 75
Weapon.AmmoGive 150
Weapon.AmmoType "NLDemonAmmo"
Weapon.AmmoType2 "NLDemonAmmo"
Weapon.Upsound "LegDevastator/Pickup"
Damagetype "PlayerDevBall"
States
{
   Spawn:
	WNDV A -1
	Loop
   Ready:
	NDEV A 0 A_PlaySound("devastator/idle",6,1.0,1)
	NDEV A 2 A_WeaponReady
	Loop
   Deselect:
	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")
	TNT1 AAA 0 A_StopSound(6)
	TNT1 A 0 A_Lower
	NDEV A 1 A_Lower
	Goto Deselect+7
   Select:
	TNT1 A 0 A_Raise
	NDEV A 1 A_Raise
	Loop
   Fire:
	NDEV A 0 A_StopSound(6)
	NDEV B 9 A_PlayWeaponSound("devastator/charge")
	NDEV CDEF 10 Bright
	NDEV G 3 Bright A_FireBullets(4,4,2,20,"SuperDevPuff",0,64)
	NDEV H 4 Bright A_FireBullets(4,4,2,20,"SuperDevPuff",0,64)
	NDEV I 4 Bright A_FireBullets(4,4,2,20,"SuperDevPuff",0,64)
	NDEV G 4 Bright A_FireBullets(4,4,2,20,"SuperDevPuff",0,64)
	NDEV H 4 Bright A_FireBullets(4,4,2,20,"SuperDevPuff",0,64)
	NDEV I 4 Bright A_FireBullets(4,4,2,20,"SuperDevPuff",0,64)
	NDEV G 3 Bright A_FireBullets(4,4,2,20,"SuperDevPuff",0,64)
	NDEV H 4 Bright A_FireBullets(4,4,2,20,"SuperDevPuff",0,64)
	NDEV I 4 Bright A_FireBullets(4,4,2,20,"SuperDevPuff",0,64)
	NDEV G 4 Bright A_FireBullets(4,4,2,20,"SuperDevPuff",0,64)
	NDEV H 4 Bright A_FireBullets(4,4,2,20,"SuperDevPuff",0,64)
	NDEV I 4 Bright A_FireBullets(4,4,2,20,"SuperDevPuff",0,64)
	NDEV A 0 A_Refire
	NDEV J 3 Bright A_GunFlash
	TNT1 A 0 A_Recoil(20)
	NDEV J 1 Bright A_Playsound("devastator/fire")
	NDEV K 9 Bright A_FireCustomMissile ("PlayerNemesisRDevastatorBall",0,1,0,0)
	NDEV L 7 Bright
	Goto Ready
  Hold:
	NDEV A 0 A_StopSound(6)
	NDEV G 1 Bright A_PlayWeaponSound("weapons/devfch")
	NDEV G 3 Bright A_FireBullets(4,4,2,6,"SuperDevPuff",0,64)
	NDEV H 4 Bright A_FireBullets(4,4,2,6,"SuperDevPuff",0,64)
	NDEV I 4 Bright A_FireBullets(4,4,2,6,"SuperDevPuff",0,64)
	NDEV G 4 Bright A_FireBullets(4,4,2,6,"SuperDevPuff",0,64)
	NDEV H 4 Bright A_FireBullets(4,4,2,6,"SuperDevPuff",0,64)
	NDEV I 4 Bright A_FireBullets(4,4,2,6,"SuperDevPuff",0,64)
	NDEV I 0 A_Refire
	NDEV J 4 Bright A_GunFlash
	NDEV J 1 Bright A_Playsound("devastator/fire")
	NDEV K 10 Bright A_FireCustomMissile ("PlayerNemesisRDevastatorBall",0,1,0,0)
	NDEV L 7 Bright
	Goto Ready
   Flash:
	NULL A 5 A_Light1
	NULL A 10 A_Light2
	NULL A 7 A_Light1
	NULL A 5 A_Light0
	stop
   }
}

Actor SuperDevPuff
{
   Radius 3
   Height 3
   RENDERSTYLE ADD
   ALPHA 0.75
   +ALWAYSPUFF
   +PUFFONACTORS
   +NOGRAVITY
   DeathSound "weapons/buzz"
   States
   {
   Spawn:
	LLIT JKLJKLJKL 3 Bright
	stop
   Crash:
	NULL A 1 Bright
	stop
   }
}


ACTOR PlayerNemesisRDevastatorBall : VexedGeneralRDevastatorBall
{
Radius 18
Height 18
Damage 3000
Speed 40
Alpha 0.95
Scale 0.7
RENDERSTYLE Translucent
Species "Player"
DamageType "NemesisGuruPlayer"
Alpha 0.85
PROJECTILE
+FORCERADIUSDMG
+FORCEXYBILLBOARD
+EXTREMEDEATH
+SKYEXPLODE
+MTHRUSPECIES
+NOTIMEFREEZE
States
{
  Spawn:
    TNT1 A 0
	TNT1 A 0 A_Jump(128,"DTBFGSFX")
    TNT1 A 0 A_AlertMonsters
    TNT1 A 0 A_PlaySoundEx("devastator/fly","Voice",1)
	TNT1 A 0 A_CustomMissile("PlayerZamasuImpDevastatorBolt",6,0,random(0,359),CMF_AIMDIRECTION|CMF_TRACKOWNER,random(-40,40))
    KGS2 A 1 Bright A_SpawnItemEx("ProjectileTrailParticleWhite",Random(-12,12),Random(-12,12),Random(-12,12),Random(-2,2),Random(-2,2),Random(-2,2),Random(-20,20),128)
	TNT1 A 0 A_CustomMissile("PlayerZamasuImpDevastatorBolt",6,0,random(0,359),CMF_AIMDIRECTION|CMF_TRACKOWNER,random(-40,40))
	KGS2 B 1 Bright A_SpawnItemEx("ProjectileTrailParticleWhite",Random(-12,12),Random(-12,12),Random(-12,12),Random(-2,2),Random(-2,2),Random(-2,2),Random(-20,20),128)
	TNT1 A 0 A_CustomMissile("PlayerZamasuImpDevastatorBolt",6,0,random(0,359),CMF_AIMDIRECTION|CMF_TRACKOWNER,random(-40,40))
	KGS2 C 1 Bright A_SpawnItemEx("ProjectileTrailParticleWhite",Random(-12,12),Random(-12,12),Random(-12,12),Random(-2,2),Random(-2,2),Random(-2,2),Random(-20,20),128)
	KGS2 CCC 0 A_CustomMissile("NemesisCannonProjPlayer",0,0,Random(0,360))
	TNT1 A 0 A_CustomMissile("PlayerZamasuImpDevastatorBolt",6,0,random(0,359),CMF_AIMDIRECTION|CMF_TRACKOWNER,random(-40,40))
	KGS2 D 1 Bright A_SpawnItemEx("ProjectileTrailParticleWhite",Random(-12,12),Random(-12,12),Random(-12,12),Random(-2,2),Random(-2,2),Random(-2,2),Random(-20,20),128)
    Loop
  DTBFGSFX:
    TNT1 A 0 A_AlertMonsters
    TNT1 A 0 A_PlaySoundEx("devastator/fly","Voice",1)
	TNT1 A 0 A_Explode(32,450,0)
	TNT1 A 0 A_CustomMissile("PlayerZamasuImpDevastatorBolt",6,0,random(0,359),CMF_AIMDIRECTION|CMF_TRACKOWNER,random(-40,40))
	TNT1 A 0 A_SpawnItemEx("DTBFGLightningWhite",Random(6,-6),Random(6,-6),Random(6,-6),0,0,0,0,128)
    KGS2 A 1 Bright A_SpawnItemEx("ProjectileTrailParticleWhite",Random(-12,12),Random(-12,12),Random(-12,12),Random(-2,2),Random(-2,2),Random(-2,2),Random(-20,20),128)
	KGS2 A 1 A_SpawnItemEx("DTBFGLightningWhite2",Random(6,-6),Random(6,-6),Random(6,-6),0,0,0,0,128)
	TNT1 A 0 A_Explode(32,450,0)
	TNT1 A 0 A_CustomMissile("PlayerZamasuImpDevastatorBolt",6,0,random(0,359),CMF_AIMDIRECTION|CMF_TRACKOWNER,random(-40,40))
	TNT1 A 0 A_SpawnItemEx("DTBFGLightningWhite2",Random(6,-6),Random(6,-6),Random(6,-6),0,0,0,0,128)
    KGS2 B 1 Bright A_SpawnItemEx("ProjectileTrailParticleWhite",Random(-12,12),Random(-12,12),Random(-12,12),Random(-2,2),Random(-2,2),Random(-2,2),Random(-20,20),128)
	KGS2 A 1 A_SpawnItemEx("DTBFGLightningWhite2",Random(6,-6),Random(6,-6),Random(6,-6),0,0,0,0,128)
	TNT1 A 0 A_Explode(32,450,0)
	TNT1 A 0 A_CustomMissile("PlayerZamasuImpDevastatorBolt",6,0,random(0,359),CMF_AIMDIRECTION|CMF_TRACKOWNER,random(-40,40))
	TNT1 A 0 A_SpawnItemEx("DTBFGLightningWhite",Random(6,-6),Random(6,-6),Random(6,-6),0,0,0,0,128)
    KGS2 C 1 Bright A_SpawnItemEx("ProjectileTrailParticleWhite",Random(-12,12),Random(-12,12),Random(-12,12),Random(-2,2),Random(-2,2),Random(-2,2),Random(-20,20),128)
	KGS2 A 1 Bright A_CustomMissile("NemesisCannonProjPlayer",Random(-10,10),0,0,CMF_TRACKOWNER)
	TNT1 A 0 A_Explode(32,450,0)
	TNT1 A 0 A_CustomMissile("PlayerZamasuImpDevastatorBolt",6,0,random(0,359),CMF_AIMDIRECTION|CMF_TRACKOWNER,random(-40,40))
	TNT1 A 0 A_SpawnItemEx("DTBFGLightningWhite2",Random(6,-6),Random(6,-6),Random(6,-6),0,0,0,0,128)
    KGS2 D 1 Bright A_SpawnItemEx("ProjectileTrailParticleWhite",Random(-12,12),Random(-12,12),Random(-12,12),Random(-2,2),Random(-2,2),Random(-2,2),Random(-20,20),128)
	KGS2 A 1 Bright A_CustomMissile("NemesisCannonProjPlayer",Random(-10,10),0,0,CMF_TRACKOWNER)
    Goto Spawn
  Death:
    TNT1 A 0
	TNT1 A 0 A_SetTranslucent(0.75,1)
	TNT1 A 0 Radius_Quake(3,35,0,10,0)
	TNT1 A 0 A_CustomMissile("NemesisCannonProjPlayer",0,0,0,CMF_TRACKOWNER)
	TNT1 A 0 A_CustomMissile("NemesisCannonProjPlayer",0,0,10,CMF_TRACKOWNER)
	TNT1 A 0 A_CustomMissile("NemesisCannonProjPlayer",0,0,20,CMF_TRACKOWNER)
	TNT1 A 0 A_CustomMissile("NemesisCannonProjPlayer",0,0,50,CMF_TRACKOWNER)
	TNT1 A 0 A_CustomMissile("NemesisCannonProjPlayer",0,0,70,CMF_TRACKOWNER)
	TNT1 A 0 A_CustomMissile("NemesisCannonProjPlayer",0,0,140,CMF_TRACKOWNER)
	TNT1 A 0 A_CustomMissile("NemesisCannonProjPlayer",0,0,150,CMF_TRACKOWNER)
	TNT1 A 0 A_CustomMissile("NemesisCannonProjPlayer",0,0,210,CMF_TRACKOWNER)
	TNT1 A 0 A_CustomMissile("NemesisCannonProjPlayer",0,0,240,CMF_TRACKOWNER)
	TNT1 A 0 A_CustomMissile("NemesisCannonProjPlayer",0,0,250,CMF_TRACKOWNER)
	TNT1 A 0 A_CustomMissile("NemesisCannonProjPlayer",0,0,280,CMF_TRACKOWNER)
	TNT1 A 0 A_CustomMissile("NemesisCannonProjPlayer",0,0,350,CMF_TRACKOWNER)	
	TNT1 A 0 A_SpawnItemEx("DTBFGLightningWhiteSpawner",0,0,0,0,0,0,0,128)	
	TNT1 A 0 A_Explode(80,256)
	KGS2 A 6 Bright A_SpawnItemEx("NemDevastatorShockWave",0,0,0,0,0,0,0,128)
	TNT1 A 0 A_Explode(80,256)
	KGS2 B 6 Bright A_SpawnItemEx("NemDevastatorShockWave",0,0,0,0,0,0,0,128)
	TNT1 A 0 A_Explode(80,256)
	KGS2 C 6 Bright A_SpawnItemEx("NemDevastatorShockWave",0,0,0,0,0,0,0,128)
	TNT1 A 0 A_Explode(80,256)
	KGS2 D 6 Bright A_SpawnItemEx("NemDevastatorShockWave",0,0,0,0,0,0,0,128)
	TNT1 A 0 A_Explode(80,256)
	KGS2 A 6 Bright A_SpawnItemEx("NemDevastatorShockWave",0,0,0,0,0,0,0,128)
	TNT1 A 0 A_Explode(80,256)
	KGS2 B 6 Bright A_SpawnItemEx("NemDevastatorShockWave",0,0,0,0,0,0,0,128)
	TNT1 A 0 A_Explode(80,256)
	KGS2 C 6 Bright A_SpawnItemEx("NemDevastatorShockWave",0,0,0,0,0,0,0,128)
	TNT1 A 0 A_Explode(80,256)
	KGS2 D 6 Bright A_SpawnItemEx("NemDevastatorShockWave",0,0,0,0,0,0,0,128)
	TNT1 A 0 A_Explode(80,256)
	KGS2 A 6 Bright A_SpawnItemEx("NemDevastatorShockWave",0,0,0,0,0,0,0,128)
	TNT1 A 0 A_Explode(80,256)
	KGS2 B 6 Bright A_SpawnItemEx("NemDevastatorShockWave",0,0,0,0,0,0,0,128)
	TNT1 A 0 A_Explode(80,256)
	KGS2 C 6 Bright A_SpawnItemEx("NemDevastatorShockWave",0,0,0,0,0,0,0,128)
	TNT1 A 0 A_Explode(80,256)
	KGS2 D 6 Bright A_SpawnItemEx("NemDevastatorShockWave",0,0,0,0,0,0,0,128)
	TNT1 A 0 A_Explode(128,1024,0)
	TNT1 A 0 A_Explode(460,640,0)
	TNT1 A 0 A_Explode(618,256)
	TNT1 A 0 A_StopSoundEx("Voice")
	TNT1 A 0 Radius_Quake(20,12,0,12,0)
	TNT1 A 0 A_PlaySound("weapons/dtech10kexplode")
	TNT1 A 0 A_SpawnItemEx("NemDevastatorShockWave2",0,0,0,0,0,0,0,128)
	TNT1 A 0 A_SpawnItem("NemCardDTBFGEx",0,-10)
	NGE1 D 0 A_CustomMissile("VexedNemesisASGBallPlayerWithFire",0,0,18,2)
    NGE1 D 0 A_CustomMissile("VexedNemesisASGBallPlayerWithFire",0,0,36,2)
    NGE1 D 0 A_CustomMissile("VexedNemesisASGBallPlayerWithFire",0,0,54,2)
    NGE1 D 0 A_CustomMissile("VexedNemesisASGBallPlayerWithFire",0,0,72,2)
    NGE1 D 0 A_CustomMissile("VexedNemesisASGBallPlayerWithFire",0,0,90,2)
    NGE1 D 0 A_CustomMissile("VexedNemesisASGBallPlayerWithFire",0,0,108,2)
    NGE1 D 0 A_CustomMissile("VexedNemesisASGBallPlayerWithFire",0,0,126,2)
    NGE1 D 0 A_CustomMissile("VexedNemesisASGBallPlayerWithFire",0,0,144,2)
    NGE1 D 0 A_CustomMissile("VexedNemesisASGBallPlayerWithFire",0,0,144,2)
    NGE1 D 0 A_CustomMissile("VexedNemesisASGBallPlayerWithFire",0,0,162,2)
    NGE1 D 0 A_CustomMissile("VexedNemesisASGBallPlayerWithFire",0,0,180,2)
    NGE1 D 0 A_CustomMissile("VexedNemesisASGBallPlayerWithFire",0,0,196,2)
    NGE1 D 0 A_CustomMissile("VexedNemesisASGBallPlayerWithFire",0,0,216,2)
    NGE1 D 0 A_CustomMissile("VexedNemesisASGBallPlayerWithFire",0,0,234,2)
    NGE1 D 0 A_CustomMissile("VexedNemesisASGBallPlayerWithFire",0,0,252,2)
    NGE1 D 0 A_CustomMissile("VexedNemesisASGBallPlayerWithFire",0,0,270,2)
    NGE1 D 0 A_CustomMissile("VexedNemesisASGBallPlayerWithFire",0,0,288,2)
    NGE1 D 0 A_CustomMissile("VexedNemesisASGBallPlayerWithFire",0,0,306,2)
    NGE1 D 0 A_CustomMissile("VexedNemesisASGBallPlayerWithFire",0,0,324,2)
    NGE1 D 0 A_CustomMissile("VexedNemesisASGBallPlayerWithFire",0,0,342,2)
	NGE1 AAAAAABBBBBBCCCCCCDDDDDD 1 A_CustomMissile("NemKaboomDevastator22",0,0,random(0,360),2,random(0,360))
    NGE1 EF 6 Bright
    Stop    
    }
}

ACTOR PlayerZamasuImpDevastatorBolt : ZamasuImpDevastatorBolt
{
   damageType "NemesisGuruPlayer"
   Species "Player" 
  +NOTIMEFREEZE
  States
  {
  Spawn:
  	NVS1 A 0 A_Seekermissile(5,5,SMF_LOOK)
    NVS1 A 1 A_SpawnItem("NemBoltTrail")
    Loop
  Death:
    TNT1 A 0
    TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(304) == 1, "ToasterDeath")
    TNT1 A 0 A_SpawnItemEx("NemesisWhiteParticleSpawner",0,0,0,0,0,0,0,128)
    TNT1 AAAA 0 A_CustomMissile("NemKaboomDevastator15",0,0,random(0,360),2,random(0,360))
  ToasterDeath:
    NVS1 LMN 2
    Stop
  }
}

ACTOR PlayerWNDVastatorRailgunSlug : ProjectileBullet
{
   Damage 22
   damageType "NemesisGuruPlayer"
   Species "Player"  
   Decal None
   +RIPPER
   +NOBOSSRIP   
   +BLOODLESSIMPACT
   +NODAMAGETHRUST
   +THRUSPECIES
   +MTHRUSPECIES
   +DONTHARMSPECIES
   -NOEXTREMEDEATH
   States
   {
   Death:
	TNT1 A 1
	Stop
	}
}

ACTOR LegendaryDTBFG10KTracerHuman : DTBFG10KTracerHuman { DamageType "NemesisGuruPlayer" +NOTIMEFREEZE }

actor WNDVTrailParticleGold : LCABFGTrailParticleGold { +NOTIMEFREEZE }

actor WNDVLightningBoltGold : LCALightningBoltGold { +NOTIMEFREEZE }

ACTOR FriendlyLegCybDevastatorBall2 
{
   Radius 8
   Height 8
   Speed 16
   Damage 115
   PROJECTILE
   RENDERSTYLE ADD
   ALPHA 0.90
   ExplosionRadius 68
   ExplosionDamage 132
   Damagetype "LegendaryGuruPlayer"
   Decal DoomImpScorch
   Species "Player"
   +THRUGHOST
   +NOTIMEFREEZE
   +THRUSPECIES
   SeeSound "weapons/devbal"
   DeathSound "weapons/devex2" 
   States
   {
   Spawn:
	LBA2 AB 4 Bright
	Loop
   Death:
	//LBA2 C 1 Bright
	//LBA2 C 3 Bright A_Explode
	TNT1 A 0
	TNT1 A 0 A_SpawnItemEx("GoldParticleSpawner", 0, 0, 0, 0, 0, 0, 0, 128)
	TNT1 AAA 0 A_CustomMissile("Kaboom9Gold", 0, 0, random(0,360), 2, random(0,360))
	TNT1 AAA 0 A_CustomMissile("SmokeFX4", 0, 0, random(0,360), 2, random(0,360))
	LBA2 CDE 3 Bright A_Explode
	Stop
   }
}