//Flak Cannon Zombie uses Hellsmith Flak Cannon projectiles
ACTOR FlakCannonZombie2 : FlakCannonZombie Replaces FlakCannonZombie
{ 
Health 600
Radius 20
Height 56
Speed 10
Mass 100
PainChance 40
DropItem "PortableMedkit" 166
DropItem "ArmorPlate" 166
DropItem "AmmoPack" 108
DropItem "HandGrenadeAmmo" 200 1
DropItem "HandGrenadeAmmo" 100 1
DropItem "MineAmmo" 200 1
DropItem "MineAmmo" 100 1
DropItem "NewShell" 256
DropItem "Missile" 256
DropItem "Flak Cannon" 50 1
DropItem "BackPack" 155 1
DropItem "NewShellBox" 138
DropItem "MissileBox" 138
DropItem "PortableMedCell" 102 1
DropItem "PortableMedCellPack" 46 1
Damagefactor 0.7
Damagefactor "ZombieDemonTech", 0
Damagefactor "RedZombieDemonTech", 0
DamageFactor "RedZDemonTechProjectile", 0.0
Damagefactor "ZombieRocket", 0
DamageFactor "GeneralTracer", 0.0
DamageFactor "EMGEx", 0.0
DamageFactor "RST", 0.0
DamageFactor "SoulToxic", 0.0
DamageFactor "BeheComet", 0.0
DamageFactor "FatFlamer", 0.0
Damagefactor "HTZombie", 0.0
DamageFactor "MiniRocket", 0.0
DamageFactor "ZombieCannon", 0.0
Damagefactor "ZExplosiveBullets", 0.0
Damagefactor "ZGrenade", 0.0
DamageFactor "SoulToxic", 0.0
DamageFactor "Cacolich", 0.0
MONSTER 
+FLOORCLIP
+MISSILEMORE
+MISSILEEVENMORE
+QUICKTORETALIATE
+DONTHURTSPECIES
+NODROPOFF
+NOTARGET
+NORADIUSDMG
+FORCERADIUSDMG
+NOFEAR
SeeSound "UltraZombie/see"
PainSound "UltraZombie/pain"
DeathSound "UltraZombie/die"
ActiveSound "UltraZombie/idle"
AttackSound ""
Obituary "%k was shredded by a Flak Zombie's flak attack."
Tag  "\c[y5]Flak Cannon Zombie\c-"
States
{
Spawn:
    HZOM A 10 A_Look
    Loop
See:
    HZOM AABB 3 A_Chase
    TNT1 A 0 A_SpawnItem("FootStep",0,0,0,0)
    HZOM CCDD 3 A_Chase
    TNT1 A 0 A_SpawnItem("FootStep",0,0,0,0)
    Loop
Missile:
    TNT1 A 0 A_JumpIfCloser(400,"Cannon")
	Goto BurstShot
 Cannon:
    HZOM E 15 A_FaceTarget
	TNT1 A 0 A_PlaySound("Weapon/FLAKAFIR",5)
	TNT1 A 0 Radius_Quake(8,6,0,1,0)
	TNT1 A 0 A_CustomMissile("NHSFlakSlug3",30,0,0,0)
    HZOM F 3 Bright A_FaceTarget
    HZOM E 5 A_FaceTarget
	HZOM EEEEEE 2 A_FaceTarget
	HZOM E 2 A_PlaySound("Weapon/FLAKSNAP")
	HZOM EEEEEE 2 A_FaceTarget
	HZOM E 4 A_FaceTarget
	HZOM EE 2 A_FaceTarget
    TNT1 A 0 A_playsound("Weapon/FLAKRELD")
	HZOM E 6 A_FaceTarget
	HZOM EEEE 2 A_FaceTarget
	HZOM E 2 A_FaceTarget
    Goto See
 BurstShot:
    HZOM E 15 A_FaceTarget
	TNT1 A 0 A_PlaySound("Weapon/FLAKFIRE",5)
	TNT1 A 0 Radius_Quake(8,6,0,1,0)
	TNT1 AAAAAAAA 0 A_CustomMissile("NHSFlakShard3",30,0,frandom(4,-4),0)
    HZOM F 3 Bright A_FaceTarget
    HZOM E 5 A_FaceTarget
	HZOM EEEEEE 2 A_FaceTarget
	HZOM E 2 A_PlaySound("Weapon/FLAKSNAP")
	HZOM EEEEEE 2 A_FaceTarget
	HZOM E 4 A_FaceTarget
	HZOM EE 2 A_FaceTarget
    TNT1 A 0 A_playsound("Weapon/FLAKRELD")
	HZOM E 6 A_FaceTarget
	HZOM EEEE 2 A_FaceTarget
	HZOM E 2 A_FaceTarget
    Goto See
Pain:
    HZOM G 6 A_Pain
    Goto See
Death:
    HZOM H 5 A_Scream
    HZOM I 5 A_Fall
    HZOM J 5 A_SpawnItem("BodyCrash",0,0,0,0)
	HZOM K 5 A_Fall
    HZOM L -1
    Stop
Raise:
	TNT1 A 0
	TNT1 A 0 A_SpawnItemEx("VileHealEffect",0,0,0,0,0,0,0,SXF_NOCHECKPOSITION)
    HZOM LKJIH 5
    Goto See
    }
}


actor NHSFlakSlug3
{
	radius 8
	height 8
	speed 30
	damage 34
	Species "EliteZombie"
    DamageType "EMGEx"
	deathsound "flak/expl"
	PROJECTILE
	scale 0.4
	Reactiontime 8
	Decal "FadingScorch"
	-NOGRAVITY
	Gravity 0.25
	states
	{
	Spawn:
		HFSL A 5
		HFSL A 6 A_SpawnItemEx("NHSFlakSmoke",0,0,0,0,0,2,0,128,0)
		goto Spawn+1
	Death:
		TNT1 A 0 A_Explode(110,140)
		TNT1 A 0 A_NoGravity
		TNT1 A 0 A_SpawnItemEx("NHSFlakExplosion", 0, 0, 0, 0, 0, 0, 0, 128, 0)
		TNT1 AAAAAAAAAA 0 A_CustomMissile("NHSFlakShard3",0,0,random(0,359),6,random(-90,90)) //10 shards, Flags 6 = AimDirection and TrackOwner
		TNT1 AAAAAAAAAAAAA 8 A_SpawnItemEx("NHSFlakSmoke",0,0,0,0,0,2,0,128,0)
		stop
	}
}

ACTOR NHSFlakShard3
{
	Projectile
	+RANDOMIZE
	+FORCEXYBILLBOARD
	+BOUNCEONFLOORS
	+BOUNCEONCEILINGS
	+NOGRAVITY
	+THRUSPECIES
	BounceType Grenade
	bouncefactor 1
	BounceSound "flak/hit"
	wallbouncefactor 1
	Species "EliteZombie"
    DamageType "EMGEx"
	damage (5*random(1,5))
	radius 2
	height 2
	speed 45
	alpha 0.9
	scale 0.4
	Decal "BulletChip"
	DamageType "NULL"
	states
	{
	Spawn:
		HFSH ABCDABCD 1 BRIGHT Light("NHSFLAKHI")
		HFSH EFGHEFGHEFGH 1 BRIGHT Light("NHSFLAKLO")
		TNT1 A 1 A_CustomMissile("NHSFlakResidue",-5,0,0,CMF_AIMDIRECTION)
	Death:
		Stop
	XDeath:
		TNT1 A 0
		Stop
	}
}

//Carrier infinite loop fix
ACTOR Carrier2 : Carrier Replaces Carrier
{
	Health 2100
	Radius 31
	Height 63
	Mass 1000
	Speed 13
	Species "EleSouls"
	PainChance 20
	PainChance "Souls", 0
	PainChance "ChaosSoul", 0
	PainChance "ImpureSoul", 0
	DamageFactor "CurseComet", 0.0
	DamageFactor "HelementalComet", 0.0
	DamageFactor "SoulToxic", 0.0
	DamageFactor "BombBreath", 0.0
	Damagefactor "EleSouls", 0.0
	DamageFactor "SatanGuard", 0.0
	DropItem "NemesisHealthBonusMax", 200, 16
	DropItem "NemesisArmorBonus16", 200
	DropItem "BigDustMana" 128 100
	DropItem "DustMana" 256 30
	DropItem "DustMana" 256 30
	DropItem "LifeSphere" 60
	DropItem "FantasyStaff" 50
	DropItem "OccultSpellbook" 30
	MeleeDamage 60
	MeleeRange 72
	Scale 0.85
	Monster
	+MISSILEMORE
	+MISSILEEVENMORE
	+FLOAT 
	+NOGRAVITY 
	+DONTFALL 
	+NOICEDEATH
	+NOBLOOD
	+DONTHARMSPECIES
	SeeSound "carrier/sight"
	PainSound "carrier/pain"
	DeathSound "carrier/death"
	ActiveSound "carrier/active"
	MeleeSound "carrier/melee"
	HitObituary "%o was crushed by the Carrier's sharp teeth."
	Obituary "%o couldn't evade a Carrier's swarm of destruction."
	Tag "\c[z2]Carrier\c-"
	var int user_missile;
	States
	{
  Spawn:
	CARR A 10 Bright A_Look
	Loop
  See:
	CARR A 0 Bright A_SetShootable
	CARR AAAAAAAAAAAA 3 Bright A_Chase
	TNT1 A 0 A_Jump(26,"Evade")
	Loop
  Evade:
	TNT1 A 0 A_Jump(128,7)
	TNT1 A 0 ThrustThing(Angle*256/360+64,18,0,0)
	CARR BB 3 A_Chase
	TNT1 A 0 A_Stop
	Goto See
	TNT1 A 0 ThrustThing(Angle*256/360+192,18,0,0)		 
	CARR BB 3 A_Chase
	TNT1 A 0 A_Stop		 
	Goto See
  Missile:
    CARR A 1 A_FaceTarget
	TNT1 A 0 A_Jump(256,"Beam","Soul","FantasySeal","Souls","Elemental","Comet","Comet2")
    Goto See
  Soul:
    CARR BC 8 Bright A_FaceTarget
    CARR DD 8 Bright A_DualPainAttack("RandomSoulLaunch")
	CARR DD 8 Bright A_DualPainAttack("RandomSoulLaunch")
    CARR CB 8 Bright A_FaceTarget
    Goto See
  Souls:
    TNT1 A 0 A_Jump(106,"Beam","Soul","FantasySeal","Comet","Comet2")
	CARR BC 6 Bright A_FaceTarget
    CARR DD 6 Bright A_PainAttack("RandomSoulLaunch")
	CARR DD 6 Bright A_PainAttack("RandomSoulLaunch")
	CARR DD 6 Bright A_PainAttack("RandomSoulLaunch")
	CARR DD 6 Bright A_PainAttack("RandomSoulLaunch")
    CARR CB 6 Bright A_FaceTarget
  Elemental:
	TNT1 A 0 A_Jump(106,"Beam","Soul","FantasySeal","Comet","Comet2")
	CARR BC 8 Bright A_FaceTarget
    CARR DD 8 Bright A_PainAttack("RandomElementalLaunch")
    CARR CB 8 Bright A_FaceTarget
  Beam:
    TNT1 A 0 A_SpawnItem("HierophantBlueSmokeSpawner",0,0,0,0)
    CARR B 8 Bright A_FaceTarget 
    TNT1 A 0 A_SpawnItem("HierophantBlueSmokeSpawner",0,0,0,0)
    CARR C 8 Bright A_FaceTarget 
    TNT1 A 0 A_PlaySound("FantasyStaff/Fire",7) 
	TNT1 A 0 A_SetUserVar("user_missile",0)	
  BeamLoop:
	TNT1 A 0 A_JumpIf(user_missile >= 10,"BeamEnd")	 
	TNT1 A 0 A_SetUserVar("user_missile",user_missile+1)
	TNT1 A 0 A_FaceTarget
    CARR DDD 1 Bright A_CustomMissile("CarrierFantasyStaffBeam",24,0,0,0,0)
    TNT1 A 0 A_PlaySound("FantasyStaff/FireLoop",6)
	Loop
  BeamEnd:
    CARR C 10 Bright
    CARR B 10 Bright
    Goto See
  FantasySeal:
    TNT1 A 0 A_PlaySound("FantasyStaff/Charge",7)
    TNT1 A 0 A_SpawnItem("HierophantBlueSmokeSpawner",0,0,0,0)
    CARR B 8 Bright A_FaceTarget 
    TNT1 A 0 A_SpawnItem("HierophantBlueSmokeSpawner",0,0,0,0)
    CARR B 8 Bright A_FaceTarget 
    TNT1 A 0 A_SpawnItem("HierophantBlueSmokeSpawner",0,0,0,0)
    CARR B 8 Bright A_FaceTarget 
    TNT1 A 0 A_SpawnItem("HierophantBlueSmokeSpawner",0,0,0,0)
    CARR B 8 Bright A_FaceTarget 
    TNT1 A 0 A_SpawnItem("HierophantBlueSmokeSpawner",0,0,0,0)
    CARR C 8 Bright A_FaceTarget 
    TNT1 A 0 A_SpawnItem("HierophantBlueSmokeSpawner",0,0,0,0)
    CARR C 8 Bright A_FaceTarget 
    TNT1 A 0 A_SpawnItem("HierophantBlueSmokeSpawner",0,0,0,0)
    CARR C 8 Bright A_FaceTarget 
	TNT1 A 0 A_FaceTarget
    TNT1 A 0 Bright A_PlaySound("FantasyStaff/Fire2",6)
    TNT1 A 0 Bright A_PlaySound("FantasyStaff/Meltdown",7)
    CARR D 15 Bright A_CustomMissile("CarrierFantasySeal",24,0,0,0,0)
    CARR C 15 Bright
    CARR B 10 Bright
    Goto See
  Charge:
	TNT1 A 0 A_Jump(142,1)
	Goto Normal
	TNT1 A 0 A_ScaleVelocity(0)
	TNT1 A 0 A_PlaySound("carrier/pain")
	CARR B 6 Bright A_FaceTarget
	TNT1 A 0 A_ChangeFlag(SLIDESONWALLS,1)
	CARR C 4 Bright A_Recoil(-8)
	CARR D 4 Bright A_SkullAttack(40)
	CARR DCB 4 Bright
	Goto Melee
  Comet: 
    CARR BC 6 A_FaceTarget
    CARR D 2 Bright A_FaceTarget
	CARR D 1 Bright A_CustomMissile("CarrierComet",24,0,0,0,0)
    TNT1 A 0 A_CustomMissile("CarrierComet",24,0,6,0,0)
    CARR D 1 Bright A_CustomMissile("CarrierComet",24,0,-6,0,0)
	CARR CB 4 A_FaceTarget
	Goto See
  Comet2: 
    CARR BC 6 A_FaceTarget
    CARR D 2 Bright A_FaceTarget
	CARR D 1 Bright A_CustomMissile("CurseComet",24,0,0,0,0)
    TNT1 A 0 A_CustomMissile("CurseComet",24,0,6,0,0)
    CARR D 1 Bright A_CustomMissile("CurseComet",24,0,-6,0,0)
	CARR CB 4 A_FaceTarget
	Goto See
  Melee:
	CARR BC 5 Bright A_FaceTarget
	CARR D 5 Bright A_MeleeAttack
	CARR CB 5 Bright A_FaceTarget
	Goto See
  Pain:
	CARR E 0 A_Jump(128,"PainMissile")
	TNT1 A 0 A_Jump(106,"PainEvade")
	CARR E 5
	CARR E 5 A_Pain
	Goto See
  PainMissile:
	CARR E 5
	CARR E 5 A_Pain
	Goto Missile
  PainEvade:
	TNT1 A 0 A_Jump(128,7)
	TNT1 A 0 ThrustThing(Angle*256/360+64,24,0,0)
	CARR BB 3 A_Chase
	TNT1 A 0 A_Stop
	Goto See
	TNT1 A 0 ThrustThing(Angle*256/360+192,24,0,0)		 
	CARR BB 3 A_Chase
	TNT1 A 0 A_Stop		 
	Goto See
  Death:
	TNT1 A 0 A_PlaySound("carrier/death",7)
	CARR F 7 Bright A_NoBlocking
	CARR G 5 Bright A_Scream
	CARR H 5 Bright
	CARR I 5 Bright
	CARR I 0 Bright A_SpawnItemEx("CarrierDeath",0,0,0,velx,vely,velz,angle,SXF_ABSOLUTEVELOCITY)
	TNT1 A 0
	TNT1 A 0 A_CustomMissile("FantasySealExplosion",0,0,0,CMF_AIMDIRECTION,0)
	TNT1 A 0 A_CustomMissile("FantasySealExplosion",0,0,60,CMF_AIMDIRECTION,0)
	TNT1 A 0 A_CustomMissile("FantasySealExplosion",0,0,120,CMF_AIMDIRECTION,0)
	TNT1 A 0 A_CustomMissile("FantasySealExplosion",0,0,180,CMF_AIMDIRECTION,0)
	TNT1 A 0 A_CustomMissile("FantasySealExplosion",0,0,240,CMF_AIMDIRECTION,0)
	TNT1 A 0 A_CustomMissile("FantasySealExplosion",0,0,300,CMF_AIMDIRECTION,0)
	TNT1 A 0 A_CustomMissile("FantasySealExplosion2",0,0,0,CMF_AIMDIRECTION,0)
	TNT1 A 0 A_SpawnItem("BlueProjExplodeLarge")
	TNT1 A 0 A_Explode(30,200)
	TNT1 AAAAAAAAA 0 A_SpawnItemEx("BlueProjParticleSuperLarge",0,0,0,frandom(-7,7),frandom(-7,7),frandom(-7,7),random(0,359))
	CARR O 0 A_Gravity
  Falling:
	CARR O 1 A_CheckFloor("Crunchy")
	loop
  Crunchy:
	CARR P 0 A_PlaySound("wrath/ground")
	CARR P -1
	Stop
  //Raise:
	//CARR NMLKJIHGFD 5 BRIGHT
	//goto See
		
	}
}

//Phase Cube damage nerf
Actor PhaseCubeShotNerf : PhaseCubeShot Replaces PhaseCubeShot
{
   Height 4
   Radius 4
   Speed 50
   Damage 3
   Scale 0.06
   PROJECTILE
   +FORCERADIUSDMG
   DamageType "Souls"
   Species "Souls"
   SeeSound "weapons/demontechfire"
   DeathSound "weapons/demontechex"
   Decal DTRScorch
   States
   {
   Spawn:
	  TNT1 A 0 A_SeekerMissile(12,0)
	  TNT1 A 0
	  TNT1 A 0 A_Jump(128,"Spawn2")
   Normal:
	  TNT1 A 0 A_SeekerMissile(12,0)
   	  TNT1 A 0 A_Jump(128,"NormalFX")
      PTPR A 1 Bright A_SpawnItemEx("PhaseSentryDemonTechTrail",Random(-1,1),Random(-1,1),Random(-1,1),Random(-1,1),Random(-1,1),Random(-1,1),Random(-20,20),128)
      Loop
   NormalFX:
      PTPR A 1 Bright A_SpawnItemEx("PhaseSentryDemonTechTrail",Random(-1,1),Random(-1,1),Random(-1,1),Random(-1,1),Random(-1,1),Random(-1,1),Random(-20,20),128)
      PTPR A 1 Bright A_SpawnItemEx("PhaseSentryDemonTechTrail",Random(-1,1),Random(-1,1),Random(-1,1),Random(-1,1),Random(-1,1),Random(-1,1),Random(-20,20),128)
      Goto Normal
   Spawn2:
	  TNT1 A 0 A_SeekerMissile(12,0)
	  TNT1 A 0 A_Jump(128,"Spawn2FX")
      PTPR A 1 Bright A_SpawnItemEx("PhaseSentryDemonTechTrail2",Random(-1,1),Random(-1,1),Random(-1,1),Random(-1,1),Random(-1,1),Random(-1,1),Random(-20,20),128)
      Loop
   Spawn2FX:
      PTPR A 1 Bright A_SpawnItemEx("PhaseSentryDemonTechTrail",Random(-1,1),Random(-1,1),Random(-1,1),Random(-1,1),Random(-1,1),Random(-1,1),Random(-20,20),128)
      PTPR A 1 Bright A_SpawnItemEx("PhaseSentryDemonTechTrail",Random(-1,1),Random(-1,1),Random(-1,1),Random(-1,1),Random(-1,1),Random(-1,1),Random(-20,20),128)
      Goto Spawn2
   Death:
   	  TNT1 A 0
	  TNT1 A 0 A_SpawnItemEx("PhaseSentryDemonTechEx",0,0,0,0,0,0,0,128,0)
	  TNT1 AAA 0 A_CustomMissile("Kaboom8", 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 Bright A_Explode(6,48)
      Stop
	}
}

//Cyborg Shotgunner damage nerf
Actor CyborgShotgunner2 : CyborgShotgunner Replaces CyborgShotgunner
{
Health 500
Radius 20
Height 56
Mass 250
Speed 8
PainChance 25
Monster
SeeSound "Monsters/NBSight"
PainSound "Monsters/NBPain"
DeathSound "Monsters/NBDeath"
ActiveSound "Monsters/NBAct"
+FLOORCLIP 
+MISSILEMORE
+MISSILEEVENMORE
+QUICKTORETALIATE
+DONTHARMSPECIES
Species "EliteZombies"
DamageFactor "Hell", 0.0
Damagefactor "RedZombieDemonTech", 0
Damagefactor "ZombieRocket", 0
Damagefactor "ZombieDemonTech", 0
DamageFactor "RedZDemonTechProjectile", 0.0
Damagefactor "GeneralTracer", 0
DamageFactor "EMGEx", 0
DamageFactor "RST", 0.0
DamageFactor "SoulToxic", 0.0
DamageFactor "BeheComet", 0.0
DamageFactor "FatFlamer", 0.0
Damagefactor "HTZombie", 0.0
DamageFactor "MiniRocket", 0.0
DamageFactor "ZombieCannon", 0.0
Damagefactor "ZExplosiveBullets", 0.0
Damagefactor "ZGrenade", 0.0
DropItem "NewCell", 200
DropItem "NewCell", 50
DropItem "NewCellPack", 25
DropItem "HealthFlask", 180
DropItem "MineAmmo", 50, 1
DropItem "PortableMedkit", 130
DropItem "BackPack", 75
DropItem "ArmorPlate", 120
DropItem "AmmoPack", 100
DropItem "HandGrenadeAmmo", 200, 1
DropItem "MineAmmo", 100, 1
DropItem "Plasma Shotgun", 45, 1
MaxStepHeight 32
MaxDropOffHeight 32
Obituary "%o was eradicated by a Cyborg Shotgunner."
Tag "\c[h2]Cyborg Shotgunner\c-"
States
{
 Spawn:
	CYSM AA 10 A_Look
	Loop
 See:
	CYSM AA 4 A_Chase
	CYSM A 0 A_PlaySound("Monsters/NBWalk")
	CYSM BBCC 4 A_Chase
	CYSM CC 0 A_PlaySound("Monsters/NBWalk")
	CYSM DD 4 A_Chase
	Loop
 Missile:
	CYSM E 18 A_FaceTarget
	TNT1 A 0 A_PlaySound("weapons/plasmashotgun/add")
	TNT1 AAAAAAA 0 Bright A_CustomMissile("CyShotgunnerShot",Random(26,29),0,Random(5,-5),0)
	CYSM F 4 Bright A_CustomBulletAttack(5,6,7,8)
    CYSM E 10 A_FaceTarget
	CYSM E 8 A_PlaySound("plasmashotgun/load")
	TNT1 A 0 A_PlaySound("weapons/pulseshotgun/pump")
	TNT1 A 0 A_SpawnItemEx("ShotgunCellCasing", -8, 0, 30, Random(2, 6), 0, Random(1, 3), Random(-80, -90), 128)
	CYSM E 8 A_FaceTarget
	Goto See
  Pain:
    TNT1 A 0
    TNT1 A 0 A_Jump(128,"PainMissile")
    CYSM G 4
    CYSM G 4 A_Pain
    Goto See
  PainMissile: 
    CYSM G 4
    CYSM G 4 A_Pain
    Goto Missile
  Death:
    CYSM H 5
    CYSM I 5 A_ScreamAndUnBlock
    CYSM JKLM 5
	CYSM N -1
  XDeath:
    CYSM O 3 A_ScreamAndUnBlock
	TNT1 A 0 A_SpawnItem("RocketEx",0,32)
    TNT1 A 0 A_SpawnItemEx("OrangeParticleSpawner", 0, 0, 0, 0, 0, 0, 0, 128) 
	TNT1 AAA 0 A_CustomMissile("SmokeFX2", 0, 0, random(0,360), 2, random(0,360))
	TNT1 AAAA 0 A_SpawnItemEx("Debris",0,0,0,Random(4,-4),Random(4,-4),Random(4,8),0,128)
    CYSM P 3 A_XScream
    CYSM Q 3 A_SpawnItemEx("GibbedGenerator",0,0,0,0,0,0,0,128,0)
    CYSM R 3 A_Fall
    CYSM STUV 3
    CYSM W -1 
    Stop	
  Raise:
	TNT1 A 0
	TNT1 A 0 A_SpawnItemEx("VileHealEffect",0,0,0,0,0,0,0,SXF_NOCHECKPOSITION)
    CYSM NMLKJIH 5
    Goto See	
}
}

//Default damage factor with Hellclones
ACTOR HellCloneHealth : HellClone Replaces HellClone
{
Tag "\c[i7]Hell\c[a2]Clone\c-"
Damagefactor 1.0
}

ACTOR HellCloneHealth2 : HellClone2 Replaces HellClone2
{
Tag "\c[i7]Hell\c[a2]Clone\c-"
Damagefactor 1.0
}

ACTOR HellCloneHealth3 : HellClone3 Replaces HellClone3
{
Tag "\c[i7]Hell\c[a2]Clone\c-"
Damagefactor 1.0
}

ACTOR HellCloneHealth4 : HellClone4 Replaces HellClone4
{
Tag "\c[i7]Hell\c[a2]Clone\c-"
Damagefactor 1.0
DropItem "PortableMedkit" 120
DropItem "ArmorPlate" 120
DropItem "AmmoPack" 100
DropItem "HandGrenadeAmmo" 200 1
DropItem "MineAmmo" 100 1
DropItem "NewCell" 200 50
DropItem "NewCell" 200 50
DropItem "NewCell" 200 50
DropItem "BackPack" 122 1
DropItem "CellPack" 128 100
DropItem "CellPack", 200 100
DropItem "BFG10K " 100 1
DropItem "BFG9500" 100 1
}

//Hackroid ASG Magazine backpack fix
ACTOR "Hackroid ASG" : "1337ASG" Replaces "HackroidASG"
{
	Scale 0.85
	Weapon.PreferredSkin "LegendaryASG-Marine"
	Weapon.SelectionOrder 4500
	Weapon.KickBack 160
	Weapon.AmmoUse 0
    Weapon.AmmoGive 12
    Weapon.AmmoType "HCKASGDrumFix"
	Inventory.PickupSound "LShotgun/Cock"
	Inventory.PickupMessage "Behold... Hackroid A.S.G."
	Obituary "%o was wrecked even infernally pieces by %k's unknown bullets from a ASG."
	Decal ELegBulletChip
	Tag "Hackroid Assault Shotgun"
	+WEAPON.AMMO_OPTIONAL
	+WEAPON.NOALERT
  States
  {
  Ready:
    TNT1 A 0 A_PlayWeaponSound("LShotgun/Cock")
	HGSG VWXYZ 1
	TNT1 A 0 A_JumpIfInventory("HandGrenadeAction",1,"GrenadeCheck")
	TNT1 A 0 A_JumpIfInventory("MineAction",1,"MineCheck")
    HGSG A 1 A_WeaponReady
    Goto Ready+6
  Deselect: 
    TNT1 A 0 A_PlaySound("weapons/weapondown")
    HGSG A 1 A_Lower
    Goto Deselect+1
  Select:
	TNT1 A 0 A_Raise
    Wait	
  Fire:
    TNT1 A 0
	TNT1 A 0 A_JumpIfInventory("HCKASGDrumFix",1,1)
	Goto Empty
	TNT1 A 0 A_PlaySound("1337ASG/Fire", 1)
	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_SpawnItemEx("1337ShellCasing",30,5,25,Random(2,4),Random(3,6),Random(3,6),0)
	TNT1 AAAAAA 0 A_FireCustomMissile("1337SGTracer",Random(5,-5),0,0,Random(5,-5))
	TNT1 A 0 A_TakeInventory("HCKASGDrumFix",1)
    HGSG B 2 Bright A_FireBullets(6.2,3.4,7,Random(25,35),"1337ModdedBulletPuff")
    HGSG C 2 Bright A_Light2
	TNT1 A 0 A_Light0
    HGSG DEFG 1
	HGSG HI 4
    Goto Ready+6
  Empty:
    HGSG A 10 A_PlaySound("weapons/click")
  AltFire:
  	TNT1 A 0 A_JumpIfInventory("HCKASGDrumFix",12,2)
    TNT1 A 0 A_JumpIfInventory("HCKShell",1,2)
	TNT1 A 0
	Goto Ready+6
	HGSG JKLMN 1
	HGSG O 2
	HGSR A 2 A_PlaySound("lasgguy/asgout")
  	HGSR B 3
	HGSG U 40 A_FireCustomMissile("1337EmptyDrumSpawner", 0, 0, 10, 1) 
	HGSG TSR 1
	HGSG Q 2
  Reload:
	TNT1 A 0 A_TakeInventory("HCKShell",1)
	TNT1 A 0 A_GiveInventory("HCKASGDrumFix",1)
	TNT1 A 0 A_JumpIfInventory("HCKASGDrumFix",12,2)
	TNT1 A 0 A_JumpIfInventory("HCKShell",1,"Reload")
	TNT1 A 0
	Goto Reload2
  Reload2:
	HGSG P 3
	HGSG O 6 A_PlaySound("lasgguy/asgin")
	HGSG NMLKJ 1
	Goto Ready+6
  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") 
	HGSG ZYXWV 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)
	HGRN J 1 A_FireCustomMissile("ThrownGrenade",0,0,0,0)
	HGRN KLM 2
	TNT1 A 6
	TNT1 A 0 A_JumpIfInventory("HandGrenadeAmmo",1,2)
    TNT1 A 0 A_TakeInventory("Hand Grenade",1)
	TNT1 A 0 A_TakeInventory("HandGrenadeAction",1)
	TNT1 A 0
	HGSG VWXYZ 1
	Goto Ready+6
  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") 
	HGSG ZYXWV 1
	TNT1 A 10
	TNT1 A 0 A_PlayWeaponSound("weapons/hgrenadethrow")
	MINE ABCDEF 1		
	TNT1 A 0 A_TakeInventory("MineAmmo",1)	  
	MINE G 1 A_FireCustomMissile("ThrownMine",0,0,0,0)
	MINE HI 1
	MINE JK 2
	TNT1 A 0 A_JumpIfInventory("MineAmmo",1,2)
    TNT1 A 0 A_TakeInventory("Land Mine",1)
	TNT1 A 0 A_TakeInventory("MineAction",1)
	TNT1 A 0
	TNT1 A 5
	Goto Ready+1
  Spawn:
    HMAP A -1
    Stop
	}
}

ACTOR HCKASGDrumFix : Ammo
{
	Inventory.Amount 12
	Inventory.MaxAmount 12
	Ammo.BackpackAmount 0
	Ammo.BackpackMaxAmount 12
	Inventory.Icon "45GPA0"
	+IGNORESKILL
	+NOTIMEFREEZE
}

//Demon Tech Rifle Tag Correction
ACTOR " Demon Tech Rifle" : "DemonTechRifle" Replaces "DemonTechRifle"
{
//$Category Weapons/LCA
//$Sprite DTEPA0
//$Title "Demon Tech Rifle"
   Height 14
   Weapon.PreferredSkin "LCADemonTechRifle-Marine"
   Weapon.SisterWeapon " Powered Demon Tech Rifle"
   Weapon.SelectionOrder 7980
   Weapon.KickBack 60
   Weapon.AmmoUse 1
   Weapon.AmmoGive 60
   Weapon.AmmoGive2 30
   Scale 0.95
   Weapon.AmmoType "DemonMagazine"   
   Weapon.AmmoType2 "DemonAmmo"
   Inventory.PickupMessage "Demon Tech Rifle"
   Inventory.PickupSound "weapons/demontechload"
   Obituary "%o was fried by %k's Demon Tech Rifle."
   +WEAPON.AMMO_OPTIONAL
   +WEAPON.NOALERT
   +INVENTORY.UNDROPPABLE
   States
   {
   Ready:
     TNT1 A 0
	 TNT1 A 0 A_JumpIfInventory("ExpDTechUpgraded",1,"EXReady")
     TNT1 A 0 A_PlayWeaponSound("weapons/demontechload")
	 DTRS ABCDE 1
   ReadyLoop:
     TNT1 A 0 A_JumpIfInventory("DemonMagazine",1,2)
	 TNT1 A 0
	 Goto NoBuzzing
	 TNT1 A 0 A_JumpIfInventory("HandGrenadeAction",1,"GrenadeCheck")
	 TNT1 A 0 A_JumpIfInventory("MineAction",1,"MineCheck")
	 DTEK AAA 1 A_WeaponReady
	 TNT1 A 0 A_JumpIfInventory("ExpDTechUpgraded",1,"EXReadyLoop")
	 TNT1 A 0 A_JumpIfInventory("HandGrenadeAction",1,"GrenadeCheck")
	 TNT1 A 0 A_JumpIfInventory("MineAction",1,"MineCheck")
	 TNT1 A 0 A_JumpIfInventory("RailgunAction",1,"Zoom")
	 DTEK AAA 1 A_WeaponReady
	 TNT1 A 0 A_JumpIfInventory("ExpDTechUpgraded",1,"EXReadyLoop")
	 TNT1 A 0 A_JumpIfInventory("HandGrenadeAction",1,"GrenadeCheck")
	 TNT1 A 0 A_JumpIfInventory("MineAction",1,"MineCheck")
	 TNT1 A 0 A_JumpIfInventory("RailgunAction",1,"Zoom")
	 DTEK AAA 1 A_WeaponReady
	 TNT1 A 0 A_JumpIfInventory("ExpDTechUpgraded",1,"EXReadyLoop")
	 TNT1 A 0 A_JumpIfInventory("HandGrenadeAction",1,"GrenadeCheck")
	 TNT1 A 0 A_JumpIfInventory("MineAction",1,"MineCheck")
	 TNT1 A 0 A_JumpIfInventory("RailgunAction",1,"Zoom")
	 DTEK AAA 1 A_WeaponReady
	 TNT1 A 0 A_JumpIfInventory("ExpDTechUpgraded",1,"EXReadyLoop")
	 TNT1 A 0 A_JumpIfInventory("HandGrenadeAction",1,"GrenadeCheck")
	 TNT1 A 0 A_JumpIfInventory("MineAction",1,"MineCheck")
	 TNT1 A 0 A_JumpIfInventory("RailgunAction",1,"Zoom")
	 DTEK AAA 1 A_WeaponReady
	 TNT1 A 0 A_JumpIfInventory("ExpDTechUpgraded",1,"EXReadyLoop")
	 TNT1 A 0 A_JumpIfInventory("HandGrenadeAction",1,"GrenadeCheck")
	 TNT1 A 0 A_JumpIfInventory("MineAction",1,"MineCheck")
	 TNT1 A 0 A_JumpIfInventory("RailgunAction",1,"Zoom")
	 DTEK AAA 1 A_WeaponReady
	 TNT1 A 0 A_JumpIfInventory("ExpDTechUpgraded",1,"EXReadyLoop")
	 TNT1 A 0 A_JumpIfInventory("HandGrenadeAction",1,"GrenadeCheck")
	 TNT1 A 0 A_JumpIfInventory("MineAction",1,"MineCheck")
	 TNT1 A 0 A_JumpIfInventory("RailgunAction",1,"Zoom")
	 DTEK AAA 1 A_WeaponReady
	 TNT1 A 0 A_JumpIfInventory("ExpDTechUpgraded",1,"EXReadyLoop")
	 TNT1 A 0 A_JumpIfInventory("HandGrenadeAction",1,"GrenadeCheck")
	 TNT1 A 0 A_JumpIfInventory("MineAction",1,"MineCheck")
	 TNT1 A 0 A_JumpIfInventory("RailgunAction",1,"Zoom")
	 DTEK AAA 1 A_WeaponReady
	 TNT1 A 0 A_JumpIfInventory("ExpDTechUpgraded",1,"EXReadyLoop")
	 TNT1 A 0 A_JumpIfInventory("HandGrenadeAction",1,"GrenadeCheck")
	 TNT1 A 0 A_JumpIfInventory("MineAction",1,"MineCheck")
	 TNT1 A 0 A_JumpIfInventory("RailgunAction",1,"Zoom")
	 DTEK AAA 1 A_WeaponReady
	 TNT1 A 0 A_JumpIfInventory("ExpDTechUpgraded",1,"EXReadyLoop")
	 TNT1 A 0 A_JumpIfInventory("HandGrenadeAction",1,"GrenadeCheck")
	 TNT1 A 0 A_JumpIfInventory("MineAction",1,"MineCheck")
	 TNT1 A 0 A_JumpIfInventory("RailgunAction",1,"Zoom")
	 DTEK AAA 1 A_WeaponReady
	 TNT1 A 0 A_JumpIfInventory("ExpDTechUpgraded",1,"EXReadyLoop")
	 TNT1 A 0 A_PlaySound("weapons/demontechidle")
	 TNT1 A 0 A_JumpIfInventory("HandGrenadeAction",1,"GrenadeCheck")
	 TNT1 A 0 A_JumpIfInventory("MineAction",1,"MineCheck")
	 TNT1 A 0 A_JumpIfInventory("RailgunAction",1,"Zoom")
	 DTEK BB 1 A_WeaponReady
	 TNT1 A 0 A_JumpIfInventory("ExpDTechUpgraded",1,"EXReadyLoop")
	 TNT1 A 0 A_JumpIfInventory("HandGrenadeAction",1,"GrenadeCheck")
	 TNT1 A 0 A_JumpIfInventory("MineAction",1,"MineCheck")
	 TNT1 A 0 A_JumpIfInventory("RailgunAction",1,"Zoom")
	 DTEK BB 1 A_WeaponReady
	 TNT1 A 0 A_JumpIfInventory("ExpDTechUpgraded",1,"EXReadyLoop")
	 TNT1 A 0 A_JumpIfInventory("HandGrenadeAction",1,"GrenadeCheck")
	 TNT1 A 0 A_JumpIfInventory("MineAction",1,"MineCheck")
	 TNT1 A 0 A_JumpIfInventory("RailgunAction",1,"Zoom")
	 DTEK CC 1 A_WeaponReady
	 TNT1 A 0 A_JumpIfInventory("ExpDTechUpgraded",1,"EXReadyLoop")
	 TNT1 A 0 A_JumpIfInventory("HandGrenadeAction",1,"GrenadeCheck")
	 TNT1 A 0 A_JumpIfInventory("MineAction",1,"MineCheck")
	 TNT1 A 0 A_JumpIfInventory("RailgunAction",1,"Zoom")
	 DTEK CC 1 A_WeaponReady
	 TNT1 A 0 A_JumpIfInventory("ExpDTechUpgraded",1,"EXReadyLoop")
	 TNT1 A 0 A_JumpIfInventory("HandGrenadeAction",1,"GrenadeCheck")
	 TNT1 A 0 A_JumpIfInventory("MineAction",1,"MineCheck")
	 TNT1 A 0 A_JumpIfInventory("RailgunAction",1,"Zoom")
	 DTEK DD 1 A_WeaponReady
	 TNT1 A 0 A_JumpIfInventory("ExpDTechUpgraded",1,"EXReadyLoop")
	 TNT1 A 0 A_JumpIfInventory("HandGrenadeAction",1,"GrenadeCheck")
	 TNT1 A 0 A_JumpIfInventory("MineAction",1,"MineCheck")
	 TNT1 A 0 A_JumpIfInventory("RailgunAction",1,"Zoom")
	 DTEK DD 1 A_WeaponReady
	 TNT1 A 0 A_JumpIfInventory("ExpDTechUpgraded",1,"EXReadyLoop")
	 TNT1 A 0 A_JumpIfInventory("HandGrenadeAction",1,"GrenadeCheck")
	 TNT1 A 0 A_JumpIfInventory("MineAction",1,"MineCheck")
	 TNT1 A 0 A_JumpIfInventory("RailgunAction",1,"Zoom")
	 DTEK EE 1 A_WeaponReady
	 TNT1 A 0 A_JumpIfInventory("ExpDTechUpgraded",1,"EXReadyLoop")
	 TNT1 A 0 A_JumpIfInventory("HandGrenadeAction",1,"GrenadeCheck")
	 TNT1 A 0 A_JumpIfInventory("MineAction",1,"MineCheck")
	 TNT1 A 0 A_JumpIfInventory("RailgunAction",1,"Zoom")
	 DTEK EE 1 A_WeaponReady
     Goto ReadyLoop
   NoBuzzing:
     TNT1 A 0 A_JumpIfInventory("HandGrenadeAction",1,"GrenadeCheck")
	 TNT1 A 0 A_JumpIfInventory("MineAction",1,"MineCheck")
	 TNT1 A 0 A_JumpIfInventory("ExpDTechUpgraded",1,"EXNoBuzzing")
     DTEK A 1 A_WeaponReady
	 Loop
   EXReady:
     TNT1 A 0 A_PlayWeaponSound("weapons/demontechload")
	 EDT1 ABCDE 1
   EXReadyLoop:
     TNT1 A 0 A_JumpIfInventory("DemonMagazine",1,2)
	 TNT1 A 0
	 Goto EXNoBuzzing
	 TNT1 A 0 A_JumpIfInventory("HandGrenadeAction",1,"EXGrenadeCheck")
	 TNT1 A 0 A_JumpIfInventory("MineAction",1,"EXMineCheck")
	 TNT1 A 0 A_JumpIfInventory("RailgunAction",1,"Zoom")
	 EDT2 AAA 1 A_WeaponReady
	 TNT1 A 0 A_JumpIfInventory("HandGrenadeAction",1,"EXGrenadeCheck")
	 TNT1 A 0 A_JumpIfInventory("MineAction",1,"EXMineCheck")
	 TNT1 A 0 A_JumpIfInventory("RailgunAction",1,"Zoom")
	 EDT2 AAA 1 A_WeaponReady
	 TNT1 A 0 A_JumpIfInventory("HandGrenadeAction",1,"EXGrenadeCheck")
	 TNT1 A 0 A_JumpIfInventory("MineAction",1,"EXMineCheck")
	 TNT1 A 0 A_JumpIfInventory("RailgunAction",1,"Zoom")
	 EDT2 AAA 1 A_WeaponReady
	 TNT1 A 0 A_JumpIfInventory("HandGrenadeAction",1,"EXGrenadeCheck")
	 TNT1 A 0 A_JumpIfInventory("MineAction",1,"EXMineCheck")
	 TNT1 A 0 A_JumpIfInventory("RailgunAction",1,"Zoom")
	 EDT2 AAA 1 A_WeaponReady	 
	 TNT1 A 0 A_JumpIfInventory("HandGrenadeAction",1,"EXGrenadeCheck")
	 TNT1 A 0 A_JumpIfInventory("MineAction",1,"EXMineCheck")
	 TNT1 A 0 A_JumpIfInventory("RailgunAction",1,"Zoom")
	 EDT2 AAA 1 A_WeaponReady
	 TNT1 A 0 A_JumpIfInventory("HandGrenadeAction",1,"EXGrenadeCheck")
	 TNT1 A 0 A_JumpIfInventory("MineAction",1,"EXMineCheck")
	 TNT1 A 0 A_JumpIfInventory("RailgunAction",1,"Zoom")
	 EDT2 AAA 1 A_WeaponReady
	 TNT1 A 0 A_JumpIfInventory("HandGrenadeAction",1,"EXGrenadeCheck")
	 TNT1 A 0 A_JumpIfInventory("MineAction",1,"EXMineCheck")
	 TNT1 A 0 A_JumpIfInventory("RailgunAction",1,"Zoom")
	 EDT2 AAA 1 A_WeaponReady
	 TNT1 A 0 A_JumpIfInventory("HandGrenadeAction",1,"EXGrenadeCheck")
	 TNT1 A 0 A_JumpIfInventory("MineAction",1,"EXMineCheck")
	 TNT1 A 0 A_JumpIfInventory("RailgunAction",1,"Zoom")
	 EDT2 AAA 1 A_WeaponReady
	 TNT1 A 0 A_JumpIfInventory("HandGrenadeAction",1,"EXGrenadeCheck")
	 TNT1 A 0 A_JumpIfInventory("MineAction",1,"EXMineCheck")
	 TNT1 A 0 A_JumpIfInventory("RailgunAction",1,"Zoom")
	 EDT2 AAA 1 A_WeaponReady
	 TNT1 A 0 A_JumpIfInventory("HandGrenadeAction",1,"EXGrenadeCheck")
	 TNT1 A 0 A_JumpIfInventory("MineAction",1,"EXMineCheck")
	 TNT1 A 0 A_JumpIfInventory("RailgunAction",1,"Zoom")
	 EDT2 AAA 1 A_WeaponReady
	 TNT1 A 0 A_PlaySound("explosivedtech/idle")
	 TNT1 A 0 A_JumpIfInventory("HandGrenadeAction",1,"EXGrenadeCheck")
	 TNT1 A 0 A_JumpIfInventory("MineAction",1,"EXMineCheck")
	 TNT1 A 0 A_JumpIfInventory("RailgunAction",1,"Zoom")
	 EDT2 BB 1 A_WeaponReady
	 TNT1 A 0 A_JumpIfInventory("HandGrenadeAction",1,"EXGrenadeCheck")
	 TNT1 A 0 A_JumpIfInventory("MineAction",1,"EXMineCheck")
	 TNT1 A 0 A_JumpIfInventory("RailgunAction",1,"Zoom")
	 EDT2 BB 1 A_WeaponReady
	 TNT1 A 0 A_JumpIfInventory("HandGrenadeAction",1,"EXGrenadeCheck")
	 TNT1 A 0 A_JumpIfInventory("MineAction",1,"EXMineCheck")
	 TNT1 A 0 A_JumpIfInventory("RailgunAction",1,"Zoom")
	 EDT2 CC 1 A_WeaponReady
	 TNT1 A 0 A_JumpIfInventory("HandGrenadeAction",1,"EXGrenadeCheck")
	 TNT1 A 0 A_JumpIfInventory("MineAction",1,"EXMineCheck")
	 TNT1 A 0 A_JumpIfInventory("RailgunAction",1,"Zoom")
	 EDT2 CC 1 A_WeaponReady
	 TNT1 A 0 A_JumpIfInventory("HandGrenadeAction",1,"EXGrenadeCheck")
	 TNT1 A 0 A_JumpIfInventory("MineAction",1,"EXMineCheck")
	 TNT1 A 0 A_JumpIfInventory("RailgunAction",1,"Zoom")
	 EDT2 DD 1 A_WeaponReady
	 TNT1 A 0 A_JumpIfInventory("HandGrenadeAction",1,"EXGrenadeCheck")
	 TNT1 A 0 A_JumpIfInventory("MineAction",1,"EXMineCheck")
	 TNT1 A 0 A_JumpIfInventory("RailgunAction",1,"Zoom")
	 EDT2 DD 1 A_WeaponReady
	 TNT1 A 0 A_JumpIfInventory("HandGrenadeAction",1,"EXGrenadeCheck")
	 TNT1 A 0 A_JumpIfInventory("MineAction",1,"EXMineCheck")
	 TNT1 A 0 A_JumpIfInventory("RailgunAction",1,"Zoom")
	 EDT2 EE 1 A_WeaponReady
	 TNT1 A 0 A_JumpIfInventory("HandGrenadeAction",1,"EXGrenadeCheck")
	 TNT1 A 0 A_JumpIfInventory("MineAction",1,"EXMineCheck")
	 TNT1 A 0 A_JumpIfInventory("RailgunAction",1,"Zoom")
	 EDT2 EE 1 A_WeaponReady
     Goto EXReadyLoop
   EXNoBuzzing:
     TNT1 A 0 A_JumpIfInventory("HandGrenadeAction",1,"GrenadeCheck")
	 TNT1 A 0 A_JumpIfInventory("MineAction",1,"EXMineCheck")
     EDT2 A 1 A_WeaponReady
	 Loop
   Deselect:
     TNT1 A 0
	 TNT1 A 0 A_JumpIfInventory("ExpDTechUpgraded",1,"EXDeselect")
     TNT1 A 0 A_PlayWeaponSound("weapons/weapondown")
     DTEK A 1 A_Lower
     Goto Deselect+3
   EXDeselect:
     TNT1 A 0 A_PlayWeaponSound("weapons/weapondown")
     EDT2 A 1 A_Lower
     Goto EXDeselect+1
   Select:
	 TNT1 A 0 A_Raise
	 Wait
   Fire:
     TNT1 A 0
	 TNT1 A 0 A_JumpIfInventory("ExpDTechUpgraded",1,"EXFire")
     TNT1 A 0 A_JumpIfNoAmmo("Empty")
	 TNT1 A 0 A_AlertMonsters
     TNT1 A 0 A_GunFlash
	 TNT1 A 0 Radius_Quake(4,2,0,1,0)
     TNT1 A 0 A_Light1
	 TNT1 A 0 A_PlaySound("weapons/demontechfire")
     DTKF A 2 Bright A_FireCustomMissile("DemonTechProjectile",Random(100,-100)/100.00,1,0,0,0,Random(100,-100)/100.00)
	 DTKF B 1 Bright A_Light2
     DTKF C 2 A_Light0
     TNT1 A 0 A_ReFire
     Goto ReadyLoop
   Empty:
     DTEK A 10 A_PlayWeaponSound("weapons/click2")
   AltFire:
     TNT1 A 0
	 TNT1 A 0 A_JumpIfInventory("ExpDTechUpgraded",1,"EXAltFire")
  	 TNT1 A 0 A_JumpIfInventory("DemonMagazine",60,2)
     TNT1 A 0 A_JumpIfInventory("DemonAmmo",1,2)
	 TNT1 A 0
	 Goto ReadyLoop
     DTKR AB 2
	 DTKR C 3
	 DTKR D 4 A_PlayWeaponSound("weapons/demontecheject")
	 TNT1 A 0 A_PlayWeaponSound("weapons/demontechsteam")
	 DTKR EFG 1 Radius_Quake(2,2,0,1,0)
	 DTKR H 2 Radius_Quake(2,2,0,1,0)
	 DTKR I 3 Radius_Quake(2,2,0,1,0)
	 DTKR J 4 A_FireCustomMissile("DemonTechEmptyMagSpawner", 0, 0, 0, 1)
	 DTKR K 15 
	 DTKR LM 2
	 DTKR N 2 A_PlayWeaponSound("weapons/demontechload")
	 TNT1 A 0 A_JumpIfInventory("DemonAmmo",1,"Reload")	 
	 DTKR O 8
	 DTKR O 2 A_PlayWeaponSound("weapons/demontechclick")
     DTKR CB 3
	 DTKR A 2
	 Goto ReadyLoop
   EXFire:
     TNT1 A 0 A_JumpIfNoAmmo("EXEmpty")
	 TNT1 A 0 A_AlertMonsters
     TNT1 A 0 A_GunFlash
	 TNT1 A 0 Radius_Quake(4,2,0,1,0)
     TNT1 A 0 A_Light1
	 TNT1 A 0 A_PlaySound("explosivedtech/fire")
	 TNT1 A 0 A_TakeInventory("DemonMagazine",2,TIF_NOTAKEINFINITE)
     EDT3 A 2 Bright A_FireCustomMissile("PlayerExplosiveDemonTechProjectile",Random(100,-100)/100.00,0,0,0,0,Random(100,-100)/100.00)
	 EDT3 B 1 Bright A_Light2
     EDT3 C 2 A_Light0
     TNT1 A 0 A_ReFire
     Goto EXReadyLoop
   EXEmpty:
     EDT2 A 10 A_PlayWeaponSound("weapons/click2")	 
   EXAltFire:
  	 TNT1 A 0 A_JumpIfInventory("DemonMagazine",60,2)
     TNT1 A 0 A_JumpIfInventory("DemonAmmo",1,2)
	 TNT1 A 0
	 Goto EXReadyLoop
     EDT4 AB 2
	 EDT4 C 3
	 EDT4 D 4 A_PlayWeaponSound("weapons/demontecheject")
	 TNT1 A 0 A_PlayWeaponSound("weapons/demontechsteam")
	 EDT4 EFG 1 Radius_Quake(2,2,0,1,0)
	 EDT4 H 2 Radius_Quake(2,2,0,1,0)
	 EDT4 I 3 Radius_Quake(2,2,0,1,0)
	 EDT4 J 4 A_FireCustomMissile("DemonTechEmptyMagSpawner", 0, 0, 0, 1)
	 EDT4 K 15 
	 EDT4 LM 2
	 EDT4 N 2 A_PlayWeaponSound("weapons/demontechload")
	 TNT1 A 0 A_JumpIfInventory("DemonAmmo",1,"EXReload")	 
	 EDT4 O 8
	 EDT4 O 2 A_PlayWeaponSound("weapons/demontechclick")
     EDT4 CB 3
	 EDT4 A 2
	 Goto EXReadyLoop
   Reload:
     TNT1 A 0 A_JumpIfInventory("ExpDTechUpgraded",1,"EXReload")
	 TNT1 A 0 A_TakeInventory("DemonAmmo",1)
	 TNT1 A 0 A_GiveInventory("DemonMagazine",1)
	 TNT1 A 0 A_JumpIfInventory("DemonMagazine",60,"Full")
	 TNT1 A 0 A_JumpIfInventory("DemonAmmo",1,"Reload")
	 Goto AltFire+21
   Full:
     TNT1 A 0
	 Goto AltFire+21
   EXReload:
	 TNT1 A 0 A_TakeInventory("DemonAmmo",1)
	 TNT1 A 0 A_GiveInventory("DemonMagazine",1)
	 TNT1 A 0 A_JumpIfInventory("DemonMagazine",60,"EXFull")
	 TNT1 A 0 A_JumpIfInventory("DemonAmmo",1,"EXReload")
	 Goto EXAltFire+19
   EXFull:
     TNT1 A 0
	 Goto EXAltFire+19
   GrenadeCheck:
	 TNT1 A 0 A_JumpIfInventory("HandGrenadeAmmo",1,"GrenadeToss")
	 TNT1 A 0 A_TakeInventory("HandGrenadeAction",1)
	 Goto Ready+8
   EXGrenadeCheck:
	 TNT1 A 0 A_JumpIfInventory("HandGrenadeAmmo",1,"EXGrenadeToss")
	 TNT1 A 0 A_TakeInventory("HandGrenadeAction",1)
	 Goto EXReady+6
   GrenadeToss:
  	 TNT1 A 0 A_PlayWeaponSound("weapons/weapondown") 
	 DTRS EDCBA 1
	 TNT1 A 4
	 HGRN ABC 1
	 HGRN D 2
	 HGRN EFG 1
	 HGRN HI 2
	 TNT1 A 15 A_PlayWeaponSound("weapons/hgrenadepin")
	 TNT1 A 0 A_PlayWeaponSound("weapons/hgrenadethrow")
	 TNT1 A 0 A_TakeInventory("HandGrenadeAmmo",1)
	 HGNE A 1 A_FireCustomMissile("ThrownGrenade",0,0,0,0)
	 HGRN J 1
	 HGRN KLM 2
	 HGRN NO 1
	 TNT1 A 6
	 TNT1 A 0 A_JumpIfInventory("HandGrenadeAmmo",1,2)
     TNT1 A 0 A_TakeInventory("Hand Grenade",1)
	 TNT1 A 0 A_TakeInventory("HandGrenadeAction",1)
	 TNT1 A 0
	 Goto Ready+3
   EXGrenadeToss:
  	 TNT1 A 0 A_PlayWeaponSound("weapons/weapondown") 
	 EDT1 EDCBA 1
	 TNT1 A 4
	 HGRN ABC 1
	 HGRN D 2
	 HGRN EFG 1
	 HGRN HI 2
	 TNT1 A 15 A_PlayWeaponSound("weapons/hgrenadepin")
	 TNT1 A 0 A_PlayWeaponSound("weapons/hgrenadethrow")
	 TNT1 A 0 A_TakeInventory("HandGrenadeAmmo",1)
	 HGNE A 1 A_FireCustomMissile("ThrownGrenade",0,0,0,0)
	 HGRN J 1
	 HGRN KLM 2
	 HGRN NO 1
	 TNT1 A 6
	 TNT1 A 0 A_JumpIfInventory("HandGrenadeAmmo",1,2)
     TNT1 A 0 A_TakeInventory("Hand Grenade",1)
	 TNT1 A 0 A_TakeInventory("HandGrenadeAction",1)
	 TNT1 A 0
	 Goto EXReady+1
   MineCheck:
	 TNT1 A 0 A_JumpIfInventory("MineAmmo",1,"MineToss")
	 TNT1 A 0 A_TakeInventory("MineAction",1)
	 Goto Ready+8
   EXMineCheck:
	 TNT1 A 0 A_JumpIfInventory("MineAmmo",1,"EXMineToss")
	 TNT1 A 0 A_TakeInventory("MineAction",1)
	 Goto EXReady+6
   MineToss:
  	 TNT1 A 0 A_PlayWeaponSound("weapons/weapondown") 
	 DTRS EDCBA 1
	 TNT1 A 8
	 TNT1 A 0 A_PlayWeaponSound("weapons/hgrenadethrow")
	 MINE ABCDEF 1		
	 TNT1 A 0 A_TakeInventory("MineAmmo",1)	  
	 MINE G 1 A_FireCustomMissile("ThrownMine",0,0,0,0)
	 MINE HI 1
	 MINE JK 2
	 TNT1 A 0 A_JumpIfInventory("MineAmmo",1,2)
     TNT1 A 0 A_TakeInventory("Land Mine",1)
	 TNT1 A 0 A_TakeInventory("MineAction",1)
	 TNT1 A 0
	 TNT1 A 5
	 Goto Ready+3
   EXMineToss:
  	 TNT1 A 0 A_PlayWeaponSound("weapons/weapondown") 
	 EDT1 EDCBA 1
	 TNT1 A 8
	 TNT1 A 0 A_PlayWeaponSound("weapons/hgrenadethrow")
	 MINE ABCDEF 1		
	 TNT1 A 0 A_TakeInventory("MineAmmo",1)	  
	 MINE G 1 A_FireCustomMissile("ThrownMine",0,0,0,0)
	 MINE HI 1
	 MINE JK 2
	 TNT1 A 0 A_JumpIfInventory("MineAmmo",1,2)
     TNT1 A 0 A_TakeInventory("Land Mine",1)
	 TNT1 A 0 A_TakeInventory("MineAction",1)
	 TNT1 A 0
	 TNT1 A 5
	 Goto EXReady+1
   Zoom:
     TNT1 A 0
	 TNT1 A 0 A_TakeInventory("RailgunAction",1)
	 TNT1 A 0 A_JumpIfInventory("ExpDTechToken",1,2)
	 Goto MissingUpgrade
   ChangeMode:
     TNT1 A 0
	 TNT1 A 0 A_JumpIfInventory("ExpDTechUpgraded",1,"ChangeMode2")
	 TNT1 A 0 A_Print("Upgrade enabled!",1)
	 TNT1 A 0 A_GiveInventory("ExpDTechUpgraded",1)
	 DTEK A 4 A_PlayWeaponSound("explosivedtech/enable")
	 DTEK A 2 Offset(0,34)
	 DTEK A 2 Offset(0,37)
	 DTEK A 2 Offset(0,40)
     EDT2 A 2 Offset(0,37)
	 EDT2 A 2 Offset(0,34)
	 EDT2 A 1
	 Goto EXReadyLoop
   ChangeMode2:
	 TNT1 A 0 A_Print("Upgrade disabled!",1)
	 TNT1 A 0 A_TakeInventory("ExpDTechUpgraded",1)
	 EDT2 A 4 A_PlayWeaponSound("explosivedtech/disable")
	 EDT2 A 2 Offset(0,34)
	 EDT2 A 2 Offset(0,37)
	 DTEK A 2 Offset(0,34)
     DTEK A 1
	 Goto ReadyLoop
   MissingUpgrade:
	 TNT1 A 0
	 TNT1 A 0 A_Print("Missing explosive upgrade!",2)
	 DTEK A 10
	 Goto ReadyLoop
   Spawn:
     DTEP A -1
     Stop
     }
}

ACTOR " Powered Demon Tech Rifle" : "PoweredDTRifle" Replaces "PoweredDTRifle"
{
   Weapon.AmmoUse 2
   Weapon.SisterWeapon " Demon Tech Rifle"
   +WEAPON.POWERED_UP
   States
   {
   Ready:
     TNT1 A 0 A_PlayWeaponSound("weapons/demontechload")
	 STRS ABCDE 1
   ReadyLoop:
     TNT1 A 0 A_JumpIfInventory("DemonMagazine",1,2)
	 TNT1 A 0
	 Goto NoBuzzing
	 TNT1 A 0 A_JumpIfInventory("HandGrenadeAction",1,"GrenadeCheck")
	 TNT1 A 0 A_JumpIfInventory("MineAction",1,"MineCheck")
	 STEK AAA 1 A_WeaponReady
	 TNT1 A 0 A_JumpIfInventory("HandGrenadeAction",1,"GrenadeCheck")
	 TNT1 A 0 A_JumpIfInventory("MineAction",1,"MineCheck")
	 STEK AAA 1 A_WeaponReady
	 TNT1 A 0 A_JumpIfInventory("HandGrenadeAction",1,"GrenadeCheck")
	 TNT1 A 0 A_JumpIfInventory("MineAction",1,"MineCheck")
	 STEK AAA 1 A_WeaponReady
	 TNT1 A 0 A_JumpIfInventory("HandGrenadeAction",1,"GrenadeCheck")
	 TNT1 A 0 A_JumpIfInventory("MineAction",1,"MineCheck")
	 STEK AAA 1 A_WeaponReady	 
	 TNT1 A 0 A_JumpIfInventory("HandGrenadeAction",1,"GrenadeCheck")
	 TNT1 A 0 A_JumpIfInventory("MineAction",1,"MineCheck")
	 STEK AAA 1 A_WeaponReady
	 TNT1 A 0 A_JumpIfInventory("HandGrenadeAction",1,"GrenadeCheck")
	 TNT1 A 0 A_JumpIfInventory("MineAction",1,"MineCheck")
	 STEK AAA 1 A_WeaponReady
	 TNT1 A 0 A_JumpIfInventory("HandGrenadeAction",1,"GrenadeCheck")
	 TNT1 A 0 A_JumpIfInventory("MineAction",1,"MineCheck")
	 STEK AAA 1 A_WeaponReady
	 TNT1 A 0 A_JumpIfInventory("HandGrenadeAction",1,"GrenadeCheck")
	 TNT1 A 0 A_JumpIfInventory("MineAction",1,"MineCheck")
	 STEK AAA 1 A_WeaponReady
	 TNT1 A 0 A_JumpIfInventory("HandGrenadeAction",1,"GrenadeCheck")
	 TNT1 A 0 A_JumpIfInventory("MineAction",1,"MineCheck")
	 STEK AAA 1 A_WeaponReady
	 TNT1 A 0 A_JumpIfInventory("HandGrenadeAction",1,"GrenadeCheck")
	 TNT1 A 0 A_JumpIfInventory("MineAction",1,"MineCheck")
	 STEK AAA 1 A_WeaponReady
	 TNT1 A 0 A_PlaySound("EDTR/Idle")
	 TNT1 A 0 A_JumpIfInventory("HandGrenadeAction",1,"GrenadeCheck")
	 TNT1 A 0 A_JumpIfInventory("MineAction",1,"MineCheck")
	 STEK BB 1 A_WeaponReady
	 TNT1 A 0 A_JumpIfInventory("HandGrenadeAction",1,"GrenadeCheck")
	 TNT1 A 0 A_JumpIfInventory("MineAction",1,"MineCheck")
	 STEK BB 1 A_WeaponReady
	 TNT1 A 0 A_JumpIfInventory("HandGrenadeAction",1,"GrenadeCheck")
	 TNT1 A 0 A_JumpIfInventory("MineAction",1,"MineCheck")
	 STEK CC 1 A_WeaponReady
	 TNT1 A 0 A_JumpIfInventory("HandGrenadeAction",1,"GrenadeCheck")
	 TNT1 A 0 A_JumpIfInventory("MineAction",1,"MineCheck")
	 STEK CC 1 A_WeaponReady
	 TNT1 A 0 A_JumpIfInventory("HandGrenadeAction",1,"GrenadeCheck")
	 TNT1 A 0 A_JumpIfInventory("MineAction",1,"MineCheck")
	 STEK DD 1 A_WeaponReady
	 TNT1 A 0 A_JumpIfInventory("HandGrenadeAction",1,"GrenadeCheck")
	 TNT1 A 0 A_JumpIfInventory("MineAction",1,"MineCheck")
	 STEK DD 1 A_WeaponReady
	 TNT1 A 0 A_JumpIfInventory("HandGrenadeAction",1,"GrenadeCheck")
	 TNT1 A 0 A_JumpIfInventory("MineAction",1,"MineCheck")
	 STEK EE 1 A_WeaponReady
	 TNT1 A 0 A_JumpIfInventory("HandGrenadeAction",1,"GrenadeCheck")
	 TNT1 A 0 A_JumpIfInventory("MineAction",1,"MineCheck")
	 STEK EE 1 A_WeaponReady
     Goto ReadyLoop
   NoBuzzing:
     TNT1 A 0 A_JumpIfInventory("HandGrenadeAction",1,"GrenadeCheck")
	 TNT1 A 0 A_JumpIfInventory("MineAction",1,"MineCheck")
     STEK A 1 A_WeaponReady
	 Loop
   Deselect:
     TNT1 A 0 A_PlayWeaponSound("weapons/weapondown")
     STEK A 1 A_Lower
     Goto Deselect+1
   Select:
	 TNT1 A 0 A_Raise
	 Wait
   Fire:
     TNT1 A 0 A_JumpIfNoAmmo("Empty")
	 TNT1 A 0 A_AlertMonsters
     TNT1 A 0 A_GunFlash
	 TNT1 A 0 Radius_Quake(4,2,0,1,0)
     TNT1 A 0 A_Light1
	 TNT1 A 0 A_PlaySound("EDTR/Fire")
     STKF A 2 Bright A_FireCustomMissile("PoweredDemonTechProjectile",Random(100,-100)/100.00,1,0,0,0,Random(100,-100)/100.00)
	 STKF B 1 Bright A_Light2
     STKF C 2 A_Light0
     TNT1 A 0 A_ReFire
     Goto ReadyLoop
   Empty:
     STEK A 10 A_PlayWeaponSound("weapons/click2")	 
   AltFire:
  	 TNT1 A 0 A_JumpIfInventory("DemonMagazine",60,2)
     TNT1 A 0 A_JumpIfInventory("DemonAmmo",1,2)
	 TNT1 A 0
	 Goto ReadyLoop
     STKR AB 2
	 STKR C 3
	 STKR D 4 A_PlayWeaponSound("weapons/demontecheject")
	 TNT1 A 0 A_PlayWeaponSound("EDT/Steam")
	 STKR EFG 1 Radius_Quake(2,2,0,1,0)
	 STKR H 2 Radius_Quake(2,2,0,1,0)
	 STKR I 3 Radius_Quake(2,2,0,1,0)
	 STKR J 4 A_FireCustomMissile("DemonTechEmptyMagSpawner", 0, 0, 0, 1)
	 STKR K 15 
	 STKR LM 2
	 STKR N 2 A_PlayWeaponSound("weapons/demontechload")
	 TNT1 A 0 A_JumpIfInventory("DemonAmmo",1,"Reload")	 
	 STKR O 8
	 STKR O 2 A_PlayWeaponSound("weapons/demontechclick")
     STKR CB 3
	 STKR A 2
	 Goto ReadyLoop
   Reload:
	 TNT1 A 0 A_TakeInventory("DemonAmmo",1)
	 TNT1 A 0 A_GiveInventory("DemonMagazine",1)
	 TNT1 A 0 A_JumpIfInventory("DemonMagazine",60,"Full")
	 TNT1 A 0 A_JumpIfInventory("DemonAmmo",1,"Reload")
	 Goto AltFire+19
   Full:
     TNT1 A 0
	 Goto AltFire+19
   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") 
	 STRS EDCBA 1
	 TNT1 A 4
	 HGRN ABC 1
	 HGRN D 2
	 HGRN EFG 1
	 HGRN HI 2
	 TNT1 A 15 A_PlayWeaponSound("weapons/hgrenadepin")
	 TNT1 A 0 A_PlayWeaponSound("weapons/hgrenadethrow")
	 TNT1 A 0 A_TakeInventory("HandGrenadeAmmo",1)
	 HGNE A 1 A_FireCustomMissile("ThrownGrenade",0,0,0,0)
	 HGRN J 1
	 HGRN KLM 2
	 HGRN NO 1
	 TNT1 A 6
	 TNT1 A 0 A_JumpIfInventory("HandGrenadeAmmo",1,2)
     TNT1 A 0 A_TakeInventory("Hand Grenade",1)
	 TNT1 A 0 A_TakeInventory("HandGrenadeAction",1)
	 TNT1 A 0
	 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") 
	 STRS EDCBA 1
	 TNT1 A 8
	 TNT1 A 0 A_PlayWeaponSound("weapons/hgrenadethrow")
	 MINE ABCDEF 1		
	 TNT1 A 0 A_TakeInventory("MineAmmo",1)	  
	 MINE G 1 A_FireCustomMissile("ThrownMine",0,0,0,0)
	 MINE HI 1
	 MINE JK 2
	 TNT1 A 0 A_JumpIfInventory("MineAmmo",1,2)
     TNT1 A 0 A_TakeInventory("Land Mine",1)
	 TNT1 A 0 A_TakeInventory("MineAction",1)
	 TNT1 A 0
	 TNT1 A 5
	 Goto Ready+1		 
   Spawn:
     STEP A -1
     Stop
     }
}


//New sounds for TXS chests
ACTOR DevilChest20K : DevilChest Replaces DevilChest
{
  Health 1000
  Radius 16
  Height 27
  Scale 1.2
  Mass 0x7fffffff
  DamageFactor 0.8
  DamageFactor "PlayerBHole", 0.0
  DamageFactor "T3rm", 0.0
  DamageFactor "Hell", 0.0
  Damagefactor "Disintegrate", 0.0
  Deathsound "Chest/Open"
  Tag "\c[G2]Devil Chest\c- (loot)"
  -SOLID
  +SHOOTABLE
  +NEVERRESPAWN
  +DONTGIB
  +CANBLAST
  +NOICEDEATH
  +NOBLOOD
  +ISMONSTER
  +BOSS
  States
  {
  Spawn:
    TNT1 A 0
    DVBX A -1
    Loop
  Death:
    TNT1 A 0
	TNT1 A 0 A_PlaySound("chest/open",7)
	DVBX B 50
	TNT1 A 0 A_Jump(200,"Weapons","Ammos","Items","Monsters")
    TNT1 A 0
	//TNT1 A 0 A_PlaySound("chest/drop",7)
	//TNT1 A 0 A_SpawnItemEx("ChestWeapon",0,0,2,random(1,8),0,10,random(0,360),0,150)
	Goto DeathLoop
  Weapons:
	TNT1 A 0
	TNT1 A 0 A_Jump(100,"Weapons3")
	TNT1 A 0
  Weapons2:
    TNT1 A 0
	TNT1 A 0 A_PlaySound("chest/drop",7)
	TNT1 A 0 A_SpawnItemEx("ChestWeapon",0,0,2,random(1,8),0,10,random(0,360),0,0)
	TNT1 A 0 A_SpawnItemEx("ChestWeapon",0,0,2,random(1,8),0,10,random(0,360),0,100)
	Goto DeathLoop
  Weapons3:
    TNT1 A 0
	DVBX B 1 A_PlaySound("chest/drop",7)
	TNT1 A 0 A_SpawnItemEx("RareChestWeapon",0,0,2,random(1,8),0,10,random(0,360),0,150)
	TNT1 A 0 A_SpawnItemEx("ChestWeapon",0,0,2,random(1,8),0,10,random(0,360),0,100)
	TNT1 A 0 A_SpawnItemEx("ChestWeapon",0,0,2,random(1,8),0,10,random(0,360),0,0)
	Goto DeathLoop
  Ammos:
	DVBX B 1 A_PlaySound("DevilChest/Good",7,5.0)
	TNT1 A 0 A_Jump(130,"NemesisAmmos")
	TNT1 A 0
  DCells:
    TNT1 A 0
	TNT1 A 0 A_SpawnItemEx("ChestWeaponFromTXS",0,0,2,random(1,8),0,10,random(0,360),0,0)
	TNT1 A 0 A_SpawnItemEx("DCell",0,0,2,random(1,8),0,10,random(0,360),0,0)
	TNT1 A 0 A_SpawnItemEx("DCell",0,0,2,random(1,8),0,10,random(0,360),0,0)
	TNT1 A 0 A_SpawnItemEx("DCell",0,0,2,random(1,8),0,10,random(0,360),0,0)
	TNT1 A 0 A_SpawnItemEx("DCell",0,0,2,random(1,8),0,10,random(0,360),0,0)
	TNT1 A 0 A_SpawnItemEx("DCell",0,0,2,random(1,8),0,10,random(0,360),0,0)
	TNT1 A 0 A_SpawnItemEx("DCellPack",0,0,2,random(1,8),0,10,random(0,360),0,0)
	Goto DeathLoop
  NemesisAmmos:
    TNT1 A 0
	TNT1 A 0 A_SpawnItemEx("ChestWeaponFromTXS",0,0,2,random(1,8),0,10,random(0,360),0,0)
	TNT1 A 0 A_SpawnItemEx("NemesisAmmoSpawner",0,0,2,random(1,8),0,10,random(0,360),0,0)
	TNT1 A 0 A_SpawnItemEx("NemesisAmmoSpawner",0,0,2,random(1,8),0,10,random(0,360),0,0)
	TNT1 A 0 A_SpawnItemEx("NemesisAmmoSpawner",0,0,2,random(1,8),0,10,random(0,360),0,0)
	TNT1 A 0 A_SpawnItemEx("NemesisAmmoSpawner",0,0,2,random(1,8),0,10,random(0,360),0,0)
	TNT1 A 0 A_SpawnItemEx("NemesisAmmoSpawner",0,0,2,random(1,8),0,10,random(0,360),0,0)
	TNT1 A 0 A_SpawnItemEx("NemesisBoxSpawner",0,0,2,random(1,8),0,10,random(0,360),0,0)
	TNT1 A 0 A_SpawnItemEx("NemesisBoxSpawner",0,0,2,random(1,8),0,10,random(0,360),0,0)
	Goto DeathLoop
  Items:
	TNT1 A 0 A_Jump(128,"Item2","Item4")
	TNT1 A 0 A_Jump(50,"ItemLuck")
	TNT1 A 0
  Item:
    TNT1 A 0
	DVBX B 1 A_PlaySound("DevilChest/Good",7,5.0)
	TNT1 A 0 A_SpawnItemEx("IDummyShuffleItem",0,0,2,random(1,8),0,10,random(0,360),0,0)
	Goto DeathLoop
  Item2:
	DVBX B 1 A_PlaySound("DevilChest/Good",7,5.0)
	TNT1 A 0 A_Jump(100,"Item3")
    TNT1 A 0
	TNT1 A 0 A_SpawnItemEx("ChestCrate",0,0,2,random(1,8),0,10,random(0,360),0,0)
	Goto DeathLoop
  Item3:
	TNT1 A 0 A_Jump(50,"Item7")
    TNT1 A 0
	TNT1 A 0 A_SpawnItemEx("SuperCrate",0,0,2,random(1,8),0,10,random(0,360),0,0)
	Goto DeathLoop
  Item4:
	DVBX B 1 A_PlaySound("DevilChest/Good",7,5.0)
	TNT1 A 0 A_Jump(100,"Item5")
    TNT1 A 0
	TNT1 A 0 A_SpawnItemEx("PlayingCard",0,0,2,random(1,8),0,10,random(0,360),0,0)
	Goto DeathLoop
  Item5:
	TNT1 A 0 A_Jump(30,"Item6")
    TNT1 A 0
	TNT1 A 0 A_SpawnItemEx("Brimstoneitem",0,0,2,random(1,8),0,10,random(0,360),0,0)
	Goto DeathLoop
  Item6:
    TNT1 A 0
	TNT1 A 0 A_SpawnItemEx("MagicCard",0,0,2,random(1,8),0,10,random(0,360),0,0)
	Goto DeathLoop
  Item7:
    TNT1 A 0
	TNT1 A 0 A_SpawnItemEx("UnknownSpawner",0,0,2,random(1,8),0,10,random(0,360),0,0)
	Goto DeathLoop
  ItemLuck:
    TNT1 A 0
	DVBX B 1 A_PlaySound("DevilChest/Luck",7)
    TNT1 A 0 A_PlaySound("Weapons/ProxFire")
    TNT1 A 0 A_SpawnItemEx ("DevilStuff",0,0,24,random(3,14),0,random(2,12),random(0,359))
    DVBX BBBBBBBBBBB 4
    TNT1 A 0 A_PlaySound("Weapons/ProxFire")
    TNT1 A 0 A_SpawnItemEx ("DevilStuff",0,0,24,random(3,14),0,random(2,12),random(0,359))
    DVBX BBBBBBBBBBB 4
    TNT1 A 0 A_PlaySound("Weapons/ProxFire")
    TNT1 A 0 A_SpawnItemEx ("DevilStuff",0,0,24,random(3,14),0,random(2,12),random(0,359))
	DVBX BBBBBBBBBBB 4
    TNT1 A 0 A_PlaySound("Weapons/ProxFire")
    TNT1 A 0 A_SpawnItemEx ("DevilStuff",0,0,24,random(3,14),0,random(2,12),random(0,359))
	Goto DeathLoop
  Monsters:
	TNT1 A 0 A_Jump(80,"TooBad","Friend")
    TNT1 A 0
	TNT1 A 0 A_PlaySound("chest/drop",7)
	TNT1 A 0 A_SpawnItemEx("MonsterBeacon",0,0,2,random(1,8),0,10,random(0,360),0,0)
	Goto DeathLoop
  TooBad:
	TNT1 A 0 A_Jump(80,"OhShit","OhFuck")
	DVBX B 1 A_PlaySound("DevilChest/Bad",7)
    TNT1 A 0
	TNT1 A 0 A_SpawnItemEx("MonsterBeacon",0,0,2,random(1,8),0,10,random(0,360),0,0)
	TNT1 A 0 A_SpawnItemEx("MonsterBeacon",0,0,2,random(1,8),0,10,random(0,360),0,0)
	TNT1 A 0 A_SpawnItemEx("MonsterBeacon",0,0,2,random(1,8),0,10,random(0,360),0,0)
	Goto DeathLoop
  OhShit:
    TNT1 A 0
	DVBX B 1 A_PlaySound("DevilChest/Worst",7)
    DVBX BBBBBBBBBBB 1
    TNT1 A 0 A_PlaySound("Weapons/ProxFire")
    TNT1 A 0 A_SpawnItemEx ("MonsterCube",0,0,24,random(3,14),0,random(2,12),random(0,359))
    DVBX BBBBBBBBBBB 1
    TNT1 A 0 A_PlaySound("Weapons/ProxFire")
    TNT1 A 0 A_SpawnItemEx ("MonsterCube",0,0,24,random(3,14),0,random(2,12),random(0,359))
    DVBX BBBBBBBBBBB 1
    TNT1 A 0 A_PlaySound("Weapons/ProxFire")
    TNT1 A 0 A_SpawnItemEx ("MonsterCube",0,0,24,random(3,14),0,random(2,12),random(0,359))
	DVBX BBBBBBBBBBB 1
    TNT1 A 0 A_PlaySound("Weapons/ProxFire")
    TNT1 A 0 A_SpawnItemEx ("MonsterCube",0,0,24,random(3,14),0,random(2,12),random(0,359))
	DVBX BBBBBBBBBBB 1
    TNT1 A 0 A_PlaySound("Weapons/ProxFire")
    TNT1 A 0 A_SpawnItemEx ("MonsterCube",0,0,24,random(3,14),0,random(2,12),random(0,359))
	DVBX BBBBBBBBBBB 1
    TNT1 A 0 A_PlaySound("Weapons/ProxFire")
    TNT1 A 0 A_SpawnItemEx ("MonsterCube",0,0,24,random(3,14),0,random(2,12),random(0,359))
	DVBX BBBBBBBBBBB 1
    TNT1 A 0 A_PlaySound("Weapons/ProxFire")
    TNT1 A 0 A_SpawnItemEx ("MonsterCube",0,0,24,random(3,14),0,random(2,12),random(0,359))
	DVBX BBBBBBBBBBB 1
    TNT1 A 0 A_PlaySound("Weapons/ProxFire")
    TNT1 A 0 A_SpawnItemEx ("MonsterCube",0,0,24,random(3,14),0,random(2,12),random(0,359))
	DVBX BBBBBBBBBBB 1
    TNT1 A 0 A_PlaySound("Weapons/ProxFire")
    TNT1 A 0 A_SpawnItemEx ("MonsterCube",0,0,24,random(3,14),0,random(2,12),random(0,359))
	DVBX BBBBBBBBBBB 1
    TNT1 A 0 A_PlaySound("Weapons/ProxFire")
    TNT1 A 0 A_SpawnItemEx ("MonsterCube",0,0,24,random(3,14),0,random(2,12),random(0,359))
	Goto DeathLoop
  Friend:
    TNT1 A 0
	TNT1 A 0 A_PlaySound("DevilChest/Luck",7)
	TNT1 A 0 A_SpawnItemEx("Beacon",0,0,2,random(1,8),0,10,random(0,360),0,0)
	TNT1 A 0 A_SpawnItemEx("MarineMedicBeacon",0,0,2,random(1,8),0,10,random(0,360),0,0) //BLOOD
	TNT1 A 0 A_SpawnItemEx("MarineDispensersBeacon",0,0,2,random(1,8),0,10,random(0,360),0,0) //BLOOD
	TNT1 A 0 A_SpawnItemEx("MarineDBFGBeacon",0,0,2,random(1,8),0,10,random(0,360),0,0) //BLOOD
	Goto DeathLoop
  OhFuck:
    TNT1 A 0
	DVBX B 1 A_PlaySound("DevilChest/Worst",7)
	TNT1 A 0 A_SpawnItemEx("BossBeacon",0,0,2,random(1,3),0,10,random(0,360),0,0)
	TNT1 A 0 A_SpawnItemEx("ChestWeapon",0,0,2,random(1,8),0,10,random(0,360),0,0)
	Goto DeathLoop
  DeathLoop:
    DVBX B 1
    DVBX B -1
    Stop
  }
}

ACTOR AngelChestElectric : MainyuSentientElectric
{
-THRUACTORS
Tag "Lightning Vessel"
Obituary "%o died from the Angel Chest's worst outcome."
}

ACTOR AngelChest20K : AngelChest Replaces AngelChest
{
  Health 1000
  Radius 16
  Height 27
  Scale 1.2
  Mass 0x7fffffff
  DamageFactor 0.7
  DamageFactor "PlayerBHole", 0.0
  DamageFactor "T3rm", 0.0
  DamageFactor "Hell", 0.0
  Damagefactor "Disintegrate", 0.0
  Deathsound "Chest/Open"
  Tag "\c[G1]Angel Chest\c- (loot)"
  -SOLID
  +SHOOTABLE
  +NEVERRESPAWN
  +DONTGIB
  +CANBLAST
  +NOICEDEATH
  +NOBLOOD
  +ISMONSTER
  +BOSS
  States
  {
  Spawn:
    TNT1 A 0
    AGBX A -1
    Loop
  Death:
    TNT1 A 0
	TNT1 A 0 A_PlaySound("chest/open",7)
	AGBX B 50
	TNT1 A 0 A_Jump(185,"Weapons","Ammos","Items")
	TNT1 A 0 A_Jump(70,"HolyShit")
    TNT1 A 0
	//TNT1 A 0 A_PlaySound("chest/drop",7)
	//TNT1 A 0 A_SpawnItemEx("ChestWeapon",0,0,2,random(1,8),0,10,random(0,360),0,0)
	Goto DeathLoop
  HolyShit:
    TNT1 A 0
	AGBX B 30
	AGBX B 2 A_PlaySound("Mainyu/Electric",7)
	TNT1 A 0 A_SpawnItemEx("AngelChestElectric",0,0,0,0,0,2)
	Goto DeathLoop
  Weapons:
	TNT1 A 0 A_Jump(100,"Weapons3")
	TNT1 A 0
  Weapons2:
    TNT1 A 0
	TNT1 A 0 A_PlaySound("chest/drop",7)
	TNT1 A 0 A_SpawnItemEx("ChestWeapon",0,0,2,random(1,8),0,10,random(0,360),0,80)
	TNT1 A 0 A_SpawnItemEx("ChestWeapon",0,0,2,random(1,8),0,10,random(0,360),0,0)
	Goto DeathLoop
  Weapons3:
	TNT1 A 0 A_Jump(30,"SuperLuck")
    TNT1 A 0
	TNT1 A 0 A_PlaySound("chest/drop",7)
	TNT1 A 0 A_SpawnItemEx("RareChestWeapon",0,0,2,random(1,8),0,10,random(0,360),0,100)
	TNT1 A 0 A_SpawnItemEx("ChestWeapon",0,0,2,random(1,8),0,10,random(0,360),0,40)
	TNT1 A 0 A_SpawnItemEx("ChestWeapon",0,0,2,random(1,8),0,10,random(0,360),0,0)
	Goto DeathLoop
  Ammos:
	TNT1 A 0 A_Jump(130,"NemesisAmmos")
	TNT1 A 0
  DCells:
    TNT1 A 0
	TNT1 A 0 A_PlaySound("AngelChest/Luck",7)
	TNT1 A 0 A_SpawnItemEx("DCell",0,0,2,random(1,8),0,10,random(0,360),0,0)
	TNT1 A 0 A_SpawnItemEx("DCell",0,0,2,random(1,8),0,10,random(0,360),0,0)
	TNT1 A 0 A_SpawnItemEx("DCell",0,0,2,random(1,8),0,10,random(0,360),0,0)
	TNT1 A 0 A_SpawnItemEx("DCell",0,0,2,random(1,8),0,10,random(0,360),0,0)
	TNT1 A 0 A_SpawnItemEx("DCell",0,0,2,random(1,8),0,10,random(0,360),0,0)
	TNT1 A 0 A_SpawnItemEx("DCell",0,0,2,random(1,8),0,10,random(0,360),0,0)
	TNT1 A 0 A_SpawnItemEx("DCell",0,0,2,random(1,8),0,10,random(0,360),0,0)
	TNT1 A 0 A_SpawnItemEx("DCellPack",0,0,2,random(1,8),0,10,random(0,360),0,0)
	TNT1 A 0 A_SpawnItemEx("DCellPack",0,0,2,random(1,8),0,10,random(0,360),0,0)
	TNT1 A 0 A_SpawnItemEx("D-BFG",0,0,2,random(1,8),0,10,random(0,360),0,100)
	Goto DeathLoop
  NemesisAmmos:
    TNT1 A 0
	TNT1 A 0 A_PlaySound("AngelChest/Luck",7)
	TNT1 A 0 A_SpawnItemEx("NemesisAmmoSpawner",0,0,2,random(1,8),0,10,random(0,360),0,0)
	TNT1 A 0 A_SpawnItemEx("NemesisAmmoSpawner",0,0,2,random(1,8),0,10,random(0,360),0,0)
	TNT1 A 0 A_SpawnItemEx("NemesisAmmoSpawner",0,0,2,random(1,8),0,10,random(0,360),0,0)
	TNT1 A 0 A_SpawnItemEx("NemesisAmmoSpawner",0,0,2,random(1,8),0,10,random(0,360),0,0)
	TNT1 A 0 A_SpawnItemEx("NemesisAmmoSpawner",0,0,2,random(1,8),0,10,random(0,360),0,0)
	TNT1 A 0 A_SpawnItemEx("NemesisAmmoSpawner",0,0,2,random(1,8),0,10,random(0,360),0,0)
	TNT1 A 0 A_SpawnItemEx("NemesisAmmoSpawner",0,0,2,random(1,8),0,10,random(0,360),0,0)
	TNT1 A 0 A_SpawnItemEx("NemesisAmmoSpawner",0,0,2,random(1,8),0,10,random(0,360),0,0)
	TNT1 A 0 A_SpawnItemEx("NemesisAmmoSpawner",0,0,2,random(1,8),0,10,random(0,360),0,0)
	TNT1 A 0 A_SpawnItemEx("NemesisBoxSpawner",0,0,2,random(1,8),0,10,random(0,360),0,0)
	TNT1 A 0 A_SpawnItemEx("NemesisBoxSpawner",0,0,2,random(1,8),0,10,random(0,360),0,0)
	TNT1 A 0 A_SpawnItemEx("NemesisBoxSpawner",0,0,2,random(1,8),0,10,random(0,360),0,0)
	TNT1 A 0 A_SpawnItemEx("Nemesis Rifle",0,0,2,random(1,8),0,10,random(0,360),0,100)
	Goto DeathLoop
  Items:
	TNT1 A 0 A_Jump(128,"Item2","Item4")
	TNT1 A 0 A_Jump(40,"ItemLuck")
	TNT1 A 0
  Item:
    TNT1 A 0
	TNT1 A 0 A_PlaySound("chest/drop",7)
	TNT1 A 0 A_SpawnItemEx("ChestWeapon",0,0,2,random(1,8),0,10,random(0,360),0,0)
	Goto DeathLoop
  Item2:
	TNT1 A 0 A_Jump(100,"Item3")
    TNT1 A 0
	TNT1 A 0 A_PlaySound("chest/drop",7)
	TNT1 A 0 A_SpawnItemEx("ChestCrate",0,0,2,random(1,8),0,10,random(0,360),0,0)
	Goto DeathLoop
  Item3:
	TNT1 A 0 A_Jump(50,"Item7")
    TNT1 A 0
	TNT1 A 0 A_PlaySound("chest/drop",7)
	TNT1 A 0 A_SpawnItemEx("SuperCrate",0,0,2,random(1,8),0,10,random(0,360),0,0)
	Goto DeathLoop
  Item4:
	TNT1 A 0 A_Jump(100,"Item5")
    TNT1 A 0
	TNT1 A 0 A_PlaySound("chest/drop",7)
	TNT1 A 0 A_SpawnItemEx("DemonicChalice",0,0,2,random(1,8),0,10,random(0,360),0,0)
	Goto DeathLoop
  Item5:
	TNT1 A 0 A_Jump(40,"Item6")
    TNT1 A 0
	TNT1 A 0 A_PlaySound("chest/drop",7)
	TNT1 A 0 A_SpawnItemEx("SkullofPower",0,0,2,random(1,8),0,10,random(0,360),0,0)
	Goto DeathLoop
  Item6:
    TNT1 A 0
	TNT1 A 0 A_PlaySound("AngelChest/Luck",7)
	TNT1 A 0 A_SpawnItemEx("NemesisSuperSphere",0,0,2,random(1,8),0,10,random(0,360),0,0)
	Goto DeathLoop
  Item7:
    TNT1 A 0
	TNT1 A 0 A_PlaySound("AngelChest/Luck",7)
	TNT1 A 0 A_SpawnItemEx("UnknownSpawner",0,0,2,random(1,8),0,10,random(0,360),0,0)
	Goto DeathLoop
  ItemLuck:
    TNT1 A 0
	TNT1 A 0 A_Jump(40,"Luck")
	TNT1 A 0 A_PlaySound("Weapons/ProxFire")
    TNT1 A 0 A_SpawnItemEx ("DoRandom",0,0,24,random(3,14),0,random(2,12),random(0,359))
	AGBX B 1 A_PlaySound("AngelChest/Luck",7)
	AGBX BBBBBBBBBBB 4
    TNT1 A 0 A_PlaySound("Weapons/ProxFire")
    TNT1 A 0 A_SpawnItemEx ("DoRandom",0,0,24,random(3,14),0,random(2,12),random(0,359))
    AGBX BBBBBBBBBBB 4
    TNT1 A 0 A_PlaySound("Weapons/ProxFire")
    TNT1 A 0 A_SpawnItemEx ("DoRandom",0,0,24,random(3,14),0,random(2,12),random(0,359))
    AGBX BBBBBBBBBBB 4
    TNT1 A 0 A_PlaySound("Weapons/ProxFire")
    TNT1 A 0 A_SpawnItemEx ("DoRandom",0,0,24,random(3,14),0,random(2,12),random(0,359))
	AGBX BBBBBBBBBBB 4
    TNT1 A 0 A_PlaySound("Weapons/ProxFire")
    TNT1 A 0 A_SpawnItemEx ("DoRandom",0,0,24,random(3,14),0,random(2,12),random(0,359))
	Goto DeathLoop
  Luck:
    TNT1 A 0
	TNT1 A 0 A_PlaySound("Weapons/ProxFire")
    TNT1 A 0 A_SpawnItemEx ("DoRandom",0,0,24,random(3,14),0,random(2,12),random(0,359))
	AGBX B 1 A_PlaySound("AngelChest/Luck",7)
    AGBX BBBBBBBBBBB 1
    TNT1 A 0 A_PlaySound("Weapons/ProxFire")
    TNT1 A 0 A_SpawnItemEx ("DoRandom",0,0,24,random(3,14),0,random(2,12),random(0,359))
    AGBX BBBBBBBBBBB 1
    TNT1 A 0 A_PlaySound("Weapons/ProxFire")
    TNT1 A 0 A_SpawnItemEx ("DoRandom",0,0,24,random(3,14),0,random(2,12),random(0,359))
    AGBX BBBBBBBBBBB 1
    TNT1 A 0 A_PlaySound("Weapons/ProxFire")
    TNT1 A 0 A_SpawnItemEx ("DoRandom",0,0,24,random(3,14),0,random(2,12),random(0,359))
	AGBX BBBBBBBBBBB 1
    TNT1 A 0 A_PlaySound("Weapons/ProxFire")
    TNT1 A 0 A_SpawnItemEx ("DoRandom",0,0,24,random(3,14),0,random(2,12),random(0,359))
	AGBX BBBBBBBBBBB 1
    TNT1 A 0 A_PlaySound("Weapons/ProxFire")
    TNT1 A 0 A_SpawnItemEx ("DoRandom",0,0,24,random(3,14),0,random(2,12),random(0,359))
	AGBX BBBBBBBBBBB 1
    TNT1 A 0 A_PlaySound("Weapons/ProxFire")
    TNT1 A 0 A_SpawnItemEx ("DoRandom",0,0,24,random(3,14),0,random(2,12),random(0,359))
	AGBX BBBBBBBBBBB 1
    TNT1 A 0 A_PlaySound("Weapons/ProxFire")
    TNT1 A 0 A_SpawnItemEx ("DoRandom",0,0,24,random(3,14),0,random(2,12),random(0,359))
	AGBX BBBBBBBBBBB 1
    TNT1 A 0 A_PlaySound("Weapons/ProxFire")
    TNT1 A 0 A_SpawnItemEx ("DoRandom",0,0,24,random(3,14),0,random(2,12),random(0,359))
	AGBX BBBBBBBBBBB 1
    TNT1 A 0 A_PlaySound("Weapons/ProxFire")
    TNT1 A 0 A_SpawnItemEx ("DoRandom",0,0,24,random(3,14),0,random(2,12),random(0,359))
	AGBX BBBBBBBBBBB 1
    TNT1 A 0 A_PlaySound("Weapons/ProxFire")
    TNT1 A 0 A_SpawnItemEx ("DoRandom",0,0,24,random(3,14),0,random(2,12),random(0,359))
	Goto DeathLoop
  SuperLuck:
    TNT1 A 0
	AGBX B 1 A_PlaySound("angelchest/superluck",7)
	TNT1 A 0 A_SpawnItemEx("SuperLuckSpawner",0,0,2,random(1,3),0,10,random(0,360),0,0)
	TNT1 A 0 A_SpawnItemEx("SuperLuckSpawner",0,0,2,random(1,3),0,10,random(0,360),0,0)
	TNT1 A 0 A_SpawnItemEx("SuperWeaponLuckSpawner",0,0,2,random(1,3),0,10,random(0,360),0,0)
	Goto DeathLoop
  DeathLoop:
    AGBX B 1
    AGBX B -1
    Stop
  }
}

ACTOR SuperLuckSpawner20K : SuperLuckSpawner Replaces SuperLuckSpawner
{
+DROPPED
DropItem "LegendaryInvisibilitySphere", 256, 1
DropItem "TrueLegendaryUltraSphere", 256, 1
DropItem "NemesisUltraSphere", 256, 1
DropItem "NemesisOmegaSphere", 256, 1
DropItem "LegendarySalvationSphere", 256, 1
DropItem "RingOfRegeneration", 256, 1
DropItem "BFGUpgrade", 256, 1
DropItem "TrueLegendaryBFGUpgrade", 256, 1
DropItem "WingsOfAscension", 256, 1
DropItem "MarineDBFGBeacon", 256, 1
}

ACTOR SuperWeaponLuckSpawner20K : SuperWeaponLuckSpawner Replaces SuperWeaponLuckSpawner
{
+DROPPED
DropItem "LegendarySaber", 256, 1
DropItem "CommanderDevastator", 256, 1
DropItem "Nemesis BFG", 256, 1
DropItem "Legendary BFG", 256, 1
DropItem "Vilestaff", 256, 1
DropItem "PyroCannon", 256, 1
DropItem "Stingray", 256, 1
DropItem "BLG", 256, 1
DropItem "SubliminationSword", 256, 1
}

actor UltraBossBeacon
{
  -SOLID
  -SHOOTABLE
  States
  {
  Spawn:
    BEAC A 200
    BEAC A 0 A_CustomMissile ("TeleportFog", 0, 0, 0, 0, 0)
    BEAC A 0 A_SpawnItemEx ("LegendaryCyberSpawner", 0, 0, 8, 0, 0, 0, 0, 1)
    BEAC A 105
    goto Death
  Death:
    TNT1 A 1 A_CustomMissile ("TeleportFog", 0, 0, 0, 0, 0)
    stop
  }
}

ACTOR UnmakerChest20K : UnmakerChest Replaces UnmakerChest
{
  Health 1000
  Radius 16
  Height 27
  Scale 1.2
  Mass 0x7fffffff
  DamageFactor 0.5
  DamageFactor "PlayerBHole", 0.0
  DamageFactor "T3rm", 0.0
  DamageFactor "Hell", 0.0
  Damagefactor "Disintegrate", 0.0
  Deathsound "Chest/Open"
  Tag "\c[k8]Unmaker Chest\c- (loot)"
  -SOLID
  +SHOOTABLE
  +NEVERRESPAWN
  +DONTGIB
  +CANBLAST
  +NOICEDEATH
  +NOBLOOD
  +ISMONSTER
  +BOSS
  States
  {
  Spawn:
    TNT1 A 0
    UNBX A -1
    Loop
  Death:
    TNT1 A 0
	TNT1 A 0 A_PlaySound("chest/open",7)
	UNBX B 50
	TNT1 A 0 A_Jump(30,"NotSoLuck")
	TNT1 A 0 A_Jump(128,"Death2")
    TNT1 A 0
	TNT1 A 0 A_SpawnItemEx("ChestAmmo",0,0,2,random(1,8),0,10,random(0,360),0,0)
	TNT1 A 0 A_SpawnItemEx("ChestAmmo",0,0,2,random(1,8),0,10,random(0,360),0,0)
	TNT1 A 0 A_SpawnItemEx("ChestAmmo",0,0,2,random(1,8),0,10,random(0,360),0,0)
	TNT1 A 0 A_SpawnItemEx("ChestAmmo",0,0,2,random(1,8),0,10,random(0,360),0,0)
	TNT1 A 0 A_SpawnItemEx("ChestAmmo",0,0,2,random(1,8),0,10,random(0,360),0,0)
	TNT1 A 0 A_SpawnItemEx("ChestAmmo",0,0,2,random(1,8),0,10,random(0,360),0,0)
	TNT1 A 0 A_SpawnItemEx("ChestAmmo",0,0,2,random(1,8),0,10,random(0,360),0,0)
	TNT1 A 0 A_SpawnItemEx("ChestAmmo",0,0,2,random(1,8),0,10,random(0,360),0,0)
	TNT1 A 0 A_SpawnItemEx("ChestBox",0,0,2,random(1,8),0,10,random(0,360),0,0)
	TNT1 A 0 A_SpawnItemEx("ChestBox",0,0,2,random(1,8),0,10,random(0,360),0,0)
	TNT1 A 0 A_SpawnItemEx("ChestBox",0,0,2,random(1,8),0,10,random(0,360),0,0)
	TNT1 A 0 A_SpawnItemEx("RareChestWeapon",0,0,2,random(1,8),0,10,random(0,360),0,200)
	TNT1 A 0 A_SpawnItemEx("ChestWeapon",0,0,2,random(1,8),0,10,random(0,360),0,150)
	TNT1 A 0 A_SpawnItemEx("ChestWeaponFromTXS",0,0,2,random(1,8),0,10,random(0,360),0,100)
	TNT1 A 0 A_SpawnItemEx("ChestWeapon",0,0,2,random(1,8),0,10,random(0,360),0,50)
	UNBX B 50 A_PlaySound("DevilChest/Good",7)
	TNT1 A 0 A_Jump(30,"Luck")
	Goto DeathLoop
  Death2:
    TNT1 A 0
	TNT1 A 0 A_SpawnItemEx("RareChestWeapon",0,0,2,random(1,8),0,10,random(0,360),0,150)
	TNT1 A 0 A_SpawnItemEx("ChestWeapon",0,0,2,random(1,8),0,10,random(0,360),0,100)
	TNT1 A 0 A_SpawnItemEx("ChestWeapon",0,0,2,random(1,8),0,10,random(0,360),0,50)
	TNT1 A 0 A_SpawnItemEx("SuperCrate",0,0,2,random(1,8),0,10,random(0,360),0,0)
	UNBX B 50 A_PlaySound("DevilChest/Good",7)
	TNT1 A 0 A_Jump(30,"Luck")
	Goto DeathLoop
  Luck:
	UNBX B 1
	TNT1 A 0 A_Jump(30,"SuperLuck")
    TNT1 A 0
	TNT1 A 0 A_SpawnItemEx("UnmakerSurpise",0,0,2,random(1,8),0,10,random(0,360),0,0)
	UNBX B 50 A_PlaySound("unmakerchest/luck",7)
	TNT1 A 0 A_Jump(40,"SuperLuck")
	Goto DeathLoop
  SuperLuck:
    TNT1 A 0
	TNT1 A 0 A_SpawnItemEx("Unmaker",0,0,2,random(1,8),0,10,random(0,360),0,0)
	UNBX B 50 A_PlaySound("unmakerchest/luck",6)
	Goto DeathLoop
  NotSoLuck:
    TNT1 A 0
	UNBX B 30
	TNT1 A 0 Radius_Quake(9,150,0,24,0)
	UNBX B 150 A_PlaySound("HFCardinal/Laugh", CHAN_AUTO, 1.0, False, ATTN_NONE)
	TNT1 A 0 A_PlaySound("chest/drop",7)
	TNT1 A 0 A_SpawnItemEx("UltraBossBeacon",0,0,2,random(1,3),0,10,random(0,360),0,0)
	TNT1 A 0 A_SpawnItemEx("RareChestWeapon",0,0,2,random(1,8),0,10,random(0,360),0,0)
  DeathLoop:
    UNBX B 1
    UNBX B -1
    Stop
  }
}

//Sentry Gun edits
Actor EmpoweredDemonTechSentryBox : SuperChargedDemonTechSentryBox Replaces SuperChargedDemonTechSentryBox
{
+FLOORCLIP
+INVENTORY.INVBAR
+INVENTORY.HUBPOWER
+INVENTORY.PERSISTENTPOWER
+INVENTORY.BIGPOWERUP
Inventory.Amount 1
Inventory.MaxAmount 4
Inventory.InterHubAmount 4
Inventory.Icon "SGINE0"
Inventory.PickupMessage "Empowered Demon Tech Sentry Gun."
Inventory.PickupSound "DTechSentry/pickup"
Inventory.UseSound "DTechSentry/use"
Tag "Empowered Demon Tech Sentry Gun "
States
	{
	Spawn:
		SCBX AABBCCDDEEFFGGHHIIJJ 1 BRIGHT
		Loop
	Use:
		TNT1 A 0
		TNT1 A 0 A_SpawnItemEx("AlliedEmpoweredDemonTechSentryGun",56,0,8,0,0,0,0,1)
		Stop
		TNT1 A 1
		Fail	
	}
}

Actor AlliedEmpoweredDemonTechSentryGun
{
  Obituary "%o should not have died from a Demon Tech Sentry Gun."
  Tag "\c[d4]Empowered Demon Tech\c- Sentry Gun"
  Health 900
  Radius 24
  Height 56
  Mass 100000
  Speed 0
  Monster
  +FRIENDLY
  +DONTHARMSPECIES
  +THRUSPECIES
  +FLOORCLIP
  +MISSILEMORE
  +MISSILEEVENMORE
  +NOTARGET
  +QUICKTORETALIATE
  +NOBLOOD
  +LOOKALLAROUND
  +DROPOFF
  +STANDSTILL
  Species "Player"
  DamageFactor 0.6
  DeathSound "DTechSentry/death"
  var int user_TurretLoop;
  States
  {
  Spawn:
  See:
	TNT1 A 0 A_SetUserVar(user_TurretLoop,0)
    SCSN AAAAAAAAAAAAAAAA 1 A_Chase
	SCSN AAAAAAAAAAAAAAAA 1 A_Chase
	SCSN AAAAAAAAAAAAAAAA 1 A_Chase
	SCSN AAAAAAAAAAAAAAAA 1 A_Chase
    TNT1 A 0 A_PlaySound("DTechSentry/beep")
	TNT1 A 0 A_ClearTarget
    Loop
  Missile:	
	SCSN A 1 A_FaceTarget
	SCSN A 3 A_PlaySound("DTechSentry/sight",7)
	SCSN A 10 A_FaceTarget
  TurretLoop:
    TNT1 A 0 A_AlertMonsters
	TNT1 A 0 A_JumpIf(user_TurretLoop == 50,"Pause")
	TNT1 A 0 A_SetUserVar(user_TurretLoop,user_TurretLoop+1)
	SCSN A 2 A_FaceTarget
	TNT1 A 0 A_PlayWeaponSound("EDTR/Fire")
	TNT1 A 0 A_CustomMissile("SentryGunPoweredDemonTechProjectile",Random(38,42),0,Random(125,-125)/125.25,0)
    SCSN B 1 Bright A_FaceTarget
    SCSN B 1 A_CPosRefire 
    Loop
  Pause:
	SCSN A 40 A_PlaySound("EDT/Steam")
	TNT1 A 0 A_SetUserVar("user_TurretLoop", 0)
	Goto TurretLoop
  Death:
	TNT1 A 0 A_PlaySound("BFG9K/Explode")
	TNT1 A 0 A_SpawnItemEx("BFGShockwaveRed2", 0, 0, 0, 0, 0, 0, 0, 128) 
    TNT1 AAA 0 A_CustomMissile("Kaboom3", 0, 0, random(0,360), 2, random(0,360))
	TNT1 AAA 0 A_CustomMissile("Kaboom18", 0, 0, random(0,360), 2, random(0,360))
    TNT1 AAAA 0 A_SpawnItemEx("RedParticleSpawner",0,0,0,Random(4,-4),Random(4,-4),Random(4,8),0,128)
	TNT1 AAA 0 A_BFGSpray("CustomSprayRed")
	TNT1 A 0 A_NoBlocking
	TNT1 A 0 A_Scream
    Stop
  }
}

ACTOR SentryGunPoweredDemonTechProjectile : DemonTechProjectile
{
   Speed 70
   Damage 16
   Scale 0.1
   Decal Scorch
   DamageType "Player"
   Species "Player"
   +FORCERADIUSDMG
   +THRUSPECIES
   States
   {
   Spawn:
	  TNT1 A 0
	  TNT1 A 0 A_Jump(128,"Spawn2")
   Normal:
   	  TNT1 A 0 A_Jump(128,"NormalFX")
      PDTS A 1 Bright A_SpawnItemEx("PoweredDemonTechTrail",Random(-1,1),Random(-1,1),Random(-1,1),Random(-1,1),Random(-1,1),Random(-1,1),Random(-20,20),128)
      Loop
   NormalFX:
	  TNT1 A 0 A_SpawnItemEx("RDTechLightning",Random(1,-1),Random(1,-1),Random(1,-1),0,0,0,0,128)
      PDTS A 1 Bright A_SpawnItemEx("PoweredDemonTechTrail",Random(-1,1),Random(-1,1),Random(-1,1),Random(-1,1),Random(-1,1),Random(-1,1),Random(-20,20),128)
	  TNT1 A 0 A_SpawnItemEx("RDTechLightning2",Random(1,-1),Random(1,-1),Random(1,-1),0,0,0,0,128)
      PDTS A 1 Bright A_SpawnItemEx("PoweredDemonTechTrail",Random(-1,1),Random(-1,1),Random(-1,1),Random(-1,1),Random(-1,1),Random(-1,1),Random(-20,20),128)
      Goto Normal
   Spawn2:
	  TNT1 A 0 A_Jump(128,"Spawn2FX")
      PDTS A 1 Bright A_SpawnItemEx("PoweredDemonTechTrail2",Random(-1,1),Random(-1,1),Random(-1,1),Random(-1,1),Random(-1,1),Random(-1,1),Random(-20,20),128)
      Loop
   Spawn2FX:
	  TNT1 A 0 A_SpawnItemEx("RDTechLightning",Random(1,-1),Random(1,-1),Random(1,-1),0,0,0,0,128)
      PDTS A 1 Bright A_SpawnItemEx("PoweredDemonTechTrail",Random(-1,1),Random(-1,1),Random(-1,1),Random(-1,1),Random(-1,1),Random(-1,1),Random(-20,20),128)
	  TNT1 A 0 A_SpawnItemEx("RDTechLightning2",Random(1,-1),Random(1,-1),Random(1,-1),0,0,0,0,128)
      PDTS A 1 Bright A_SpawnItemEx("PoweredDemonTechTrail",Random(-1,1),Random(-1,1),Random(-1,1),Random(-1,1),Random(-1,1),Random(-1,1),Random(-20,20),128)
      Goto Spawn2
   Death:
   	  TNT1 A 0
	  TNT1 A 0 A_SpawnItemEx("RedParticleSpawner", 0, 0, 0, 0, 0, 0, 0, 128)
	  TNT1 A 0 A_SpawnItemEx("PoweredDemonTechEx",0,0,0,0,0,0,0,128,0)
	  TNT1 AAA 0 A_CustomMissile("Kaboom10", 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 Bright A_Explode(80,60)
      Stop
	  }
}

ACTOR RandomMagicCards20K : RandomMagicCards Replaces RandomMagicCards
{
+DROPPED
DropItem "AceofHearts", 256, 10
DropItem "AceofClubs", 256, 8
DropItem "AceofDiamonds", 256, 7
DropItem "AncientRecall", 256, 7
DropItem "JokerCard", 256, 1
}

//True Legendary Ammo Sphere gives True Legendary Ammo
Actor TrueLegAmmoSphere2 : TrueLegAmmoSphere Replaces TrueLegAmmoSphere
{
  Inventory.PickupMessage "\c[l5]True Legendary Ammo Sphere. How long are you going to spam with that gun?!"
  Inventory.PickupSound "legammo/pickup"
  Inventory.UseSound "truelegammosphere/use"
  Inventory.Icon "TLASZ0"
  Inventory.MaxAmount 1
  +FLOATBOB
  +INVBAR
  +COUNTITEM
  +INVENTORY.BIGPOWERUP
  +NOTIMEFREEZE
  +DONTGIB
  States
  {
 Use:
    TNT1 A 0 A_GiveInventory("Megapack")
    TNT1 A 0 A_GiveInventory("TrueLegInfiniteAmmo")
	TNT1 A 0 A_GiveInventory("TrueLegendaryCell",130)
    Stop  	
  Spawn:
	TNT1 A 0 A_CustomMissile ("BlueSparkleSpawner", -20, 0, random(0,-360), 2, random(0,360))
	TLAS ABCD 10 Bright A_CustomMissile ("TrueLegendarySphereFlameSpawner", -20, 0, random(0,-360), 2, random(0,360)) 
	TNT1 A 0 A_CustomMissile ("BlueSparkleSpawner", -20, 0, random(0,-360), 2, random(0,360))
	TNT1 A 0 Bright A_CustomMissile ("TrueLegendarySphereFlameSpawner", -20, 0, random(0,-360), 2, random(0,360))
	Loop	
  }
}

//CF Slayer Power no Omega Sphere
actor ClusterfuckSlayerPowerFix : CustomInventory Replaces ClusterfuckSlayerPower
{
  Inventory.PickupMessage "\c[w2]CLUSTERFUCK \c[s3]SLAYER\c-"
  Inventory.Amount 1
  Inventory.PickupSound "legendary/defense"
  Renderstyle Add
  +INVENTORY.AUTOACTIVATE
  +INVENTORY.FANCYPICKUPSOUND
  +INVENTORY.ALWAYSPICKUP
  +INVENTORY.HUBPOWER
  +INVENTORY.BIGPOWERUP
  +COUNTITEM
  +FLOATBOB
  -FLOAT
  +DONTGIB
  XScale 0.24
  YScale 0.20
  var int user_music;
  States
  {
 Spawn:
  TNT1 A 0 A_PlaySound("Extreme/idle",CHAN_ITEM,1.0,True)
  TNT1 A 0 Bright A_SpawnItem("TrueNemesisHellionSmokeSpawner",0,0,0,0)
  TNT1 A 0 A_CustomMissile ("WhiteSparkleSpawner2", 0, 0, random(0,-360), 2, random(0,360))
  CFSY AAAAAA 1 Bright
  TNT1 A 0 A_CustomMissile ("WhiteSparkleSpawner2", 0, 0, random(0,-360), 2, random(0,360))
  TNT1 A 0 Bright A_SpawnItem("CFSPLineSpawner",0,0,0,0)
  Loop
 Use:
  TNT1 A 0 A_JumpIf(user_music == 1,3)
  TNT1 A 0 A_GiveInventory("PowerStrength")
  TNT1 A 0 A_GiveInventory("NemesisUltraSphereQuiet")

  TNT1 A 1 A_GiveInventory("CFSPInvulnerability")
  TNT1 A 0 A_GiveInventory("CFSPQuadDamage")
  TNT1 A 0 A_GiveInventory("CFSPBlur")
  TNT1 A 0 A_GiveInventory("CFSPCarnage")
  TNT1 A 0 A_GiveInventory("CFSPSpeed")
  TNT1 A 0 A_GiveInventory("CFSPJump")
  TNT1 A 0 A_GiveInventory("CFSPAmmo")
  TNT1 A 0 A_JumpIfInventory("AgilityRuneRage",1,"NoIncreasedFiringSpeed")
  TNT1 A 0 A_GiveInventory("CFSPFirepower")
  stop
 NoIncreasedFiringSpeed:
  TNT1 A 0
  stop
  }
}

ACTOR LegendaryZombieHackroid2 : LegendaryZombieHackroid Replaces LegendaryZombieHackroid
{ 
DropItem "LegendaryArmor" 85 1
DropItem "LegAmmoSphere" 88 1
DropItem "LegendaryPowerShard" 35 1
DropItem "HandGrenadeAmmo" 235 2
DropItem "MineAmmo" 235 2
DropItem "Backpack" 198 1
DropItem "Armorplate" 205 1
DropItem "Portablemedkit" 210 1
DropItem "LDemonAmmoBox" 200 
DropItem "LDemonAmmo" 250 
DropItem "LegendaryRune" 30 1
DropItem "Legendary Plasmatic Rifle" 155 1
Tag "\c[z3]Legendary Zombie\c-"
States
{
Spawn:
    TNT1 A 0 A_SpawnItem("LHellionSmokeSpawner",0,0,0,0)
    LPOS A 10 Bright A_Look
    TNT1 A 0 A_SpawnItem("LHellionSmokeSpawner",0,0,0,0)
    LPOS Q 10 Bright A_Look
    TNT1 A 0 A_SpawnItem("LHellionSmokeSpawner",0,0,0,0)
    Loop
See:
    TNT1 A 0 A_JumpIf(user_music == 1,3)
    TNT1 A 0 ACS_NamedExecuteAlways("StartMonsterMusic",0,1)
    TNT1 A 0 A_SetUserVar("user_music",1)
    TNT1 A 0 A_SpawnItem("LHellionSmokeSpawner",0,0,0,0)
    LPOS A 0 A_JumpIfTargetInLOS("Strafing")
    LPOS AA 3 Bright A_Chase
    TNT1 A 0 A_SpawnItem("LHellionSmokeSpawner",0,0,0,0)
    LPOS BB 3 Bright A_Chase
    TNT1 A 0 A_SpawnItem("LHellionSmokeSpawner",0,0,0,0)
    TNT1 A 0 A_SpawnItem("FootStep",0,0,0,0)
    LPOS A 0 A_JumpIfTargetInLOS("Strafing")
    LPOS CC 3 Bright A_Chase
    TNT1 A 0 A_SpawnItem("LHellionSmokeSpawner",0,0,0,0)
    LPOS DD 3 Bright A_Chase
    LPOS A 0 A_Jump(80,"Rush")
    TNT1 A 0 A_SpawnItem("LHellionSmokeSpawner",0,0,0,0)
    TNT1 A 0 A_SpawnItem("FootStep",0,0,0,0)
    TNT1 A 0 A_SpawnItem("LHellionSmokeSpawner",0,0,0,0)
    Loop
  Death:
	TNT1 A 0
	TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("DisableTLegZomb") == 1, "Death2")
    TNT1 A 0 A_Jump(36,"TrueLeg")
  Death2:
    TNT1 A 0 A_Jump(36,"LegendarySoul")
    TNT1 A 0 A_StopSound(6)
	LPOS H 5 A_Scream
    LPOS I 5 A_Fall
    LPOS J 5 A_SpawnItem("BodyCrash",0,0,0,0)
    LPOS K 5 
    LPOS L -1 
	Stop
    }
}


ACTOR LegendaryAssaultCaptainHackroid2 : LegendaryAssaultCaptain2 replaces LegendaryAssaultCaptainHackroid
{
Tag "\c[z3]Legendary Assault Captain\c-"
    States
    {
    Spawn:
	    TNT1 A 0 A_SpawnItem("LHellionSmokeSpawner",0,0,0,0)
        LASG A 10 Bright A_Look
		TNT1 A 0 A_SpawnItem("LHellionSmokeSpawner",0,0,0,0)
		LASG Z 10 Bright A_Look
		TNT1 A 0 A_SpawnItem("LHellionSmokeSpawner",0,0,0,0)
        Loop
    See:
		TNT1 A 0 A_JumpIf(user_music == 1,3)
		TNT1 A 0 ACS_NamedExecuteAlways("StartMonsterMusic",0,9)
		TNT1 A 0 A_SetUserVar("user_music",1)
	    TNT1 A 0 A_SpawnItem("LHellionSmokeSpawner",0,0,0,0)
        LASG AA 4 Bright A_Chase
		TNT1 A 0 A_SpawnItem("LHellionSmokeSpawner",0,0,0,0)
		LASG BB 4 Bright A_Chase
		TNT1 A 0 A_SpawnItem("FootStep",0,0,0,0)
		TNT1 A 0 A_SpawnItem("LHellionSmokeSpawner",0,0,0,0)
		LASG CC 4 Bright A_Chase
		TNT1 A 0 A_SpawnItem("LHellionSmokeSpawner",0,0,0,0)
		LASG DD 4 Bright A_Chase
		TNT1 A 0 A_SpawnItem("FootStep",0,0,0,0)
		TNT1 A 0 A_SpawnItem("LHellionSmokeSpawner",0,0,0,0)
		TNT1 A 0 A_Jump(64,"Mine")
		LASG A 0 A_Jump(64,"Rush")
		TNT1 A 0 A_Jump(64,"DodgeLeft","DodgeRight")
		TNT1 A 0 A_Jump(64,"Chase")
		Loop
	Death:
	    TNT1 A 0
	    TNT1 A 0 A_Jump(36,"LegendarySoul")
	    TNT1 A 0 A_StopSound(6)
        LASG H 5
        LASG I 5 A_Scream
        LASG J 5 A_Fall
		LASG J 5 A_SpawnItem("BodyCrash",0,0,0,0)
        LASG K 5
        LASG L -1
        Stop
    }
}

/*
ACTOR HackroidZombie2 : HackroidZombie Replaces HackroidZombie
{
Tag "\c[p7]Hackroid Zombie\c-"
DamageFactor "PlayerNemesisPlasma", 0.0
DamageFactor "Legendary", 0.2
States
 {
  Spawn:
    TNT1 A 0
    TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("TrueLegendaryRuneSpawnCheck") == 1,"Remove")
	TNT1 A 0 A_Jump(160,"Remove")
	TNT1 A 0 A_PlaySoundEx("hack/glitch","Voice",0,2)
  Idle:
    TNT1 A 0 A_SpawnItem("RandomHellionSmoke")
    HPOS A 10 Bright A_Look
	TNT1 A 0 A_SpawnItem("RandomHellionSmoke")
	HPOS A 10 Bright A_Look
    Loop
  Remove:
	TNT1 A 1
	TNT1 A 0 A_SpawnItemEx("Zombieman",0,0,0,0,0,0,0,SXF_NOCHECKPOSITION)
	TNT1 A 0 A_ChangeFlag("COUNTKILL", FALSE)
	TNT1 A 0
	Stop
  }
}
*/

ACTOR HackroidZombie2 : LegendaryZombie Replaces HackroidZombie
{ 
Health 4000
Radius 20
Height 56
Speed 45
Mass 100
PainChance 25
PainChance "ZombieDemonTech", 0
BloodColor "Purple"
DropItem "LegendaryBossLifeEssence" 256
DropItem "LegendaryBossArmorBonusMax" 256
DropItem "LegendaryBossLifeEssence" 256
DropItem "LegendaryBossArmorBonusMax" 256
DropItem "EnragedLegendaryArmor" 200
DropItem "LegAmmoSphere" 256 1
DropItem "HandGrenadeAmmo" 235 2
DropItem "MineAmmo" 235 2
DropItem "Backpack" 256 1
DropItem "Armorplate" 205 1
DropItem "Portablemedkit" 210 1
DropItem "AgilityRune" 200 1
DropItem "LegendaryRune2" 200 1
DropItem "LegendaryPowerShard" 200 1
DropItem "EnragedLegendaryPowerShard" 200 1
DropItem "HackroidRifle" 140 1
DropItem "HCKAmmoBox" 120 90
DropItem "HCKAmmo" 256 20

DropItem "1337ASG" 80       //he uses the asg
DropItem "HCKShell" 200 4
DropItem "HCKShellBox" 200
DropItem "HackroidArmor" 20 1
DropItem "HackroidSphere" 20 1

DamageFactor 0.2
DamageFactor "LegendaryZombie", 0.0
DamageFactor "PDTBFG", 0.5
DamageFactor "PDTBFGTracer", 0.4
DamageFactor "PlayerDevBall", 0.8
DamageFactor "PlayerDevBall2", 0.8
DamageFactor "PlayerDTBFGRailgunSlug", 0.75
DamageFactor "PlayerDevTracer", 0.75
DamageFactor "DBFG10K2", 0.5
DamageFactor "PlayerDBFG10K2", 0.5
DamageFactor "DBFG2", 0.5
DamageFactor "PlayerDBFG2", 0.5
DamageFactor "PlayerPyro", 0.08
DamageFactor "Legendary", 0.1
DamageFactor "Superweapon", 0.1
DamageFactor "LegendaryPlayer", 0.1
DamageFactor "PlayerNemesisPlasma", 0.1
DamageFactor "Hackroid", 0.0
MONSTER 
+NOTIMEFREEZE
+NOFEAR
+BOSS
+BOSSDEATH
+FLOORCLIP
+MISSILEMORE
+MISSILEEVENMORE
+QUICKTORETALIATE
+NOICEDEATH
+NODROPOFF
SeeSound "HackroidZombie/see"
PainSound "HackroidZombie/Pain"
DeathSound "HackroidZombie/Death"
ActiveSound "HackroidZombie/Active"
Obituary "%o was Deleted by Hackroid Zombie's supreme energy."

Tag "\c[p7]Hackroid Zombie\c-"
var int user_music;
var int user_protection;
var int user_protected;
var int user_missile;
States
{
  Spawn:
    TNT1 A 0
    TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("TrueLegendaryRuneSpawnCheck") == 1,"Remove")
	TNT1 A 0 A_Jump(160,"Remove")
	TNT1 A 0 A_PlaySoundEx("hack/glitch","Voice",0,2)
  Idle:
    TNT1 A 0 A_SpawnItem("RandomHellionSmoke")
    HPOS A 10 Bright A_Look
	TNT1 A 0 A_SpawnItem("RandomHellionSmoke")
	HPOS A 10 Bright A_Look
    Loop
  Remove:
	TNT1 A 1
	TNT1 A 0 A_SpawnItemEx("Zombieman",0,0,0,0,0,0,0,SXF_NOCHECKPOSITION)
	TNT1 A 0 A_ChangeFlag("COUNTKILL", FALSE)
	TNT1 A 0
	Stop
  See:
	TNT1 A 0 A_JumpIf(user_music == 1,3)
	TNT1 A 0 ACS_NamedExecuteAlways("StartMonsterMusic",0,3000)
	TNT1 A 0 A_SetUserVar("user_music",1)
	TNT1 A 0 A_SpawnItem("RandomHellionSmoke")
    HPOS A 0 A_JumpIfTargetInLOS("Strafing")
    HPOS AA 3 Bright A_Chase
	TNT1 A 0 A_SpawnItem("RandomHellionSmoke")
	HPOS BB 3 Bright A_Chase
	TNT1 A 0 A_SpawnItem("RandomHellionSmoke")
	TNT1 A 0 A_SpawnItem("FootStep")
	HPOS A 0 A_JumpIfTargetInLOS("Strafing")
	HPOS CC 3 Bright A_Chase
	TNT1 A 0 A_SpawnItem("RandomHellionSmoke")
	HPOS DD 3 Bright A_Chase
	TNT1 A 0 A_Jump(30,"Teleport")
	TNT1 A 0 A_Jump(80,"Rush")
    TNT1 A 0 A_SpawnItem("RandomHellionSmoke")
	TNT1 A 0 A_SpawnItem("FootStep")
    Loop
  Teleport:
	HPOS A 1 Bright A_UnSetShootable
	TNT1 AAAA 0 A_SpawnItem("RandomHellionSmoke",0,0,0,0)
	HPOS AAAAAAAAAA 1 Bright A_FadeOut(0.1,0)
	HPOS A 2 Bright
	TNT1 AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 0 A_Wander
	TNT1 AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 0 A_Wander
	HPOS A 1 Bright A_PlayWeaponSound("boss/teleport")
	TNT1 AAAA 0 A_SpawnItem("RandomHellionSmoke",0,0,0,0)
	HPOS AAAAAAAAAA 1 Bright A_FadeIn(0.1)
	HPOS A 1 Bright A_SetShootable
	Goto See  
  Rush:
    HPOS A 0 A_JumpIfTargetInLOS("Strafing")
	TNT1 A 0 A_SpawnItem("FootStep")
	TNT1 A 0 A_SpawnItem("RandomHellionSmoke")
	TNT1 A 0 A_SpawnItemEx("HLegZombieGhostAA",0,0,0,0,0,0,0,128)
	HPOS A 1 Bright A_Chase
	TNT1 A 0 A_SpawnItemEx("HLegZombieGhostAA",0,0,0,0,0,0,0,128)
	HPOS A 1 Bright A_Chase
	TNT1 A 0 A_SpawnItemEx("HLegendaryZombieGhostBB",0,0,0,0,0,0,0,128)
	HPOS B 1 Bright A_Chase
	TNT1 A 0 A_SpawnItemEx("HLegendaryZombieGhostBB",0,0,0,0,0,0,0,128)
	HPOS B 1 Bright A_Chase
	TNT1 A 0 A_SpawnItem("FootStep")
    TNT1 A 0 A_SpawnItem("RandomHellionSmoke")
	TNT1 A 0 A_SpawnItemEx("HLegZombieGhostCC",0,0,0,0,0,0,0,128)
	HPOS C 1 Bright A_Chase
	TNT1 A 0 A_SpawnItemEx("HLegZombieGhostCC",0,0,0,0,0,0,0,128)
	HPOS C 1 Bright A_Chase
	TNT1 A 0 A_SpawnItemEx("HLegendaryZombieGhostDD",0,0,0,0,0,0,0,128)
	HPOS D 1 Bright A_Chase
	TNT1 A 0 A_SpawnItemEx("HLegendaryZombieGhostDD",0,0,0,0,0,0,0,128)
	HPOS D 1 Bright A_Chase
	TNT1 A 0 A_SpawnItem("FootStep")
	TNT1 A 0 A_Jump(84,"See")
	Loop
  Strafing:
	TNT1 A 0 A_SpawnItem("FootStep")
	TNT1 A 0 A_Chase("","Missile",CHF_DONTMOVE)
	HPOS AA 3 Bright A_GiveInventory("LegZombieStrafingg",1)
	TNT1 A 0 A_Chase("","Missile",CHF_DONTMOVE)
	HPOS BB 3 Bright A_GiveInventory("LegZombieStrafingg",1)
	TNT1 A 0 A_SpawnItem("FootStep")
	TNT1 A 0 A_Chase("","Missile",CHF_DONTMOVE)
    HPOS CC 3 Bright A_GiveInventory("LegZombieStrafingg",1)	
	TNT1 A 0 A_Chase("","Missile",CHF_DONTMOVE)
	HPOS DD 3 Bright A_GiveInventory("LegZombieStrafingg",1)
	Goto See
  Pause:
	TNT1 A 0 A_SetUserVar(user_missile,0)
	HPOS E 0 A_PlaySound("weapons/demontechsteam")
	HPOS EEEEE 3 Bright A_GiveInventory("HLegZombieStrafingg",1)
	Goto See	
  Missile:
	HPOS EEEE 3 Bright A_GiveInventory("HLegZombieStrafingg",1)
	TNT1 A 0 A_Jump(20,"Rapid")
	TNT1 A 0 A_Jump(20,"SpreadMissile")
	TNT1 A 0 A_Jump(20,"Shotgun")
	HPOS E 3 Bright A_GiveInventory("HLegZombieStrafingg",1)
	TNT1 A 0 A_GiveInventory("HLegZombieStrafingg",1)
	TNT1 A 0 A_CustomMissile("1337ProjZ",32,0,Frandom(-1,1),0)
	HPOS F 3 Bright A_PlaySoundEx("1337DTR/up","Weapon")
	TNT1 A 0 A_Jump(24,"Pause")
	TNT1 A 0 A_SpidRefire
    TNT1 A 0 A_PlayWeaponSound("1337DTR/Fire")
	Goto Missile+4	
  SpreadMissile:
	HPOS EEEE 3 Bright A_GiveInventory("HLegZombieStrafingg",1)
	HPOS E 6 Bright
	HPOS F 6 Bright A_PlaySoundEx("1337DTR/up","Weapon")
	TNT1 A 0 A_CustomMissile("1337ProjZ",32,20,Frandom(-1,1),0)
	TNT1 A 0 A_CustomMissile("1337ProjZ2",32,15,Frandom(-1,1),0)
	TNT1 A 0 A_CustomMissile("1337ProjZ2",32,10,Frandom(-1,1),0)
	TNT1 A 0 A_CustomMissile("1337ProjZ2",32,5,Frandom(-1,1),0)
	TNT1 A 0 A_CustomMissile("1337ProjZ",32,0,Frandom(-1,1),0)
	TNT1 A 0 A_CustomMissile("1337ProjZ2",32,-5,Frandom(-1,1),0)
	TNT1 A 0 A_CustomMissile("1337ProjZ2",32,-10,Frandom(-1,1),0)
	TNT1 A 0 A_CustomMissile("1337ProjZ2",32,-15,Frandom(-1,1),0)
	TNT1 A 0 A_CustomMissile("1337ProjZ",32,-20,Frandom(-1,1),0)
    TNT1 A 0 A_PlayWeaponSound("1337DTR/Fire")
	HPOS E 12 Bright
	Goto Missile
  Shotgun:
	HPOS EEEE 3 Bright A_GiveInventory("HLegZombieStrafingg",1)
	HPOS F 3 Bright A_PlaySoundEx("lasgguy/asgout","Weapon")
	TNT1 AAAA 0 Bright A_CustomMissile("1337SGTracer",Random(28,34),0,Random(6,-6),0)
	HPOS F 4 Bright A_CustomBulletAttack(22.5,18.3,4,Random(5,15)*6,"1337ModdedBulletPuff")		
	TNT1 A 0 A_SpawnItemEx("RedShellCasing", -8, 7, 30, 4, 0, (0.1)*Random(30, 40), Random(-80, -90), 128)
    TNT1 A 0 A_PlayWeaponSound("1337ASG/Fire")
	HPOS F 8 Bright
	TNT1 AAAA 0 Bright A_CustomMissile("1337SGTracer",Random(28,34),0,Random(6,-6),0)
	HPOS F 2 Bright A_CustomBulletAttack(22.5,18.3,4,Random(5,15)*6,"1337ModdedBulletPuff")		
	TNT1 A 0 A_SpawnItemEx("RedShellCasing", -8, 7, 30, 4, 0, (0.1)*Random(30, 40), Random(-80, -90), 128)
    TNT1 A 0 A_PlayWeaponSound("1337ASG/Fire")
	HPOS F 8 Bright
	TNT1 AAAA 0 Bright A_CustomMissile("1337SGTracer",Random(28,34),0,Random(6,-6),0)
	HPOS F 2 Bright A_CustomBulletAttack(22.5,18.3,4,Random(5,15)*6,"1337ModdedBulletPuff")		
	TNT1 A 0 A_SpawnItemEx("RedShellCasing", -8, 7, 30, 4, 0, (0.1)*Random(30, 40), Random(-80, -90), 128)
    TNT1 A 0 A_PlayWeaponSound("1337ASG/Fire")
	HPOS F 8 Bright
	TNT1 AAAA 0 Bright A_CustomMissile("1337SGTracer",Random(28,34),0,Random(6,-6),0)
	HPOS F 2 Bright A_CustomBulletAttack(22.5,18.3,4,Random(5,15)*6,"1337ModdedBulletPuff")		
	TNT1 A 0 A_SpawnItemEx("RedShellCasing", -8, 7, 30, 4, 0, (0.1)*Random(30, 40), Random(-80, -90), 128)
    TNT1 A 0 A_PlayWeaponSound("1337ASG/Fire")
	HPOS F 8 Bright
	HPOS E 8 Bright
	Goto Missile
  Rapid:
	TNT1 A 0 A_PlaySound("HackroidZombie/Anger",0,1,0,ATTN_NONE)
    HPOS EEEEEEEE 3 Bright A_GiveInventory("HLegZombieStrafingg",1)
  RapidLoop:
    TNT1 A 0 A_JumpIf(user_missile == 20,"Pause")
    HPOS E 2 A_GiveInventory("HLegZombieStrafingg",1)
	TNT1 A 0 A_CustomMissile("1337ProjZ",32,0,Frandom(-1,1),0)
	HPOS F 3 A_PlaySoundEx("weapons/DemonTechRifle","Weapon")
	TNT1 A 0 A_PlayWeaponSound("1337DTR/Fire")
	TNT1 A 0 A_SetUserVar("user_missile",user_missile+1)
	Loop
  Pain:
	TNT1 A 0 A_Jump(10,"Protection")
  Pain2:
	TNT1 A 0 A_Jump(192,"PainMissile")
    HPOS G 3 Bright A_GiveInventory("HLegZombieStrafingg",1)
    TNT1 A 0 A_Pain
	HPOS G 3 Bright A_GiveInventory("HLegZombieStrafingg",1)
    Goto See
  PainMissile: 
	HPOS G 3 Bright A_GiveInventory("LegZombieStrafingg",1)
	TNT1 A 0 A_Pain
	HPOS G 3 Bright A_GiveInventory("LegZombieStrafingg",1)
	Goto Missile	
  Protection:
	TNT1 A 0 A_JumpIf(user_protection >= 3,"Pain2")
	TNT1 A 0 A_JumpIf(user_protected == 1,"Pain2")
	TNT1 A 0 A_PlaySound("legendary/defense")
	TNT1 A 0 A_FaceTarget
	HPOS E 2 Bright ACS_NamedExecuteAlways("EnragedLegendaryProtection")
	TNT1 A 0 A_SpawnItem("RandomHellionSmoke")
	Goto See	
  Death:
    TNT1 A 0 A_StopSound(6)
   //TNT1 A 0 A_Jump(36,"LegendarySoul")
	HPOS H 5 A_Scream
    HPOS I 5 A_NoBlocking
    HPOS J 5 A_SpawnItem("BodyCrash")
    HPOS K 5 
    HPOS L -1 
	Stop
  LegendarySoul:
    TNT1 A 0 A_StopSound(6)
	TNT1 A 0 A_SpawnItem("BHellionSmokeSpawner")
	HPOS H 5 A_Scream
	TNT1 A 0 A_SpawnItem("BHellionSmokeSpawner")
    HPOS I 5 A_Fall
	TNT1 A 0 A_SpawnItem("BHellionSmokeSpawner")
    HPOS J 5 A_SpawnItem("BodyCrash")
	TNT1 A 0 A_SpawnItem("BHellionSmokeSpawner")
    HPOS KLL 5 A_SpawnItem("BHellionSmokeSpawner")
	HPOS L 140
	HPOS N 0 A_PlaySoundEx("brain/spit","Voice",0,2)
	HPOS LLLLLLLLLLLLLLLLL 2 Bright A_GiveInventory("LegSoulEvent",1)
	HPOS LLLLLLLLLLLLLLLLL 2 Bright A_GiveInventory("ELegSoulEvent",0)
	HPOS LLLLLLLLLLLLLLLLL 2 Bright A_GiveInventory("NemesisSoulEvent",1)
	TNT1 A 0 A_SpawnItemEx("HackroidSoul",0,0,16,0,0,0,0,32)
	TNT1 A 0 A_SpawnItemEx("TeleportFog",0,0,16,0,0,0,0,32)
	HPOS L -1
	Stop	
  XDeath:
    TNT1 A 0 A_StopSound(6)
    HPOS P 3 A_XScream
    HPOS Q 3 A_NoBlocking
    HPOS RSTUV 3 
    HPOS W -1 
    Stop
    }
}

/*
ACTOR HackroidAssaultCaptain2 : HackroidAssaultCaptain Replaces HackroidAssaultCaptain
{
Tag "\c[p7]Hackroid Zombie\c-"
DamageFactor "PlayerNemesisPlasma", 0.2
DamageFactor "Legendary", 0.2
States
 {
  Spawn:
    TNT1 A 0
    TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("TrueLegendaryRuneSpawnCheck") == 1,"Remove")
	TNT1 A 0 A_Jump(160,"Remove")
	TNT1 A 0 A_PlaySoundEx("hack/glitch","Voice",0,2)
  Idle:
	TNT1 A 0 A_SpawnItem("RandomHellionSmoke",0,0,0,0)
    HASG A 10 Bright A_Look
	TNT1 A 0 A_SpawnItem("RandomHellionSmoke",0,0,0,0)
	HASG Z 10 Bright A_Look
    Loop
  Remove:
	TNT1 A 1
	TNT1 A 0 A_SpawnItemEx("Shotgunguy",0,0,0,0,0,0,0,SXF_NOCHECKPOSITION)
	TNT1 A 0 A_ChangeFlag("COUNTKILL", FALSE)
	TNT1 A 0
	Stop
  }
}
*/

ACTOR HackroidAssaultCaptain2 : LegendaryAssaultCaptain Replaces HackroidAssaultCaptain
{
    Health 4200
    Radius 20
    Height 56
    Speed 45
    PainChance 20
    MONSTER
	BloodColor "Red"
	DropItem "LegendaryBossLifeEssence" 256
	DropItem "LegendaryBossArmorBonusMax" 256
	DropItem "LegendaryBossLifeEssence" 256
	DropItem "LegendaryBossArmorBonusMax" 256
	DropItem "1337ASG" 140
    DropItem "HCKShell" 200 4
    DropItem "HCKShellBox" 200
	DropItem "LegAmmoSphere" 256 1
	DropItem "EnragedLegendaryArmor" 200
	DropItem "HandGrenadeAmmo" 235 2
	DropItem "MineAmmo" 240 2
	DropItem "Backpack" 256 1
	DropItem "AgilityRune" 200 1
	DropItem "LegendaryRune2" 200 1
    DropItem "LegendaryPowerShard" 200 1
    DropItem "EnragedLegendaryPowerShard" 200 1
	
	DropItem "HackroidArmor" 20 1
    DropItem "HackroidSphere" 20 1
	Species "Zombie"
    DamageFactor 0.2
    DamageFactor "LegendaryZombie", 0.0
    DamageFactor "PDTBFG", 0.5
    DamageFactor "PDTBFGTracer", 0.4
    DamageFactor "PlayerDevBall", 0.8
    DamageFactor "PlayerDevBall2", 0.8
    DamageFactor "PlayerDTBFGRailgunSlug", 0.75
    DamageFactor "PlayerDevTracer", 0.75
    DamageFactor "DBFG10K2", 0.5
    DamageFactor "PlayerDBFG10K2", 0.5
    DamageFactor "DBFG2", 0.5
    DamageFactor "PlayerDBFG2", 0.5
    DamageFactor "PlayerPyro", 0.08
    DamageFactor "Legendary", 0.1
    DamageFactor "Superweapon", 0.1
    DamageFactor "LegendaryPlayer", 0.1
    DamageFactor "PlayerNemesisPlasma", 0.1
    DamageFactor "Hackroid", 0.0
    +NOTIMEFREEZE
	+NOFEAR
	+BOSS
	+BOSSDEATH
	+FLOORCLIP
	+MISSILEMORE
	+MISSILEEVENMORE
	+QUICKTORETALIATE
	+NOICEDEATH
	+NODROPOFF
	+NOTARGET
	+NORADIUSDMG
    SeeSound "HackroidAC/see"
    AttackSound "1337ASG/Fire"
    PainSound "HackroidAC/Pain"
    DeathSound "HackroidAC/Death"
    ActiveSound "HackroidAC/Active"
    Obituary "%o was Pulverized by an Hackroid Assault Captain"

    Tag "\c[i7]Hackroid Assault Captain\c-"
	var int user_music;
	var int user_protection;
	var int user_protected;
    States
    {
    Spawn:
        TNT1 A 0
        TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("TrueLegendaryRuneSpawnCheck") == 1,"Remove")
	    TNT1 A 0 A_Jump(160,"Remove")
	    TNT1 A 0 A_PlaySoundEx("hack/glitch","Voice",0,2)
    Idle:
	    TNT1 A 0 A_SpawnItem("RandomHellionSmoke",0,0,0,0)
        HASG A 10 Bright A_Look
		TNT1 A 0 A_SpawnItem("RandomHellionSmoke",0,0,0,0)
		HASG Z 10 Bright A_Look
        Loop
    Remove:
	    TNT1 A 1
	    TNT1 A 0 A_SpawnItemEx("Shotgunguy",0,0,0,0,0,0,0,SXF_NOCHECKPOSITION)
	    TNT1 A 0 A_ChangeFlag("COUNTKILL", FALSE)
	    TNT1 A 0
	    Stop
    See:
		TNT1 A 0 A_JumpIf(user_music == 1,3)
		TNT1 A 0 ACS_NamedExecuteAlways("StartMonsterMusic",0,3003)
		TNT1 A 0 A_SetUserVar("user_music",1)
	    TNT1 A 0 A_SpawnItem("RandomHellionSmoke",0,0,0,0)
        HASG AA 4 Bright A_Chase
		TNT1 A 0 A_SpawnItem("RandomHellionSmoke",0,0,0,0)
		HASG BB 4 Bright A_Chase
		TNT1 A 0 A_SpawnItem("FootStep",0,0,0,0)
		TNT1 A 0 A_SpawnItem("RandomHellionSmoke",0,0,0,0)
		HASG CC 4 Bright A_Chase
		TNT1 A 0 A_SpawnItem("RandomHellionSmoke",0,0,0,0)
		HASG DD 4 Bright A_Chase
		TNT1 A 0 A_SpawnItem("FootStep",0,0,0,0)
		TNT1 A 0 A_Jump(64,"Rush","DodgeLeft","DodgeRight","Chase")
		Loop
    Chase:
	    TNT1 A 0 A_SpawnItem("RandomHellionSmoke",0,0,0,0)
		HASG AA 1 Bright A_FastChase
		TNT1 A 0 A_SpawnItem("RandomHellionSmoke",0,0,0,0)
		TNT1 A 0 A_Jump(1,"Heal")
		HASG A 0 A_JumpIfCloser(130,"Dodge")
		HASG AA 1 Bright A_Chase
		TNT1 A 0 A_SpawnItem("RandomHellionSmoke",0,0,0,0)
		HASG A 0 A_JumpIfCloser(130,"Dodge")
		HASG BB 1 Bright A_Chase
		TNT1 A 0 A_SpawnItem("RandomHellionSmoke",0,0,0,0)
		HASG A 0 A_JumpIfCloser(130,"Dodge")
		HASG BB 1 Bright A_Chase
		TNT1 A 0 A_SpawnItem("RandomHellionSmoke",0,0,0,0)
		TNT1 A 0 A_SpawnItemEx("FootStep",0,0,2,0,0,-20)
		HASG A 0 A_JumpIfCloser(150,"Dodge")
		HASG CC 1 Bright A_Chase
		TNT1 A 0 A_SpawnItem("RandomHellionSmoke",0,0,0,0)
		TNT1 A 0 A_Jump(10,"Heal")
		HASG A 0 A_JumpIfCloser(150,"Dodge")
		HASG CC 1 Bright A_FastChase
		TNT1 A 0 A_SpawnItem("RandomHellionSmoke",0,0,0,0)
		HASG A 0 A_JumpIfCloser(130,"Dodge")
		HASG DD 1 Bright A_FastChase
		TNT1 A 0 A_SpawnItem("RandomHellionSmoke",0,0,0,0)
		HASG A 0 A_JumpIfCloser(130,"Dodge")
		HASG DD 1 Bright A_Chase
		TNT1 A 0 A_SpawnItemEx("FootStep",0,0,2,0,0,-20)
		HASG A 0 A_Jump(128,"Dodge")
		Loop
	Rush:
		TNT1 A 0 A_SpawnItem("FootStep",0,0,0,0)
		TNT1 A 0 A_SpawnItem("RandomHellionSmoke",0,0,0,0)
		TNT1 A 0 A_SpawnItemEx("HELegASGZombieGhostA",0,0,0,0,0,0,0,128)
		HASG A 1 Bright A_Chase
		TNT1 A 0 A_SpawnItemEx("HELegASGZombieGhostA",0,0,0,0,0,0,0,128)
		HASG A 1 Bright A_Chase
		TNT1 A 0 A_SpawnItemEx("ELegASGZombieGhostB",0,0,0,0,0,0,0,128)
		HASG B 1 Bright A_Chase
		TNT1 A 0 A_SpawnItemEx("HELegASGZombieGhostB",0,0,0,0,0,0,0,128)
		HASG B 1 Bright A_Chase
		TNT1 A 0 A_SpawnItem("FootStep",0,0,0,0)
		TNT1 A 0 A_SpawnItem("RandomHellionSmoke",0,0,0,0)
		TNT1 A 0 A_SpawnItemEx("HELegASGZombieGhostC",0,0,0,0,0,0,0,128)
		HASG C 1 Bright A_Chase
		TNT1 A 0 A_SpawnItemEx("HELegASGZombieGhostC",0,0,0,0,0,0,0,128)
		HASG C 1 Bright A_Chase
		TNT1 A 0 A_SpawnItemEx("HELegASGZombieGhostD",0,0,0,0,0,0,0,128)
		HASG D 1 Bright A_Chase
		TNT1 A 0 A_SpawnItemEx("HELegASGZombieGhostD",0,0,0,0,0,0,0,128)
		HASG D 1 Bright A_Chase
		TNT1 A 0 A_SpawnItem("FootStep",0,0,0,0)
		TNT1 A 0 A_Jump(85,"See")
		Loop
   GrenadeAttack:
        TNT1 A 0 A_PlaySound("weapons/hgrenadepin",0,1.0,0)
		HASG CE 4 Bright A_FaceTarget
		TNT1 A 0 A_PlaySound("weapons/hgrenadethrow",0,1.0,0)
		HASG CE 4 Bright A_FaceTarget
		HASG E 1 Bright A_CustomMissile("ELACGrenade",32,0,0,2,4)
		HASG CE 4 Bright A_FaceTarget
		TNT1 A 0 A_PlaySound("weapons/hgrenadepin",0,1.0,0)
		HASG CE 4 Bright A_FaceTarget
		TNT1 A 0 A_PlaySound("weapons/hgrenadethrow",0,1.0,0)
	    HASG CE 4 Bright A_FaceTarget
		HASG E 1 Bright A_CustomMissile("ELACGrenade",32,0,0,2,4)
		Goto Rail
	Heal:
	    TNT1 A 0 A_SpawnItem("GHellionSmokeSpawner",0,0,0,0)
	    HASG A 5 Bright
		TNT1 A 0 A_SpawnItem("GHellionSmokeSpawner",0,0,0,0)
		TNT1 A 0 HealThing(5)
		TNT1 A 0 A_PlaySound("pickups/flask",0,1.0,0)
		GoTo See
	Heal2:
	    TNT1 A 0 A_SpawnItem("GHellionSmokeSpawner",0,0,0,0)
		HASG A 5 Bright
		TNT1 A 0 A_SpawnItem("GHellionSmokeSpawner",0,0,0,0)
		TNT1 A 0 HealThing(15)
		TNT1 A 0 A_PlaySound("pickups/pstimpack",0,1.0,0)
		GoTo See
	Heal3:
	    TNT1 A 0 A_SpawnItem("GHellionSmokeSpawner",0,0,0,0)
		HASG A 5 Bright
		TNT1 A 0 A_SpawnItem("GHellionSmokeSpawner",0,0,0,0)
		TNT1 A 0 HealThing(25)
		TNT1 A 0 A_PlaySound("pickups/pmedkit",0,1.0,0)
		GoTo See
	SeeNoDodge:
	    TNT1 A 0 A_SpawnItem("RandomHellionSmoke",0,0,0,0)
		HASG AABB 2 Bright A_Chase
		TNT1 A 0 A_SpawnItem("RandomHellionSmoke",0,0,0,0)
		TNT1 A 0 A_SpawnItemEx("FootStep",0,0,2,0,0,-20)
		HASG CCDD 2 Bright A_Chase
		TNT1 A 0 A_SpawnItem("RandomHellionSmoke",0,0,0,0)
		TNT1 A 0 A_SpawnItemEx("FootStep",0,0,2,0,0,-20)
		HASG AABB 2 Bright A_Chase
		TNT1 A 0 A_SpawnItem("RandomHellionSmoke",0,0,0,0)
		TNT1 A 0 A_SpawnItemEx("FootStep",0,0,2,0,0,-20)
		HASG CCDD 2 Bright A_Chase
		TNT1 A 0 A_SpawnItem("RandomHellionSmoke",0,0,0,0)
		TNT1 A 0 A_SpawnItemEx("FootStep",0,0,2,0,0,-20)
		HASG AABB 2 Bright A_Chase
		TNT1 A 0 A_SpawnItem("RandomHellionSmoke",0,0,0,0)
		TNT1 A 0 A_SpawnItemEx("FootStep",0,0,2,0,0,-20)
		HASG CCDD 2 Bright A_Chase
		TNT1 A 0 A_SpawnItemEx("FootStep",0,0,2,0,0,-20)
		Goto Chase
	Dodge:
	    TNT1 A 0 A_SpawnItem("RandomHellionSmoke",0,0,0,0)
		HASG A 1 Bright A_FaceTarget
		TNT1 A 0 A_SpawnItem("RandomHellionSmoke",0,0,0,0)
		HASG E 0 ThrustThingZ(0, 20, 0, 0)
		HASG A 0 A_Jump(256, "DodgeRight", "DodgeLeft")
	DodgeLeft:
		HASG E 0 ThrustThing(angle*256/360+192, 15, 0, 0)
		TNT1 A 0 A_Jump(40,"Heal")
		TNT1 A 0 A_Jump(35,"Heal2")
		TNT1 A 0 A_Jump(30,"Heal3")
		Goto SeeNoDodge
	DodgeRight:
		HASG E 0 ThrustThing(angle*256/360+64, 15, 0, 0)
		TNT1 A 0 A_Jump(40,"Heal")
		TNT1 A 0 A_Jump(35,"Heal2")
		TNT1 A 0 A_Jump(30,"Heal3")
		Goto SeeNoDodge
   Missile:
        TNT1 A 0 A_SetShootable
        TNT1 A 0 A_UnsetInvulnerable
        TNT1 A 0 A_SetTranslucent(1)
		HASG E 3 Bright A_GiveInventory("LegZombieStrafingg",1)
		TNT1 A 0 A_GiveInventory("LegZombieStrafingg",1)
        TNT1 A 0 A_SpawnItem("RandomHellionSmoke",0,0,0,0)
        HASG E 4 Bright A_FaceTarget
		TNT1 A 0 A_SpawnItem("RandomHellionSmoke",0,0,0,0)
		TNT1 A 0 A_SpawnItemEx("RedShellCasing", -8, 7, 30, 4, 0, (0.1)*Random(30, 40), Random(-80, -90), 128)
		TNT1 AAAA 0 Bright A_CustomMissile("1337SGTracer",Random(28,34),0,Random(6,-6),0)
		HASG F 2 Bright A_CustomBulletAttack(22.5,18.3,4,Random(5,15)*6,"1337ModdedBulletPuff")
	    HASG E 4 Bright A_FaceTarget
		TNT1 A 0 Bright A_CPosRefire
        TNT1 A 0 A_Jump(6,"Heal")
        TNT1 A 0 A_Jump(5,"Heal2")
        TNT1 A 0 A_Jump(4,"Heal3")
		TNT1 A 0 A_Jump(10,"Grenade")
        TNT1 A 0 A_JumpIfCloser(300,"Grenade")
        Goto Missile+4
	Rail:
		HASG E 4 A_SpawnItem("RandomHellionSmoke",0,0,0,0)
		TNT1 A 0 A_SpawnItem("RandomHellionSmoke",0,0,0,0)
	    TNT1 A 0 A_FaceTarget 
		TNT1 A 0 A_PlaySound("1337ASG/Fire",5)
		TNT1 A 0 A_SpawnItemEx("RedShellCasing", -8, 7, 30, 4, 0, (0.1)*Random(30, 40), Random(-80, -90), 128)
		TNT1 AAAA 0 Bright A_CustomMissile("1337SGTracer",Random(28,34),0,Random(6,-6),0)
		HASG F 2 Bright A_CustomBulletAttack(22.5,18.3,4,Random(5,15)*6,"1337ModdedBulletPuff")		
		TNT1 A 0 A_SpawnItemEx("RedShellCasing", -8, 7, 30, 4, 0, (0.1)*Random(30, 40), Random(-80, -90), 128)
		TNT1 AAAA 0 Bright A_CustomMissile("1337SGTracer",Random(28,34),0,Random(6,-6),0)
		HASG F 2 Bright A_CustomBulletAttack(22.5,18.3,4,Random(5,15)*6,"1337ModdedBulletPuff")		
		TNT1 A 0 A_SpawnItemEx("RedShellCasing", -8, 7, 30, 4, 0, (0.1)*Random(30, 40), Random(-80, -90), 128)
		TNT1 AAAA 0 Bright A_CustomMissile("1337SGTracer",Random(28,34),0,Random(6,-6),0)
		HASG F 2 Bright A_CustomBulletAttack(22.5,18.3,4,Random(5,15)*6,"1337ModdedBulletPuff")
		HASG E 4 A_SpawnItem("RandomHellionSmoke",0,0,0,0)
	    TNT1 A 0 A_SpawnItem("RandomHellionSmoke",0,0,0,0)
		TNT1 A 0 A_FaceTarget 
		TNT1 A 0 A_PlaySound("1337ASG/Fire",5)
		TNT1 A 0 A_SpawnItemEx("RedShellCasing", -8, 7, 30, 4, 0, (0.1)*Random(30, 40), Random(-80, -90), 128)
		TNT1 AAAA 0 Bright A_CustomMissile("1337SGTracer",Random(28,34),0,Random(6,-6),0)
		HASG F 2 Bright A_CustomBulletAttack(22.5,18.3,4,Random(5,15)*6,"1337ModdedBulletPuff")		
		TNT1 A 0 A_SpawnItemEx("RedShellCasing", -8, 7, 30, 4, 0, (0.1)*Random(30, 40), Random(-80, -90), 128)
		TNT1 AAAA 0 Bright A_CustomMissile("1337SGTracer",Random(28,34),0,Random(6,-6),0)
		HASG F 2 Bright A_CustomBulletAttack(22.5,18.3,4,Random(5,15)*6,"1337ModdedBulletPuff")		
		TNT1 A 0 A_SpawnItemEx("RedShellCasing", -8, 7, 30, 4, 0, (0.1)*Random(30, 40), Random(-80, -90), 128)
		TNT1 AAAA 0 Bright A_CustomMissile("1337SGTracer",Random(28,34),0,Random(6,-6),0)
		HASG F 2 Bright A_CustomBulletAttack(22.5,18.3,4,Random(5,15)*6,"1337ModdedBulletPuff")
		Goto See
	Strafing:
		TNT1 A 0 A_SpawnItem("FootStep",0,0,0,0)
		TNT1 A 0 A_Chase("","Missile",CHF_DONTMOVE)
	    HASG AA 3 Bright A_GiveInventory("LegZombieStrafingg",1)
		TNT1 A 0 A_Chase("","Missile",CHF_DONTMOVE)
		HASG BB 3 Bright A_GiveInventory("LegZombieStrafingg",1)
		TNT1 A 0 A_SpawnItem("FootStep",0,0,0,0)
		TNT1 A 0 A_Chase("","Missile",CHF_DONTMOVE)
		HASG CC 3 Bright A_GiveInventory("LegZombieStrafingg",1)	
		TNT1 A 0 A_Chase("","Missile",CHF_DONTMOVE)
		HASG DD 3 Bright A_GiveInventory("LegZombieStrafingg",1)
		Goto See
	Grenade:
		TNT1 A 0 A_PlaySound("weapons/hgrenadepin",0,1.0,0)
		HASG CE 4 Bright A_FaceTarget
		TNT1 A 0 A_PlaySound("weapons/hgrenadethrow",0,1.0,0)
		HASG E 1 Bright A_CustomMissile("HELACGrenade",32,0,0,2,4)
		Goto GrenadeAttack
    Reload:
    	TNT1 A 0 A_ChangeFlag("NoPain", 1)
    	TNT1 A 0 A_PlaySound("lasgguy/asgout")
		TNT1 A 0 A_SpawnItemEx("LegendaryEmptyDrumSpawner", -8, 7, 30, 4, 0, (0.1)*Random(30, 40), Random(-80, -90), 128)
		TNT1 A 0 A_SpawnItem("RandomHellionSmoke",0,0,0,0)
    	HASG E 8 Bright A_PlaySound("lasgguy/asgin") 
		HASG E 20 Bright A_PlaySound("LShotgun/Cock")
		TNT1 A 0 A_SpawnItem("RandomHellionSmoke",0,0,0,0)
    	TNT1 A 0 A_ChangeFlag("NoPain", 0)
    	Goto See
    Pain:
	    TNT1 A 0 A_Jump(20,"Protection")
	    TNT1 A 0 A_Jump(192,"PainMissile")
        HASG G 3 Bright
        HASG G 3 Bright A_Pain
		TNT1 A 0 A_Jump(40,"Dodge")
        Goto See
    PainMissile:
        HASG G 3 Bright
        HASG G 3 Bright A_Pain
        Goto Missile	
    Protection:
		TNT1 A 0 A_JumpIf(user_protection >= 3,"Pain")
		TNT1 A 0 A_JumpIf(user_protected == 1,"Pain")
		TNT1 A 0 A_PlaySound("legendary/defense")
		TNT1 A 0 A_FaceTarget
		HASG E 2 Bright ACS_NamedExecuteAlways("EnragedLegendaryProtection",0,0,0,0)
		TNT1 A 0 A_SpawnItem("RandomHellionSmoke",0,0,0,0)
		Goto See
    Death:
	    TNT1 A 0 A_StopSound(6)
		//TNT1 A 0 A_Jump(36,"LegendarySoul")
        HASG H 5
        HASG I 5 A_Scream
        HASG J 5 A_Fall
		HASG J 5 A_SpawnItem("BodyCrash",0,0,0,0)
        HASG K 5
        HASG L -1
        Stop
	LegendarySoul:
	    TNT1 A 0 A_StopSound(6)
		TNT1 A 0 A_SpawnItem("RandomHellionSmoke",0,0,0,0)
        HASG H 5
		TNT1 A 0 A_SpawnItem("RandomHellionSmoke",0,0,0,0)
        HASG I 5 A_Scream
		TNT1 A 0 A_SpawnItem("RandomHellionSmoke",0,0,0,0)
        HASG J 5 A_Fall
		TNT1 A 0 A_SpawnItem("RandomHellionSmoke",0,0,0,0)
		HASG J 5 A_SpawnItem("BodyCrash",0,0,0,0)
		TNT1 A 0 A_SpawnItem("RandomHellionSmoke",0,0,0,0)
        HASG K 5
		TNT1 A 0 A_SpawnItem("RandomHellionSmoke",0,0,0,0)
		HASG L 140
		HASG L 0 A_PlaySoundEx("brain/spit","Voice",0,2)
		HASG LLLLLLLLLLLLLLLLL 2 Bright A_GiveInventory("ELegSoulEvent",1)
		HASG LLLLLLLLLLLLLLLLL 2 Bright A_GiveInventory("ELegSoulEvent",1)
		HASG LLLLLLLLLLLLLLLLL 2 Bright A_GiveInventory("ELegSoulEvent",1)
		TNT1 A 0 A_SpawnItemEx("HackroidSoul",0,0,16,0,0,0,0,32)
		TNT1 A 0 A_SpawnItemEx("TeleportFog",0,0,16,0,0,0,0,32)
		HASG L -1
        Stop
    XDeath:
	    TNT1 A 0 A_StopSound(6)
        HASG O 5 
        HASG P 5 A_XScream
        HASG Q 5 A_Fall
        HASG RSTUV 5
        HASG W -1
        Stop
    }
}

ACTOR BrimstoneObeliskProjectileFix : BrimstoneObeliskProjectile Replaces BrimstoneObeliskProjectile
{
DamageType "PlayerBrimstone"
Species "Player"
+THRUSPECIES
+RIPPER
-CANNOTPUSH
+NODAMAGETHRUST
+EXTREMEDEATH
+FORCERADIUSDMG
}

ACTOR LegendaryQuadShotgunSpeed : LegendaryQuadShotgun Replaces LegendaryQuadShotgun
{
Tag "Legendary Quad Barrel Shotgun"
States
 {
  ReloadFourShells:
	//TNT1 A 0 A_JumpIfInventory("PowerDoubleFiringSpeed",1,"ReloadFourShellsNoSpeed")
	//TNT1 A 0 A_JumpIfInventory("AgilityRuneRage",1,"ReloadFourShellsNoSpeed")
	//TNT1 A 0 A_JumpIfInventory("TrueLegDoubleFiringSpeed",1,"ReloadFourShellsNoSpeed")
	LQ77 H 2
 	LQ78 A 1
 	LQ78 B 1
 	LQ78 C 2
 	LQ78 D 6
 	LQ78 E 2
 	LQ78 F 1
 	LQ78 G 1
 	LQ78 H 1
 	TNT1 A 2
	TNT1 AAAA 0 A_SpawnItemEx("BlueShellCasing",25,-2,25,Random(2,4),Random(-3,-6),Random(3,6),0)
	TNT1 A 0 A_PlayWeaponSound("LegendaryQuadShotgun/Open")
	LQ79 ABCD 1
	LQ79 D 6
	LQ80 ABCD 2
	LQ80 EFGH 1
	TNT1 A 0 A_TakeInventory("LegendaryShell",2)
	TNT1 A 0 A_GiveInventory("LegendaryQuadShell",2)
	TNT1 A 0 A_PlayWeaponSound("LegendaryQuadShotgun/Load")
	LQ81 A 6
	LQ81 ABCD 2
	LQ81 EFGHI 1
	TNT1 A 0 A_TakeInventory("LegendaryShell",2)
	TNT1 A 0 A_GiveInventory("LegendaryQuadShell",2)
	TNT1 A 0 A_PlayWeaponSound("LegendaryQuadShotgun/Load")	
    TNT1 A 12
	LQ78 HG 1
 	LQ78 FE 1
 	LQ78 D 2
	TNT1 A 0 A_PlayWeaponSound("LegendaryQuadShotgun/Close")
 	LQ78 C 1
 	LQ78 BA 1
    LQ77 H 2
    LQ77 A 2
    Goto ReadyLoop
  ReloadTwoShells:
	//TNT1 A 0 A_JumpIfInventory("PowerDoubleFiringSpeed",1,"ReloadTwoShellsNoSpeed")
	//TNT1 A 0 A_JumpIfInventory("AgilityRuneRage",1,"ReloadTwoShellsNoSpeed")
	//TNT1 A 0 A_JumpIfInventory("TrueLegDoubleFiringSpeed",1,"ReloadTwoShellsNoSpeed")
    TNT1 A 0 A_JumpIfInventory("LegendaryShell",2,1)
	Goto ReadyLoop
	LQ77 H 2
 	LQ78 A 1
 	LQ78 B 1
 	LQ78 C 2
 	LQ78 D 6
 	LQ78 E 2
 	LQ78 F 1
 	LQ78 G 1
 	LQ78 H 1
 	TNT1 A 2
	TNT1 AA 0 A_SpawnItemEx("BlueShellCasing",25,-2,25,Random(2,4),Random(-3,-6),Random(3,6),0)
	TNT1 A 0 A_PlayWeaponSound("LegendaryQuadShotgun/Open")
	LQ81 ABCD 2
	LQ81 EFGHI 1
	TNT1 A 0 A_TakeInventory("LegendaryShell",2)
	TNT1 A 0 A_GiveInventory("LegendaryQuadShell",2)
	TNT1 A 0 A_PlayWeaponSound("LegendaryQuadShotgun/Load")	
    TNT1 A 8
	LQ78 HG 1
 	LQ78 FE 1
 	LQ78 D 1
	TNT1 A 0 A_PlayWeaponSound("LegendaryQuadShotgun/Close")
 	LQ78 C 1
 	LQ78 BA 1
    LQ77 H 1
    LQ77 A 2
	Goto ReadyLoop
 }
}

Actor "Tech Bruhcan" : "Tech Vulcan" Replaces "Tech Vulcan"
{
Tag "Tech Vulcan"
States
 {
    Fire:
    TNT1 A 0 A_GunFlash
	TNT1 A 0 A_PlayWeaponSound("vulcan/fire")
	TNT1 A 0 Radius_Quake(2,2,0,1,0)
	TNT1 A 0 A_SpawnItemEx("RedCasing",25,-8,25,Random(2,4),Random(-3,-6),Random(3,6),0)
    VULC A 0 A_FireCustomMissile("VulcanPlasmaTracer",Random(2,-2),1,0,Random(4,-3)) //15
	VULC B 1 Bright Offset(0,36)
	VULC A 1 Offset(0,40)
	VULC A 1 Offset(0,36)
	VULC A 1 Offset(0,32)
    TNT1 A 0 A_GunFlash
	TNT1 A 0 A_PlayWeaponSound("vulcan/fire")
	TNT1 A 0 Radius_Quake(2,2,0,1,0)
	TNT1 A 0 A_SpawnItemEx("RedCasing",25,-8,25,Random(2,4),Random(-3,-6),Random(3,6),0)
    VULC A 0 A_FireCustomMissile("VulcanPlasmaTracer",Random(2,-2),1,0,Random(4,-3))
	VULC C 1 Bright Offset(0,36)
	VULC A 1 Offset(0,40)
	VULC A 1 Offset(0,36)
	VULC A 1 Offset(0,32)
    TNT1 A 0 A_GunFlash
	TNT1 A 0 A_PlayWeaponSound("vulcan/fire")
	TNT1 A 0 Radius_Quake(2,2,0,1,0)
	TNT1 A 0 A_SpawnItemEx("RedCasing",25,-8,25,Random(2,4),Random(-3,-6),Random(3,6),0)
    VULC A 0 A_FireCustomMissile("VulcanPlasmaTracer",Random(2,-2),1,0,Random(4,-3))	
	VULC D 1 Bright Offset(0,36)
	VULC A 1 Offset(0,40)
	VULC A 1 Offset(0,36)
	VULC A 1 Offset(0,32)
	VULC A 1 Bright A_ReFire
    VULC A 4
    VULC A 6 A_ReFire
    Goto Ready
 }
}

ACTOR CacolanternComplexFix : CacolanternComplex Replaces CacolanternComplex
{
Tag "\ciCacolantern\c-"
Obituary "%o was lit on fire from the Cacolantern's breath"
States
 {
  Melee:
   HED2 BC 5 A_FaceTarget
   HED2 D 5 A_MeleeAttack
   HED2 CB 5 A_FaceTarget
   Goto See
 }
}