ACTOR PlasmaAssShottyMode : Inventory {Inventory.MaxAmount 1}
ACTOR PlasmaAssShottyToken : Inventory {Inventory.MaxAmount 1}
ACTOR PlasmaAssReloadToken : Inventory {Inventory.MaxAmount 1}
Actor PlasmaAssUpgradeToken : Inventory {inventory.maxamount 1}

Actor PulseAssaultShotgunGiver : CustomInventory Replaces "Plasma Shotgun"
{ //Scripted (Mutiplayer weapon spawn can break as well as functions in the upgrade ACS code... this counts for all upgradable weapon actors)
-COUNTITEM
+INVENTORY.BIGPOWERUP
+INVENTORY.AUTOACTIVATE
+INVENTORY.IGNORESKILL
Inventory.PickupSound "weapons/plasmashotgun/pump"
Inventory.PickupMessage "Plasma Shotgun"
States
{
   Spawn:
     TNT1 A 0
	 TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("CheckWeaponWorldSpawn") == 2,1)
	 Goto SpawnDropped
	 STBE "X" -1
	 Wait
   SpawnDropped:
     TNT1 A 1 A_SpawnItem("PulseAssaultShotgunGiverDropped")
	 Stop
   Pickup:
	 TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("MPWeaponCheck") == 2,"PickupMP")
	 TNT1 A 0 A_JumpIfInventory("Pulse Assault Shotgun",1,"GiveUpgrade")
	 TNT1 A 0 A_GiveInventory("NewCell",60)
	 TNT1 A 1 A_GiveInventory("PlasmaShotgun2",1)
	 Stop
   GiveUpgrade:
     TNT1 A 0 A_GiveInventory("NewCell",160)
     TNT1 A 1 A_GiveInventory("Pulse Assault Shotgun",1)
	 Stop
   PickupMP:
     TNT1 A 0 A_JumpIfInventory("PlasmaShotgun2",1,"Nope")
	 TNT1 A 0 A_JumpIfInventory("Pulse Assault Shotgun",1,"Nope")
	 TNT1 A 0 A_GiveInventory("NewCell",60)
     TNT1 A 1 ACS_NamedExecuteAlways("SpawnWeaponActive",0,3)
	 Fail
   Nope:
     STBE "X" 1
	 Fail
	 }
}

Actor PulseAssaultShotgunGiverDropped : PulseAssaultShotgunGiver
{
+INVENTORY.TOSSED
+INVENTORY.NEVERRESPAWN
States
{
  Spawn:
   STBE "X" -1
   Loop
  Pickup:
   TNT1 A 0 A_JumpIfInventory("Pulse Assault Shotgun",1,"GiveUpgrade")
   TNT1 A 0 A_GiveInventory("NewCell",60)
   TNT1 A 1 A_GiveInventory("PlasmaShotgun2",1)
   Stop
   }
}

ACTOR "PlasmaShotgun2" : "Plasma Shotgun"
{ //Scripted (Mutiplayer weapon spawn can break as well as functions in the upgrade ACS code... this counts for all upgradable weapon actors)
  Tag "Plasma Shotgun"
  Weapon.AmmoGive 0
  Dropitem "PulseAssaultShotgunGiverDropped"
  +INVENTORY.UNDROPPABLE
  States
  {
  Spawn:
	STBE "X" -1
	Loop
  Ready:
    TNT1 A 0 A_TakeInventory("WEMAction",1)
	TNT1 A 0 A_JumpIfInventory("WEMAction",1,"LowerWeapon")
    TNT1 A 0 A_JumpIfInventory("HandGrenadeAction",1,"GrenadeCheck")
	TNT1 A 0 A_JumpIfInventory("MineAction",1,"MineCheck")
	PSGA A 1 A_WeaponReady
	Goto Ready+1
  LowerWeapon:
	TNT1 A 0 A_TakeInventory("WEMAction",1)
    PSGA A 1 Offset(5,39) A_PlayWeaponSound("weapons/weapondown")
    PSGA A 1 Offset(14,52)
    PSGA A 1 Offset(24,64)
    PSGA A 1 Offset(36,87)
    PSGA A 1 Offset(48,110)
    CHAG F 1 Offset(1,120)
	Wait
  Select:
    PSGA A 0 A_Raise
	PSGA A 1 A_Raise
	Loop
  Deselect:
	TNT1 A 0 A_PlayWeaponSound("weapons/weapondown")
  	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_TakeInventory("WEMAction",1)
	TNT1 A 0 A_Lower
	PSGA A 1 A_Lower
	Goto Deselect+5
  Fire:
    TNT1 A 0 A_GunFlash
	TNT1 A 0 A_PlaySound("weapons/plasmashotgun/add",7)
	TNT1 A 0 A_FireBullets(5,6,7,24,"PlayerShotgunPlasmaPuff")
	TNT1 A 0 Radius_Quake(3,3,0,1,0)
	TNT1 A 0
	PSGF AB 1 Bright
	TNT1 A 0
	PSGF CDE 1
	PSGA A 3
	PSGR ABCDEFGHIJK 1
	TNT1 A 0 A_PlaySound("plasmashotgun/load")
	TNT1 A 0 A_PlaySound("weapons/pulseshotgun/pump",7)
	TNT1 A 0 A_SpawnItemEx("ShotgunCellCasing",30,-6,25,Random(2,4),Random(3,6),Random(3,6),0)
	PSGR LM 1
	PSGR N 2
	PSGR MLKJIHGFEDCBA 1
	Goto Ready
  GrenadeCheck:
	TNT1 A 0 A_JumpIfInventory("HandGrenadeAmmo",1,"GrenadeToss")
	TNT1 A 0 A_TakeInventory("HandGrenadeAction",1)
	Goto Ready
  GrenadeToss:
  	TNT1 A 0 A_PlayWeaponSound("weapons/weapondown") 
	PSGA A 1 Offset(0,30)
	PSGA A 1 Offset(0,40)
	PSGA A 1 Offset(0,50)
	PSGA A 1 Offset(0,60)
	PSGA A 1 Offset(0,70)
	TNT1 A 4 Offset(0,10)
	TNT1 A 0 Offset(0,32)
	HGRN ABCDEFGHI 1
	TNT1 A 0 A_PlayWeaponSound("weapons/hgrenadepin")
	HGRN JKLM 2
	TNT1 A 11
	TNT1 A 0 A_PlayWeaponSound("weapons/hgrenadethrow")
	TNT1 A 0 A_TakeInventory("HandGrenadeAmmo",1,TIF_NOTAKEINFINITE)
	HGRN N 1 A_FireCustomMissile("ThrownGrenade",0,0,0,0)
	HGRN OPQRS 1
	HGRN TU 2
	TNT1 A 6 A_TakeInventory("HandGrenadeAction",1)
	PSGA A 1 Offset(0,70)
	PSGA A 1 Offset(0,60)
	PSGA A 1 Offset(0,50)
	PSGA A 1 Offset(0,40)
	PSGA A 1 Offset(0,30)
	Goto Ready
  MineCheck:
	TNT1 A 0 A_JumpIfInventory("MineAmmo",1,"MineToss")
	TNT1 A 0 A_TakeInventory("MineAction",1)
	Goto Ready
  MineToss:
  	TNT1 A 0 A_PlayWeaponSound("weapons/weapondown") 
	PSGA A 1 Offset(0,30)
	PSGA A 1 Offset(0,40)
	PSGA A 1 Offset(0,50)
	PSGA A 1 Offset(0,60)
	PSGA A 1 Offset(0,70)
	TNT1 A 8 Offset(0,10)
	TNT1 A 0 Offset(0,32)
	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 JKLM 1
	TNT1 A 5 A_TakeInventory("MineAction",1)
	PSGA A 1 Offset(0,70)
	PSGA A 1 Offset(0,60)
	PSGA A 1 Offset(0,50)
	PSGA A 1 Offset(0,40)
	PSGA A 1 Offset(0,30)
	Goto Ready	
	}
}

ACTOR "Pulse Assault Shotgun" : "Plasma Shotgun"
{ //Scripted (Mutiplayer weapon spawn can break as well as functions in the upgrade ACS code... this counts for all upgradable weapon actors)
//Creator: Fluffy
//Origin: Nexus Infinity
//Sprite: PASX
//Title: "Pulse Assault Shotgun" 
Obituary "%o got turned into a spec of dust by %k's Pulse Assault Shotgun"
Weapon.AmmoGive 0
Weapon.AmmoGive2 0 //Weapon.AmmoGive2 160
Weapon.AmmoUse 0
Weapon.AmmoType "PlasmaAssaultShotgunDrum"
Weapon.AmmoType2 "NewCell"
Inventory.PickupMessage "You got the Pulse Assault Shotgun!"
Scale 0.85
AttackSound ""
Inventory.PickupSound "pulasshotgun/pickup"
Weapon.Upsound ""
+INVENTORY.UNDROPPABLE
+WEAPON.AMMO_OPTIONAL
+WEAPON.NOALERT
+WEAPON.CHEATNOTWEAPON
States
{
  Spawn:
	PAS4 "X" -1
	Loop
  Select:
	TNT1 A 0 A_Raise
    Wait
  Deselect:
    TNT1 A 0 A_PlayWeaponSound("weapons/weapondown")
    TNT1 A 0 A_TakeInventory("HandGrenadeAction",1)
    TNT1 A 0 A_TakeInventory("RailgunAction",1)
    TNT1 A 0 A_TakeInventory("MineAction",1)
	TNT1 A 0 A_TakeInventory("WEMAction",1)
	TNT1 A 0 A_Lower
    PAS8 A 1 A_Lower
    Goto Deselect+5
  Ready:
    TNT1 A 1 A_TakeInventory("RailgunAction",1)
    TNT1 A 0 A_JumpIfInventory("PlasmaAssShottyToken",1,1)
	Goto FirstDraw
	PAS7 A 1 A_PlayWeaponSound("pulasshotgun/draw")
	PAS7 BCDEFGHIJK 1
	Goto ReadyLoop
  PumpCheck2:
    TNT1 A 0 A_JumpIfInventory("PlasmaAssReloadToken",1,"PumpCheck")
  ReadyLoop:
	TNT1 A 0 A_JumpIfInventory("HandGrenadeAction",1,"GrenadeCheck")
	TNT1 A 0 A_JumpIfInventory("MineAction",1,"MineCheck")
	TNT1 A 0 A_JumpIfInventory("RailgunAction",1,"Zoom")
	TNT1 A 0 A_JumpIfInventory("WEMAction",1,"LowerWeapon")
    PAS8 A 1 A_WeaponReady
	TNT1 A 0 A_JumpIfInventory("PlasmaAssaultShotgunDrum",10,"PumpCheck2")
    TNT1 A 0 A_JumpIfInventory("NewCell",10,"AltFire")
	Loop
  LowerWeapon:
	TNT1 A 0 A_TakeInventory("WEMAction",1)
	TNT1 A 0 A_PlayWeaponSound("weapons/weapondown")
	PAS7 KJIHGFEDCB 1
	TNT1 A 1
	Wait
  FirstDraw:
	TNT1 A 0 A_GiveInventory("PlasmaAssUpgradeToken",1)
	TNT1 A 0 A_TakeInventory("PlasmaShotgun2",1)
    TNT1 A 0 A_GiveInventory("PlasmaAssShottyToken",1)
    PAS0 ABCDEF 1
	PAS0 GH 2
	TNT1 A 0 A_GiveInventory("PlasmaAssaultShotgunDrum",90)
	TNT1 A 0 A_TakeInventory("NewCell",90,TIF_NOTAKEINFINITE)
  FirstDrawLoad:
	PAS0 I 3 A_PlayWeaponSound("pulasshotgun/load")
	TNT1 A 0 A_TakeInventory("PlasmaAssReloadToken",1)
	PAS0 JK 3
	PAS0 LMN 2
	PAS8 OPQRS 2
    TNT1 A 0 A_JumpIfInventory("PowerDoubleFiringSpeed",1,"PumpFasterer")
	TNT1 A 0 A_JumpIfInventory("AgilityRuneRage",1,"PumpFasterer")
    TNT1 A 0 A_JumpIfInventory("TrueLegDoubleFiringSpeed",1,"PumpFasterer")
	Goto Pump+10
  Fire:
    TNT1 A 0 A_JumpIfInventory("PlasmaAssShottyMode",1,"Fire2")
	TNT1 A 0 A_JumpIfInventory("PlasmaAssaultShotgunDrum",10,1)
	Goto Empty
	TNT1 A 0 A_AlertMonsters
    TNT1 A 0 Radius_Quake(3,3,0,1,0)
    TNT1 A 0 A_GunFlash
	TNT1 A 0 A_Light1
	TNT1 A 0 A_PlaySound("pulasshotgun/fire")
	TNT1 A 0 A_TakeInventory("PlasmaAssaultShotgunDrum",10,TIF_NOTAKEINFINITE)
	TNT1 AAAAAA 0 A_FireCustomMissile("PulsePlasmaBall",Frandom(-7,7),0,0,0,0,Frandom(-2,2))
	TNT1 AAAA 0 A_FireCustomMissile("PulsePlasmaBall",Frandom(-3,3),0,0,0,0,Frandom(-1,1))
    PAS8 B 2 Bright A_FireCustomMissile("PulseFlareSpawn",-5,0,0,0)
    PAS8 C 2 Bright A_Light2
	PAS8 D 2 Bright
	TNT1 A 0 A_Light0
	PAS8 EF 1
    PAS8 G 2
	PAS8 HI 2 A_Refire
    Goto ReadyLoop
  Fire2:
    TNT1 A 0 A_JumpIfInventory("PlasmaAssaultShotgunDrum",30,1)
	Goto Empty
	TNT1 A 0 A_JumpIfNoAmmo("Empty")
	TNT1 A 0 A_AlertMonsters
    TNT1 A 0 Radius_Quake(3,3,0,1,0)
    TNT1 A 0 A_GunFlash
	TNT1 A 0 A_Light1
	TNT1 A 0 A_PlaySound("pulasshotgun/altfire")
	TNT1 A 0 A_FireCustomMissile("PulseSlugImpact",0,0,0,5)
	TNT1 A 0 A_TakeInventory("PlasmaAssaultShotgunDrum",30,TIF_NOTAKEINFINITE)
    PAS8 B 2 Bright A_RailAttack(Random(200,200), 0, 1, "00 00 ff", None, RGF_NOPIERCING|RGF_SILENT, 0, None, 0, 0, 0, 35, 0.5, 0.5, "PulseSlugTrail")
    PAS8 C 2 Bright A_Light2
	PAS8 D 2 Bright
	TNT1 A 0 A_Light0
	PAS8 EF 1
	TNT1 A 0 A_GiveInventory("PlasmaAssReloadToken")
    PAS8 GGHHII 1 A_WeaponReady(WRF_NOFIRE)
  PumpCheck:
    TNT1 A 0 A_JumpIfInventory("PowerDoubleFiringSpeed",1,"PumpFaster")
	TNT1 A 0 A_JumpIfInventory("AgilityRuneRage",1,"PumpFaster")
    TNT1 A 0 A_JumpIfInventory("TrueLegDoubleFiringSpeed",1,"PumpFaster")
  Pump:
    TNT1 A 0 A_JumpIfInventory("PlasmaAssaultShotgunDrum",30,1)
	Goto ReadyLoop
    PAS8 JKL 2
	PAS8 MNOPQRS 1
	TNT1 A 0 A_PlaySound("pulasshotgun/pump",7)
	TNT1 A 0 A_TakeInventory("PlasmaAssReloadToken",1)
	PAS8 TUV 2
	PAS8 W 4
	PAS8 XYZ 2
	PAS9 ABCD 1
	PAS8 NMLKJ 2
	Goto ReadyLoop
  PumpFaster:
    TNT1 A 0 A_JumpIfInventory("PlasmaAssaultShotgunDrum",30,1)
	Goto ReadyLoop
    PAS8 JKL 2
	PAS8 MNOPQRS 1
  PumpFasterer:
	TNT1 A 0 A_PlaySound("pulasshotgun/pumpdown",7)
	TNT1 A 0 A_TakeInventory("PlasmaAssReloadToken",1)
	PAS8 TUV 2
	PAS8 W 4
	PAS8 XY 2
	PAS8 "Z" 2 A_PlaySound("pulasshotgun/pumpup",7)
	PAS9 ABCD 1
	PAS8 NMLKJ 2
	Goto ReadyLoop
  AltFire:
    TNT1 A 0 A_JumpIfInventory("PlasmaAssaultShotgunDrum",90,2)
    TNT1 A 0 A_JumpIfInventory("NewCell",9,2)
	TNT1 A 0
	Goto ReadyLoop
  Reload:
    PAS8 LM 2
	PAS8 N 1 A_PlayWeaponSound("pulasshotgun/eject")
	PAS9 E 2
	PAS9 F 2 A_FireCustomMissile("CellCasingSpawner",random(-13,-15),0,2,1)
	PAS9 G 4
	PAS9 HIJK 2
  ReloadLoop:
    TNT1 A 0 A_TakeInventory("NewCell",10,TIF_NOTAKEINFINITE)
	TNT1 A 0 A_GiveInventory("PlasmaAssaultShotgunDrum",10)
	TNT1 A 0 A_JumpIfInventory("PlasmaAssaultShotgunDrum",90,"Full")
	TNT1 A 0 A_JumpIfInventory("NewCell",10,"ReloadLoop")
  Full:
    TNT1 A 0 A_JumpIfInventory("PlasmaAssReloadToken",1,"FirstDrawLoad")
    TNT1 A 0 A_PlayWeaponSound("pulasshotgun/load")
	PAS9 LMNO 3
	PAS9 PQR 1
	PAS9 STUVWX 2
	Goto ReadyLoop
  Empty:
    PAS8 G 3 A_PlaySound("pulasshotgun/empty",5)
    PAS8 HIA 3
	Goto AltFire
  Zoom:
    TNT1 A 0
	TNT1 A 0 A_TakeInventory("RailgunAction",1)
  ChangeMode:
    TNT1 A 0 A_JumpIfInventory("PlasmaAssShottyMode",1,"ChangeMode2")
	TNT1 A 0 A_PlaySound("pulasshotgun/slugmode",CHAN_BODY)
	TNT1 A 0 A_Print("Slug Mode",1)
	TNT1 A 0 A_GiveInventory("PlasmaAssShottyMode",1)
    PAS8 GHIA 3
	Goto ReadyLoop
  ChangeMode2:
    TNT1 A 0 A_PlaySound("pulasshotgun/shotgunmode",CHAN_BODY)
	TNT1 A 0 A_Print("Shotgun Mode",1)
	TNT1 A 0 A_TakeInventory("PlasmaAssShottyMode",1)
	PAS8 GHIA 3
	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") 
	PAS8 JKLM 1
	PAS0 NOPQ 1
	TNT1 A 4
	HGRN ABCDEFGHI 1
	TNT1 A 0 A_PlayWeaponSound("weapons/hgrenadepin")
	HGRN JKLM 2
	TNT1 A 11
	TNT1 A 0 A_PlayWeaponSound("weapons/hgrenadethrow")
	TNT1 A 0 A_TakeInventory("HandGrenadeAmmo",1,TIF_NOTAKEINFINITE)
	HGRN N 1 A_FireCustomMissile("ThrownGrenade",0,0,0,0)
	HGRN OPQRS 1
	HGRN TU 2
	TNT1 A 6 A_TakeInventory("HandGrenadeAction",1)
	PAS7 A 1 A_PlayWeaponSound("pulasshotgun/draw")
	PAS7 BCDEFGHIJK 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") 
	PAS8 JKLM 1
	PAS0 NOPQ 1
	TNT1 A 8
	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 JKLM 1
	TNT1 A 5 A_TakeInventory("MineAction",1)
	PAS7 A 1 A_PlayWeaponSound("pulasshotgun/draw")
	PAS7 BCDEFGHIJK 1
	Goto ReadyLoop
	}
}

ACTOR PlasmaAssaultShotgunDrum : Ammo
{
Inventory.Amount 0
Inventory.MaxAmount 90
Ammo.BackpackAmount 0
Ammo.BackpackMaxAmount 90
Inventory.Icon "PAS4X0"
+IGNORESKILL
}

Actor PulsePlasmaBall : FastProjectile
{
Radius 7
Height 7
Speed 75
Damage (random(20,28))
Species "Player"
Scale 0.40
RenderStyle Add
Alpha 0.75
Obituary "%o became a crispy corpse by %k's Plasma Rifle."
DeathSound "weapons/hrballexplode"
MissileType "PulseBlueFlareSmall"
MissileHeight 7
Decal HeatScorch
+RANDOMIZE
+THRUSPECIES
States
{
  Spawn:
    TNT1 A 0
    TNT1 A 0 A_Jump(128,"PlasmaSFX")
    PLST AABBCCDDEEFF 1 Bright
    Loop
  PlasmaSFX:
    PLST AA 1 Bright A_SpawnItemEx("PlasmaLightning3",Random(1,-1),Random(1,-1),Random(1,-1),0,0,0,0,0,128)
	PLST BB 1 Bright A_SpawnItemEx("PlasmaLightning4",Random(1,-1),Random(1,-1),Random(1,-1),0,0,0,0,0,128)
	PLST CC 1 Bright A_SpawnItemEx("PlasmaLightning3",Random(1,-1),Random(1,-1),Random(1,-1),0,0,0,0,0,128)
	PLST DD 1 Bright A_SpawnItemEx("PlasmaLightning4",Random(1,-1),Random(1,-1),Random(1,-1),0,0,0,0,0,128)
	PLST EE 1 Bright A_SpawnItemEx("PlasmaLightning3",Random(1,-1),Random(1,-1),Random(1,-1),0,0,0,0,0,128)
	PLST FF 1 Bright A_SpawnItemEx("PlasmaLightning4",Random(1,-1),Random(1,-1),Random(1,-1),0,0,0,0,0,128)
    Goto Spawn
  Death:
	TNT1 A 0 A_Explode(5,50,XF_HURTSOURCE)
    TNT1 A 0 A_SpawnItemEx("BlueParticleSpawner",0,0,0,0,0,0,0,128)
	TNT1 AAA 0 A_CustomMissile("Kaboom6", 0, 0, random(0,360), 2, random(0,360))
	TNT1 AAA 0 A_CustomMissile("SmokeFX4", 0, 0, random(0,360), 2, random(0,360))
    TNT1 A 1 A_CustomMissile("PulseBlueFire",0,0,random(0, 360),2,random(0, 360))  
    Stop
	}
}

Actor PulsePlasmaBallEnemy : PulsePlasmaBall
{
Damage (Random(10,18))
DamageType "Legendary"
Species "ZombieDeud"
+DONTHURTSPECIES
+DONTHARMSPECIES
-THRUSPECIES
}

ACTOR PlasmaLightning3 : PlasmaLightning { Scale 0.08 }

ACTOR PlasmaLightning4 : PlasmaLightning { Scale 0.12 }

ACTOR PulseFlareSpawn
{
	Speed 20
	PROJECTILE
	+NOCLIP
	States
	{
	Spawn:
	    TNT1 A 0
		TNT1 A 1 A_CustomMissile("PulseBlueFlare",-5,0,-85,0,random(-10,10))
		Stop
	}
}

Actor PulseBlueFlare
{
+NOINTERACTION
+NOGRAVITY
+CLIENTSIDEONLY
+NOTONAUTOMAP
renderstyle Add
radius 1
height 1
alpha 0.4
scale 0.4
states
 {
  Spawn:
	TNT1 A 0 NoDelay A_Jump(128,2)
	PAS2 A 2 bright
	stop
	TNT1 A 0
	PAS2 B 2 bright
	stop
	}
}

Actor PulseBlueFlareSmall : PulseBlueFlare { Alpha 0.3 Scale 0.15 }

Actor PulseBlueFire
{
Height 1
Radius 1
Mass 0
Alpha 1 //Alpha 0.9
RenderStyle Add
Scale 0.5 //0.7
Gravity 0.8
BounceFactor 0.2
Speed 0
+NoInteraction
+NoBlockMap
+DontSplash
+FORCEXYBILLBOARD
+CLIENTSIDEONLY
+THRUACTORS
+NOGRAVITY
+NOTELEPORT
States
{
  Spawn:
    PAS2 CDEFGHIJKLMNOPQR 1 Bright
	Stop
	}
}

Actor PulseSlugImpact : FastProjectile
{
PROJECTILE
Height 16
Radius 16
Speed 420
Alpha 0.95
Scale 0.4
RENDERSTYLE Add
Alpha 1
Damage 50
+BLOODLESSIMPACT
+FORCERADIUSDMG
+FORCEXYBILLBOARD
+EXTREMEDEATH
//+NODAMAGETHRUST
+SKYEXPLODE
+THRUSPECIES
+INVULNERABLE
+DontHurtSpecies
Species "Player"
DamageType "Explosion"
MissileType "PulseShockWave2"
States
{
  Spawn:
    TNT1 A 0 NoDelay A_PlaySound("Weapons/GuruFly",6,1.0,TRUE)
  Looping:
    CSZ9 ABCDEFGHIJKLMNOPQRSTUVWXYZ 1 Bright A_SpawnItemEx("PulseShockWave2",0,0,0,0,0,0,0,SXF_NOCHECKPOSITION|SXF_CLIENTSIDE)
	CSZ0 ABCDE 1 Bright A_SpawnItemEx("PulseShockWave2",0,0,0,0,0,0,0,SXF_NOCHECKPOSITION|SXF_CLIENTSIDE)
	Loop
  Death:
    TNT1 A 0 Radius_Quake(9,8,0,16,0)
	TNT1 A 0 Radius_Quake(8,10,0,18,0)
	TNT1 A 0 Radius_Quake(7,12,0,20,0)
	TNT1 A 0 Radius_Quake(6,14,0,22,0)
	TNT1 A 0 Radius_Quake(5,16,0,24,0)
	TNT1 A 0 Radius_Quake(4,18,0,26,0)
	TNT1 A 0 Radius_Quake(3,20,0,28,0)
	TNT1 A 0 Radius_Quake(2,24,0,30,0)
	TNT1 A 0 Radius_Quake(1,26,0,32,0)
	TNT1 A 0 A_PlaySound("plasmahit/ultimate",6)
	TNT1 A 0 A_SpawnItemEx("PulseShockWave",0,0,0) //LCA-DJB FreezerBFG
	TNT1 AAAAAAAAAAAAAAAAAAAA 0 A_SpawnItemEx("PulseFire1", 0,0,0, (0.1)*Random(-80, 80), 0, (0.1)*Random(-80, 80), Random(0, 360), 128)
	TNT1 AAAAAAAAAAAAAAAAAAAA 0 A_SpawnItemEx("PulseFire2", 0,0,0, (0.1)*Random(-80, 80), 0, (0.1)*Random(-80, 80), Random(0, 360), 128)
	TNT1 AAAAAAAAAAAAAAAAAAAA 0 A_SpawnItemEx("PulseFire3", 0,0,0, (0.1)*Random(-80, 80), 0, (0.1)*Random(-80, 80), Random(0, 360), 128)
	TNT1 A 0 A_Explode(150,340)
	TNT1 AAAAAAAAAAAAAAAAAAAAAAA 0 A_SpawnItemEx("T3DBFGBallParticleFloater",random(-12,12),random(-12,12),random(12,22),random(-2,2),random(-2,2),random(-2,2),random(-20,20),SXF_NOCHECKPOSITION|SXF_CLIENTSIDE,0)
	TNT1 A 1 Bright A_Explode(100,340,XF_HURTSOURCE)
	//TNT1 AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 1 Bright A_FadeOut(0.05)
	Stop
	}
}

Actor PulseSlugImpactEnemy : PulseSlugImpact 
{
Damage 15
DamageType "Legendary"
Species "ZombieDeud"
+DONTHURTSPECIES
+DONTHARMSPECIES
-THRUSPECIES
}

ACTOR PulseShockWave
{
PROJECTILE
Height 1
Radius 1
Scale 1
Speed 2
Scale 0.9
Alpha 0.75
Renderstyle Translucent
Damage (0)
+CLIENTSIDEONLY
+NOINTERACTION
+FORCEXYBILLBOARD
States
	{
	Spawn:
		HBRB ABCDEFGHIJKLMNOPQR 1 Bright A_FadeOut(0.05)
		Stop
	}
}

Actor PulseShockWave2 : LegRailTrail
{
Alpha 1
ReactionTime 1
States
{
  Spawn:
    RAP3 AABBCC 1 Bright A_SetScale(Scalex+0.07)
	TNT1 A 0 A_CountDown
	Loop
  Death:
    RAP3 A 1 Bright A_SetScale(Scalex+0.07)
	TNT1 A 0 A_FadeOut(0.07)
	RAP3 A 1 Bright A_SetScale(Scalex+0.07)
	TNT1 A 0 A_FadeOut(0.07)
	RAP3 B 1 Bright A_SetScale(Scalex+0.07)
	TNT1 A 0 A_FadeOut(0.07)
	RAP3 B 1 Bright A_SetScale(Scalex+0.07)
	TNT1 A 0 A_FadeOut(0.07)
	RAP3 C 1 Bright A_SetScale(Scalex+0.07)
	TNT1 A 0 A_FadeOut(0.07)
	RAP3 C 1 Bright A_SetScale(Scalex+0.07)
	TNT1 A 0 A_FadeOut(0.07)
	Loop
	}
}

ACTOR PulseFire1
{
   Speed 0
   Height 4
   Radius 2
   Damage 0
   RenderStyle Add
   Alpha 1.0
   Scale 0.6
   +NOINTERACTION
   +ForceXYBillboard
   +CLIENTSIDEONLY
   +NONETID
   States
   {
   Spawn:
	  FIRB A 0 A_SetScale(ScaleX+0.01)
	  FIRB A 1 Bright A_FadeOut(0.02)
      Loop
   Death:
	  TNT1 A 1
	  Stop
   }
}

ACTOR PulseFire2 : PulseFire1
{
   States
   {
   Spawn:
	  FIRB B 0 A_SetScale(ScaleX+0.01)
	  FIRB B 1 Bright A_FadeOut(0.02)
      Loop
   }
}

ACTOR PulseFire3 : PulseFire1
{
   States
   {
   Spawn:
	  FIRB C 0 A_SetScale(ScaleX+0.01)
	  FIRB C 1 Bright A_FadeOut(0.02)
      Loop
   }
}

Actor PulseSlugTrail : PlayerNemesisGuruSphereSmokeProjectile
{
Scale 0.2
States
	{
	Spawn1:
		TNT1 A 0 A_SetScale(ScaleX -0.001, ScaleY -0.001)
		TNT1 A 0 A_JumpIf(Alpha<0.3,2)
		TNT1 A 0 //A_Explode(5,64)
		NHP4 A 1 Bright A_FadeOut(0.0065)
		Loop
	Spawn2:
		TNT1 A 0 A_SetScale(ScaleX -0.001, ScaleY -0.001)
		TNT1 A 0 A_JumpIf(Alpha<0.3,2)
		TNT1 A 0 //A_Explode(5,64)
		NHP5 A 1 Bright A_FadeOut(0.0065)
		Loop
	Spawn3:
		TNT1 A 0 A_SetScale(ScaleX -0.001, ScaleY -0.001)
		TNT1 A 0 A_JumpIf(Alpha<0.3,2)
		TNT1 A 0 //A_Explode(5,64)
		NHP6 A 1 Bright A_FadeOut(0.0065)
		Loop
	Spawn4:
		TNT1 A 0 A_SetScale(ScaleX -0.001, ScaleY -0.001)
		TNT1 A 0 A_JumpIf(Alpha<0.3,2)
		TNT1 A 0 //A_Explode(5,64)
		NHP4 A 1 Bright A_FadeOut(0.0065)
		Loop
	Spawn5:
		TNT1 A 0 A_SetScale(ScaleX -0.001, ScaleY -0.001)
		TNT1 A 0 A_JumpIf(Alpha<0.3,2)
		TNT1 A 0 //A_Explode(5,64)
		NHP5 A 1 Bright A_FadeOut(0.0065)
		Loop
	Spawn6:
		TNT1 A 0 A_SetScale(ScaleX -0.001, ScaleY -0.001)
		TNT1 A 0 A_JumpIf(Alpha<0.3,2)
		TNT1 A 0 //A_Explode(5,64)
		NHP6 A 1 Bright A_FadeOut(0.0065)
		Loop
	}
}