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

ACTOR PlayerCursedDevastatorBall : LegendaryDevastatorBall
{
Damage 5000
Speed 40
+SEEKERMISSILE
States
{
  Spawn:
    TNT1 A 0
	TNT1 A 0 A_PlaySoundEx("devastator/fly","Voice",1)
    TNT1 A 0 A_AlertMonsters
    TNT1 A 0 A_PlaySoundEx("devastator/fly","Voice",1)
	TNT1 A 0 A_CustomMissile("FriendlyCursedDevastatorBolt",6,0,random(0,359),CMF_AIMDIRECTION|CMF_TRACKOWNER,random(-40,40))
    CGS2 A 1 Bright A_SpawnItemEx("ProjectileTrailParticlePurple",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_SpawnItemEx("FriendlyCursedDTBFGProjectileAttack",0,0,0,0,0,0,0,SXF_SETMASTER)
	TNT1 A 0 A_CustomMissile("FriendlyCursedDevastatorBolt",6,0,random(0,359),CMF_AIMDIRECTION|CMF_TRACKOWNER,random(-40,40))
	CGS2 B 1 Bright A_SpawnItemEx("ProjectileTrailParticlePurple",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_SpawnItemEx("FriendlyCursedDTBFGProjectileAttack",0,0,0,0,0,0,0,SXF_SETMASTER)
	TNT1 A 0 A_CustomMissile("FriendlyCursedDevastatorBolt",6,0,random(0,359),CMF_AIMDIRECTION|CMF_TRACKOWNER,random(-40,40))	
	CGS2 C 1 Bright A_SpawnItemEx("ProjectileTrailParticlePurple",Random(-12,12),Random(-12,12),Random(-12,12),Random(-2,2),Random(-2,2),Random(-2,2),Random(-20,20),128)
	CGS2 C 1 Bright
	TNT1 A 0 A_SpawnItemEx("FriendlyCursedDTBFGProjectileAttack",0,0,0,0,0,0,0,SXF_SETMASTER)
	TNT1 A 0 A_CustomMissile("FriendlyCursedDevastatorBolt",6,0,random(0,359),CMF_AIMDIRECTION|CMF_TRACKOWNER,random(-40,40))
	TNT1 A 0 A_CustomMissile("FriendlyCursedDevastatorTrail",0,0,0,CMF_AIMDIRECTION|CMF_TRACKOWNER,0)
	CGS2 D 1 Bright A_SpawnItemEx("ProjectileTrailParticlePurple",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_SpawnItemEx("FriendlyCursedDTBFGProjectileAttack",0,0,0,0,0,0,0,SXF_SETMASTER)
	Loop
  DTBFGSFX:
    TNT1 A 0 A_AlertMonsters
    TNT1 A 0 A_PlaySoundEx("devastator/fly","Voice",1)
	TNT1 A 0 A_Explode(32,900,0)
	TNT1 A 0 A_CustomMissile("FriendlyCursedDevastatorBolt",6,0,random(0,359),CMF_AIMDIRECTION|CMF_TRACKOWNER,random(-40,40))
	TNT1 A 0 A_SpawnItemEx("CursedDTBFGLightning",Random(6,-6),Random(6,-6),Random(6,-6),0,0,0,0,128)
    CGS2 A 1 Bright A_SpawnItemEx("ProjectileTrailParticlePurple",Random(-12,12),Random(-12,12),Random(-12,12),Random(-2,2),Random(-2,2),Random(-2,2),Random(-20,20),128)
	CGS2 A 1 Bright A_SpawnItemEx("FriendlyCursedDTBFGProjectileAttack",0,0,0,0,0,0,0,SXF_SETMASTER)
	TNT1 A 0 A_Explode(32,900,0)
	TNT1 A 0 A_CustomMissile("FriendlyCursedDevastatorBolt",6,0,random(0,359),CMF_AIMDIRECTION|CMF_TRACKOWNER,random(-40,40))
	TNT1 A 0 A_SpawnItemEx("CursedDTBFGLightning2",Random(6,-6),Random(6,-6),Random(6,-6),0,0,0,0,128)
    CGS2 B 1 Bright A_SpawnItemEx("ProjectileTrailParticlePurple",Random(-12,12),Random(-12,12),Random(-12,12),Random(-2,2),Random(-2,2),Random(-2,2),Random(-20,20),128)
	CGS2 A 1 Bright A_SpawnItemEx("FriendlyCursedDTBFGProjectileAttack",0,0,0,0,0,0,0,SXF_SETMASTER)
	TNT1 A 0 A_Explode(32,900,0)
	TNT1 A 0 A_CustomMissile("FriendlyCursedDevastatorBolt",6,0,random(0,359),CMF_AIMDIRECTION|CMF_TRACKOWNER,random(-40,40))
	TNT1 A 0 A_SpawnItemEx("CursedDTBFGLightning",Random(6,-6),Random(6,-6),Random(6,-6),0,0,0,0,128)
    CGS2 C 1 Bright A_SpawnItemEx("ProjectileTrailParticlePurple",Random(-12,12),Random(-12,12),Random(-12,12),Random(-2,2),Random(-2,2),Random(-2,2),Random(-20,20),128)
	CGS2 A 1 Bright A_SpawnItemEx("FriendlyCursedDTBFGProjectileAttack",0,0,0,0,0,0,0,SXF_SETMASTER)
	TNT1 A 0 A_Explode(32,900,0)
	TNT1 A 0 A_CustomMissile("FriendlyCursedDevastatorBolt",6,0,random(0,359),CMF_AIMDIRECTION|CMF_TRACKOWNER,random(-40,40))
	TNT1 A 0 A_SpawnItemEx("CursedDTBFGLightning2",Random(6,-6),Random(6,-6),Random(6,-6),0,0,0,0,128)
	TNT1 A 0 A_CustomMissile("FriendlyCursedDevastatorTrail",0,0,0,CMF_AIMDIRECTION|CMF_TRACKOWNER,0)
    CGS2 D 1 Bright A_SpawnItemEx("ProjectileTrailParticlePurple",Random(-12,12),Random(-12,12),Random(-12,12),Random(-2,2),Random(-2,2),Random(-2,2),Random(-20,20),128)
	CGS2 A 1 Bright A_SpawnItemEx("FriendlyCursedDTBFGProjectileAttack",0,0,0,0,0,0,0,SXF_SETMASTER)
    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("FriendlyCursedDTBFGTracer",0,0,0,CMF_TRACKOWNER)
	TNT1 A 0 A_CustomMissile("FriendlyCursedDTBFGTracer",0,0,10,CMF_TRACKOWNER)
	TNT1 A 0 A_CustomMissile("FriendlyCursedDTBFGTracer",0,0,20,CMF_TRACKOWNER)
	TNT1 A 0 A_CustomMissile("FriendlyCursedDTBFGTracer",0,0,30,CMF_TRACKOWNER)
	TNT1 A 0 A_CustomMissile("FriendlyCursedDTBFGTracer",0,0,40,CMF_TRACKOWNER)
	TNT1 A 0 A_CustomMissile("FriendlyCursedDTBFGTracer",0,0,50,CMF_TRACKOWNER)
	TNT1 A 0 A_CustomMissile("FriendlyCursedDTBFGTracer",0,0,60,CMF_TRACKOWNER)
	TNT1 A 0 A_CustomMissile("FriendlyCursedDTBFGTracer",0,0,70,CMF_TRACKOWNER)
	TNT1 A 0 A_CustomMissile("FriendlyCursedDTBFGTracer",0,0,80,CMF_TRACKOWNER)
	TNT1 A 0 A_CustomMissile("FriendlyCursedDTBFGTracer",0,0,90,CMF_TRACKOWNER)
	TNT1 A 0 A_CustomMissile("FriendlyCursedDTBFGTracer",0,0,100,CMF_TRACKOWNER)
	TNT1 A 0 A_CustomMissile("FriendlyCursedDTBFGTracer",0,0,110,CMF_TRACKOWNER)
	TNT1 A 0 A_CustomMissile("FriendlyCursedDTBFGTracer",0,0,120,CMF_TRACKOWNER)
	TNT1 A 0 A_CustomMissile("FriendlyCursedDTBFGTracer",0,0,130,CMF_TRACKOWNER)
	TNT1 A 0 A_CustomMissile("FriendlyCursedDTBFGTracer",0,0,140,CMF_TRACKOWNER)
	TNT1 A 0 A_CustomMissile("FriendlyCursedDTBFGTracer",0,0,150,CMF_TRACKOWNER)
	TNT1 A 0 A_CustomMissile("FriendlyCursedDTBFGTracer",0,0,160,CMF_TRACKOWNER)
	TNT1 A 0 A_CustomMissile("FriendlyCursedDTBFGTracer",0,0,170,CMF_TRACKOWNER)
	TNT1 A 0 A_CustomMissile("FriendlyCursedDTBFGTracer",0,0,180,CMF_TRACKOWNER)
	TNT1 A 0 A_CustomMissile("FriendlyCursedDTBFGTracer",0,0,190,CMF_TRACKOWNER)
	TNT1 A 0 A_CustomMissile("FriendlyCursedDTBFGTracer",0,0,200,CMF_TRACKOWNER)
	TNT1 A 0 A_CustomMissile("FriendlyCursedDTBFGTracer",0,0,210,CMF_TRACKOWNER)
	TNT1 A 0 A_CustomMissile("FriendlyCursedDTBFGTracer",0,0,220,CMF_TRACKOWNER)
	TNT1 A 0 A_CustomMissile("FriendlyCursedDTBFGTracer",0,0,230,CMF_TRACKOWNER)
	TNT1 A 0 A_CustomMissile("FriendlyCursedDTBFGTracer",0,0,240,CMF_TRACKOWNER)
	TNT1 A 0 A_CustomMissile("FriendlyCursedDTBFGTracer",0,0,250,CMF_TRACKOWNER)
	TNT1 A 0 A_CustomMissile("FriendlyCursedDTBFGTracer",0,0,260,CMF_TRACKOWNER)
	TNT1 A 0 A_CustomMissile("FriendlyCursedDTBFGTracer",0,0,270,CMF_TRACKOWNER)
	TNT1 A 0 A_CustomMissile("FriendlyCursedDTBFGTracer",0,0,280,CMF_TRACKOWNER)
	TNT1 A 0 A_CustomMissile("FriendlyCursedDTBFGTracer",0,0,290,CMF_TRACKOWNER)
	TNT1 A 0 A_CustomMissile("FriendlyCursedDTBFGTracer",0,0,300,CMF_TRACKOWNER)
	TNT1 A 0 A_CustomMissile("FriendlyCursedDTBFGTracer",0,0,310,CMF_TRACKOWNER)
	TNT1 A 0 A_CustomMissile("FriendlyCursedDTBFGTracer",0,0,320,CMF_TRACKOWNER)
	TNT1 A 0 A_CustomMissile("FriendlyCursedDTBFGTracer",0,0,330,CMF_TRACKOWNER)
	TNT1 A 0 A_CustomMissile("FriendlyCursedDTBFGTracer",0,0,340,CMF_TRACKOWNER)
	TNT1 A 0 A_CustomMissile("FriendlyCursedDTBFGTracer",0,0,350,CMF_TRACKOWNER)	
	TNT1 A 0 A_SpawnItemEx("DTBFGLightningGoldSpawner",0,0,0,0,0,0,0,128)	
	TNT1 A 0 A_Explode(80,256)
	CGS2 A 6 Bright A_SpawnItemEx("CursedDevastatorShockWave",0,0,0,0,0,0,0,128)
	TNT1 A 0 A_Explode(80,256)
	CGS2 B 6 Bright A_SpawnItemEx("CursedDevastatorShockWave",0,0,0,0,0,0,0,128)
	TNT1 A 0 A_Explode(80,256)
	CGS2 C 6 Bright A_SpawnItemEx("CursedDevastatorShockWave",0,0,0,0,0,0,0,128)
	TNT1 A 0 A_Explode(80,256)
	CGS2 D 6 Bright A_SpawnItemEx("CursedDevastatorShockWave",0,0,0,0,0,0,0,128)
	TNT1 A 0 A_Explode(80,256)
	CGS2 A 6 Bright A_SpawnItemEx("CursedDevastatorShockWave",0,0,0,0,0,0,0,128)
	TNT1 A 0 A_Explode(80,256)
	CGS2 B 6 Bright A_SpawnItemEx("CursedDevastatorShockWave",0,0,0,0,0,0,0,128)
	TNT1 A 0 A_Explode(80,256)
	CGS2 C 6 Bright A_SpawnItemEx("CursedDevastatorShockWave",0,0,0,0,0,0,0,128)
	TNT1 A 0 A_Explode(80,256)
	CGS2 D 6 Bright A_SpawnItemEx("CursedDevastatorShockWave",0,0,0,0,0,0,0,128)
	TNT1 A 0 A_Explode(80,256)
	CGS2 A 6 Bright A_SpawnItemEx("CursedDevastatorShockWave",0,0,0,0,0,0,0,128)
	TNT1 A 0 A_Explode(80,256)
	CGS2 B 6 Bright A_SpawnItemEx("CursedDevastatorShockWave",0,0,0,0,0,0,0,128)
	TNT1 A 0 A_Explode(80,256)
	CGS2 C 6 Bright A_SpawnItemEx("CursedDevastatorShockWave",0,0,0,0,0,0,0,128)
	TNT1 A 0 A_Explode(80,256)
	CGS2 D 6 Bright A_SpawnItemEx("CursedDevastatorShockWave",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("CursedDevastatorShockWave2",0,0,0,0,0,0,0,128)
	TNT1 A 0 A_SpawnItem("CursedDTBFGEx",0,-10)
	6GE5 D 0 Bright A_CustomMissile("FriendlyCursedDevastatorBall2",0,0,18,2)
    6GE5 D 0 Bright A_CustomMissile("FriendlyCursedDevastatorBall2",0,0,36,2)
    6GE5 D 0 Bright A_CustomMissile("FriendlyCursedDevastatorBall2",0,0,54,2)
    6GE5 D 0 Bright A_CustomMissile("FriendlyCursedDevastatorBall2",0,0,72,2)
    6GE5 D 0 Bright A_CustomMissile("FriendlyCursedDevastatorBall2",0,0,90,2)
    6GE5 D 0 Bright A_CustomMissile("FriendlyCursedDevastatorBall2",0,0,108,2)
    6GE5 D 0 Bright A_CustomMissile("FriendlyCursedDevastatorBall2",0,0,126,2)
    6GE5 D 0 Bright A_CustomMissile("FriendlyCursedDevastatorBall2",0,0,144,2)
    6GE5 D 0 Bright A_CustomMissile("FriendlyCursedDevastatorBall2",0,0,144,2)
    6GE5 D 0 Bright A_CustomMissile("FriendlyCursedDevastatorBall2",0,0,162,2)
    6GE5 D 0 Bright A_CustomMissile("FriendlyCursedDevastatorBall2",0,0,180,2)
    6GE5 D 0 Bright A_CustomMissile("FriendlyCursedDevastatorBall2",0,0,196,2)
    6GE5 D 0 Bright A_CustomMissile("FriendlyCursedDevastatorBall2",0,0,216,2)
    6GE5 D 0 Bright A_CustomMissile("FriendlyCursedDevastatorBall2",0,0,234,2)
    6GE5 D 0 Bright A_CustomMissile("FriendlyCursedDevastatorBall2",0,0,252,2)
    6GE5 D 0 Bright A_CustomMissile("FriendlyCursedDevastatorBall2",0,0,270,2)
    6GE5 D 0 Bright A_CustomMissile("FriendlyCursedDevastatorBall2",0,0,288,2)
    6GE5 D 0 Bright A_CustomMissile("FriendlyCursedDevastatorBall2",0,0,306,2)
    6GE5 D 0 Bright A_CustomMissile("FriendlyCursedDevastatorBall2",0,0,324,2)
    6GE5 D 0 Bright A_CustomMissile("FriendlyCursedDevastatorBall2",0,0,342,2)
	6GE5 AAAAAABBBBBBCCCCCCDDDDDD 1 A_CustomMissile("CursedKaboomDevastator22",0,0,random(0,360),2,random(0,360))
    6GE5 EF 6 Bright
    Stop    
    }
}

ACTOR FriendlyCursedDevastatorBolt : CursedCyberDevastatorBolt
{
  Species "Player"
  DamageType "LegendaryGuruPlayer"
  +NOTIMEFREEZE
}

Actor FriendlyCursedDevastatorTrail : CursedDevastatorTrail
{
  Species "Player"
  DamageType "LegendaryGuruPlayer"
  +NOTIMEFREEZE
}

ACTOR FriendlyCursedDTBFGProjectileAttack : CursedDTBFGProjectileAttack
{
  Species "Player"
  DamageType "LegendaryGuruPlayer"
  +NOTIMEFREEZE
}

ACTOR FriendlyCursedDTBFGTracer : CursedDTBFGTracer
{
   Species "Player"
   DamageType "LegendaryGuruPlayer"
   +NOTIMEFREEZE
}

ACTOR FriendlyCursedDevastatorBall2 : CursedCyberDevastatorBall2
{
   Species "Player"
   DamageType "LegendaryGuruPlayer"
   +NOTIMEFREEZE
}