ACTOR SawCacodemon //Why VSM called this enemy "Saw Cacodemon" is anyone's guess
{ //I figured it out, it's the fucking music
//Creator: GDWolf
//Origin: Complex Very Strong Monsters
//Sprite: SWCD
//Title: "Saw Cacodemon"
Health 4500
Radius 24
Height 44
Mass 400
Meleedamage 8
Speed 10
PainChance 128
Monster
SeeSound "caco/sight"
PainSound "caco/pain"
DeathSound "caco/death"
ActiveSound "caco/active"
MeleeSound "caco/melee"
Obituary "%o died because %p ran out of time and saw the... Saw Cacodemon."
DamageFactor "Cyber10K", 0.0
DamageFactor "PDTBFG", 0.01
DamageFactor "PDTBFGTracer", 0.01
DamageFactor "Legendary", 0.5
DamageFactor "LegendaryGuru", 0.5
DamageFactor "LegendaryGuruPlayer", 0.7
DamageFactor "LegendaryPlayer", 0.3
DamageFactor "BFGSplash", 0.2
DamageFactor "BFGSpray", 0.2
DamageFactor "CerEnergyBall", 0.0
DamageFactor "PlayerDevBall", 0.005
DamageFactor "PlayerDevBall2", 0.005
DamageFactor "PlayerDTBFGRailgunSlug", 0.005
DamageFactor "PlayerDevTracer", 0.005
DamageFactor "DemolisherEx", 0.0
DamageFactor "DarkDemoEx", 0.0
DamageFactor "CerChainguns", 0.0
DamageFactor "CerEnergyBall", 0.0
DamageFactor "PlayerDTRG", 0.3
DamageFactor "DBFG10K2", 0.65
DamageFactor "PlayerDBFG10K2", 0.65
DamageFactor "DBFG2", 0.65
DamageFactor "PlayerDBFG2", 0.65
DamageFactor "PyroShot", 0.2
DamageFactor "PlayerPyro", 0.2
DamageFactor "PDTPuff", 0.2
DamageFactor 0.40
DropItem "LegAmmoSphere" 150 1
DropItem "LegDemonRune" 135 1
DropItem "LegendarySphere" 128 1
DropItem "LegendaryArmor" 128 1
DropItem "LegendaryUltraSphere" 233
DropItem "BFG9500" 90 1
DropItem "AgilityRune" 90 1
DropItem "BossLifeEssence" 150
DropItem "BossArmorBonusMax" 150
DropItem "GreaterPlasmaEnergy" 255 
DamageFactor "CacoComet" , 0.0
Tag "\c[i7]SAW CacoDemon\c-"
BloodColor "Red"
Species "CacoDemon"
+FLOAT
+NOGRAVITY
+NOTARGET
+BOSS
+AVOIDMELEE
+MISSILEMORE
+MISSILEEVENMORE
+DONTGIB
+QUICKTORETALIATE
+DONTHARMSPECIES
+DONTHURTSPECIES
+NOFEAR
var int user_music;
States
{
  Spawn:
	TNT1 A 0 A_SpawnItem("NemesisHellionSmokeSpawner",0,0,0,0)
	SWCD A 10 A_Look
	TNT1 A 0 A_SpawnItem("NemesisHellionSmokeSpawner",0,0,0,0)
	Loop
  See:
    TNT1 A 0 A_JumpIf(user_music == 1,3)
	TNT1 A 0 ACS_NamedExecuteAlways("StartMonsterMusic",0,2033)
	TNT1 A 0 A_SetUserVar("user_music",1)
	TNT1 A 0 A_Jump(20,"FastChase")
	TNT1 A 0 A_SpawnItem("NemesisHellionSmokeSpawner",0,0,0,0)
	SWCD A 3 A_Chase
	TNT1 A 0 A_SpawnItem("NemesisHellionSmokeSpawner",0,0,0,0)
	TNT1 A 0 A_Jump(62,"Rush")
	Loop
  Rush:
	TNT1 A 0 A_SpawnItem("NemesisHellionSmokeSpawner",0,0,0,0)
	TNT1 A 0 A_SpawnItemEx("SawCacodemonGhostA")	
	SWCD A 1 A_Chase
	TNT1 A 0 A_SpawnItem("NemesisHellionSmokeSpawner",0,0,0,0)
	TNT1 A 0 A_SpawnItemEx("SawCacodemonGhostA")	
	SWCD A 1 A_Chase
	TNT1 A 0 A_SpawnItem("NemesisHellionSmokeSpawner",0,0,0,0)
	TNT1 A 0 A_SpawnItemEx("SawCacodemonGhostA")	
	SWCD A 1 A_Chase
	TNT1 A 0 A_SpawnItem("NemesisHellionSmokeSpawner",0,0,0,0)
	TNT1 A 0 A_SpawnItemEx("SawCacodemonGhostA")	
	SWCD A 1 A_Chase
	TNT1 A 0 A_SpawnItem("NemesisHellionSmokeSpawner",0,0,0,0)
	TNT1 A 0 A_SpawnItemEx("SawCacodemonGhostA")	
	SWCD A 1 A_Chase
	TNT1 A 0 A_SpawnItem("NemesisHellionSmokeSpawner",0,0,0,0)
	TNT1 A 0 A_SpawnItemEx("SawCacodemonGhostA")	
	SWCD A 1 A_Chase
	TNT1 A 0 A_SpawnItem("NemesisHellionSmokeSpawner",0,0,0,0)
	TNT1 A 0 A_SpawnItemEx("SawCacodemonGhostA")	
	SWCD A 1 A_Chase
	TNT1 A 0 A_SpawnItem("NemesisHellionSmokeSpawner",0,0,0,0)
	TNT1 A 0 A_SpawnItemEx("SawCacodemonGhostA")	
	SWCD A 1 A_Chase
	TNT1 A 0 A_SpawnItem("NemesisHellionSmokeSpawner",0,0,0,0)
	TNT1 A 0 A_Jump(87,"See")
	Loop
  FastChase:
	TNT1 A 0 A_SpawnItem("NemesisHellionSmokeSpawner",0,0,0,0)
	SWCD A 3 A_FastChase
	TNT1 A 0 A_SpawnItem("NemesisHellionSmokeSpawner",0,0,0,0)
	SWCD A 3 A_FastChase
	TNT1 A 0 A_SpawnItem("NemesisHellionSmokeSpawner",0,0,0,0)
	Goto See
  Missile:
	TNT1 A 0 A_Jump(128,"Missile2")
	TNT1 A 0 A_Jump(64,"Missile3")
	TNT1 A 0 A_Jump(54,"Missile4")
	TNT1 A 0 A_Jump(44,"Missile5")
	TNT1 A 0 A_Jump(34,"Missile6")
	Goto See
  Missile2:
    TNT1 A 0 A_SetShootable
    TNT1 A 0 A_UnsetInvulnerable
    TNT1 A 0 A_SetTranslucent(1)
	TNT1 A 0 A_PlaySound("weapons/bfgf")
	SWCD B 15 A_FaceTarget
	SWCD C 10 Bright A_FaceTarget
	SWCD D 10 Bright A_CustomMissile("LegCyberBFG9500Ball", 15)
	SWCD CB 15 A_FaceTarget
	TNT1 A 0 A_PlaySound("weapons/bfgf")
	SWCD B 15 A_FaceTarget
	SWCD C 10 Bright A_FaceTarget
	SWCD D 10 Bright A_CustomMissile("LegCyberBFG9500Ball", 15)
	SWCD CB 15 A_FaceTarget
	TNT1 A 0 A_PlaySound("weapons/bfgf")
	SWCD B 15 A_FaceTarget
	SWCD C 10 Bright A_FaceTarget
	SWCD D 10 Bright A_CustomMissile("LegCyberBFG9500Ball", 15)
	SWCD CB 15 A_FaceTarget
	TNT1 A 0 A_PlaySound("weapons/bfgf")
	SWCD B 15 A_FaceTarget
	SWCD C 10 Bright A_FaceTarget
	SWCD D 10 Bright A_CustomMissile("LegCyberBFG9500Ball", 15)
	SWCD CB 15 A_FaceTarget
	Goto See
  Missile3:
    TNT1 A 0 A_SetShootable
    TNT1 A 0 A_UnsetInvulnerable
    TNT1 A 0 A_SetTranslucent(1)
	TNT1 A 0 A_PlaySound("weapons/charge15k")
	SWCD B 18 A_FaceTarget
	SWCD C 10 Bright A_FaceTarget
	SWCD D 6 Bright A_CustomMissile("LegendaryCyberBFG15KBall", 15)
	SWCD C 6 Bright A_FaceTarget
	SWCD D 6 Bright A_CustomMissile("LegendaryCyberBFG15KBall", 15)
	SWCD C 6 Bright A_FaceTarget
	SWCD D 6 Bright A_CustomMissile("LegendaryCyberBFG15KBall", 15)
	SWCD C 5 Bright A_FaceTarget
	SWCD D 5 Bright A_CustomMissile("LegendaryCyberBFG15KBall", 15)
	SWCD C 5 Bright A_FaceTarget
	SWCD D 5 Bright A_CustomMissile("LegendaryCyberBFG15KBall", 15)
	SWCD C 5 Bright A_FaceTarget
	SWCD D 4 Bright A_CustomMissile("LegendaryCyberBFG15KBall", 15)
	SWCD C 4 Bright A_FaceTarget
	SWCD D 4 Bright A_CustomMissile("LegendaryCyberBFG15KBall", 15)
	SWCD C 4 Bright A_FaceTarget
	SWCD D 4 Bright A_CustomMissile("LegendaryCyberBFG15KBall", 15)
	SWCD C 4 Bright A_FaceTarget
	SWCD D 4 Bright A_CustomMissile("LegendaryCyberBFG15KBall", 15)
	SWCD C 4 Bright A_FaceTarget
	SWCD D 4 Bright A_CustomMissile("LegendaryCyberBFG15KBall", 15)
	SWCD C 4 Bright A_FaceTarget
	SWCD D 4 Bright A_CustomMissile("LegendaryCyberBFG15KBall", 15)
	SWCD C 3 Bright A_FaceTarget
	SWCD D 3 Bright A_CustomMissile("LegendaryCyberBFG15KBall", 15)
	SWCD C 3 Bright A_FaceTarget
	SWCD D 3 Bright A_CustomMissile("LegendaryCyberBFG15KBall", 15)
	SWCD C 3 Bright A_FaceTarget
	SWCD D 3 Bright A_CustomMissile("LegendaryCyberBFG15KBall", 15)
	SWCD C 2 Bright A_FaceTarget
	SWCD D 2 Bright A_CustomMissile("LegendaryCyberBFG15KBall", 15)
	SWCD C 2 Bright A_FaceTarget
	SWCD D 2 Bright A_CustomMissile("LegendaryCyberBFG15KBall", 15)
	SWCD C 2 Bright A_FaceTarget
	SWCD D 2 Bright A_CustomMissile("LegendaryCyberBFG15KBall", 15)
	SWCD C 2 Bright A_FaceTarget
	SWCD D 2 Bright A_CustomMissile("LegendaryCyberBFG15KBall", 15)
	SWCD C 1 Bright A_FaceTarget
	SWCD D 1 Bright A_CustomMissile("LegendaryCyberBFG15KBall", 15)
	SWCD C 1 Bright A_FaceTarget
	SWCD D 1 Bright A_CustomMissile("LegendaryCyberBFG15KBall", 15)
	SWCD C 1 Bright A_FaceTarget
	SWCD D 1 Bright A_CustomMissile("LegendaryCyberBFG15KBall", 15)	
	SWCD C 1 Bright A_FaceTarget
	SWCD D 1 Bright A_CustomMissile("LegendaryCyberBFG15KBall", 15)
	SWCD C 0 A_FaceTarget
	SWCD D 1 Bright A_CustomMissile("LegendaryCyberBFG15KBall", 15)
	SWCD C 0 A_FaceTarget
	SWCD D 1 Bright A_CustomMissile("LegendaryCyberBFG15KBall", 15)
	SWCD C 0 A_FaceTarget
	SWCD D 1 Bright A_CustomMissile("LegendaryCyberBFG15KBall", 15)
	SWCD C 0 A_FaceTarget
	SWCD D 1 Bright A_CustomMissile("LegendaryCyberBFG15KBall", 15)
	SWCD C 0 A_FaceTarget
	SWCD D 1 Bright A_CustomMissile("LegendaryCyberBFG15KBall", 15)
	SWCD C 0 A_FaceTarget
	SWCD D 1 Bright A_CustomMissile("LegendaryCyberBFG15KBall", 15)
	SWCD C 0 A_FaceTarget
	SWCD D 1 Bright A_CustomMissile("LegendaryCyberBFG15KBall", 15)
	SWCD C 0 A_FaceTarget
	SWCD D 1 Bright A_CustomMissile("LegendaryCyberBFG15KBall", 15)
	SWCD CB 20 A_PlaySound("weapons/bfg15kcooldown",CHAN_AUTO)
	Goto See
  Missile4:
    SWCD F 0 A_PlaySound ("Cardinal/9k")
	SWCD C 20 Bright A_FaceTarget
	SWCD C 15 Bright A_FaceTarget
	SWCD D 0 A_CustomMissile("LegAnniDTBFGBall", 15)
	SWCD C 20 A_FaceTarget
	SWCD D 0 A_PlaySound ("Cardinal/9k")
	SWCD C 20 A_FaceTarget
	SWCD D 15 Bright A_FaceTarget
	SWCD D 0 A_CustomMissile("LegAnniDTBFGBall", 15)
	SWCD C 30 Bright
	TNT1 A 0 A_Jump(60,"Missile5")
	TNT1 A 0 A_Jump(80,"Missile6")
	Goto See
  Missile5:
	TNT1 A 0 A_PlaySound("devastator/charge")
	SWCD CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC 2 Bright A_FaceTarget
	SWCD DDDDDDDD 2 Bright A_FaceTarget
	SWCD D 0 A_PlaySound ("devastator/fire")
	SWCD D 0 A_CustomMissile("LegCybDevastatorBall", 15)
	SWCD C 50 Bright
	TNT1 A 0 A_Jump(80,"Missile6")
	Goto See
  Missile6:
    SWCD E 5 Bright A_FaceTarget
    TNT1 A 0 A_CustomMissile("LegendaryRocket", 15)
    SWCD E 5 Bright A_FaceTarget
    TNT1 A 0 A_CustomMissile("LegendaryRocket", 15)
    SWCD E 5 Bright A_FaceTarget
    TNT1 A 0 A_CustomMissile("LegendaryRocket", 15)
	SWCD E 5 Bright A_FaceTarget
    TNT1 A 0 A_CustomMissile("LegendaryRocket", 15)
    SWCD E 5 Bright A_FaceTarget
    TNT1 A 0 A_CustomMissile("LegendaryRocket", 15)
    SWCD E 5 Bright A_FaceTarget
    TNT1 A 0 A_CustomMissile("LegendaryRocket", 15)
	SWCD E 5 Bright A_FaceTarget
    TNT1 A 0 A_CustomMissile("LegendaryRocket", 15)
    SWCD E 5 Bright A_FaceTarget
    TNT1 A 0 A_CustomMissile("LegendaryRocket", 15)
    SWCD E 5 Bright A_FaceTarget
    TNT1 A 0 A_CustomMissile("LegendaryRocket", 15)
	SWCD E 5 Bright A_FaceTarget
    TNT1 A 0 A_CustomMissile("LegendaryRocket", 15)
	SWCD E 12 Bright
	Goto See
  Melee:
    SWCD BC 5 A_FaceTarget
	SWCD D 5 A_MeleeAttack
	SWCD CB 5 A_FaceTarget
	Goto See
  Pain:
	SWCD E 3
	SWCD E 3 A_Pain
	SWCD F 6
	Goto See
  Death:
	SWCD G 8
	TNT1 A 0 A_SpawnItemEx("MutantGibbedGenerator",0,0,0,0,0,0,0,128,0)
	SWCD H 8 A_Scream
	SWCD I 8
	SWCD J 8
	SWCD K 8 A_NoBlocking
	SWCD LLLLKKKKKJJJJIIIIHHHH 8 Bright
	TNT1 A 0 A_SpawnItemEx("FakeSawCacoDemon",0,0,0,0,0,0,0,SXF_NOCHECKPOSITION,128)
	SWCD L -1 A_SetFloorClip
	Stop
	}
}

ACTOR SawCacodemonGhostA
{
Radius 2
Height 2
Speed 0
Alpha 0.85
Scale 1.0
PROJECTILE
RENDERSTYLE Translucent
+CLIENTSIDEONLY
States
{
Spawn:
    TNT1 A 0
    TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(304) == 1, "Toaster")
Fade:
    TNT1 A 1
	SWCD A 2 A_FadeOut(0.15)
	Goto Fade+1
Toaster:
    TNT1 A 0
    Stop
    }
}

ACTOR FakeSawCacoDemon : SawCacodemon
{
Health 800
Tag "\c[J6]F3ke \c[i7]SAW CacoDemon\c-"
States
{
  Death:
	SWCD G 8
	TNT1 A 0 A_SpawnItemEx("MutantGibbedGenerator",0,0,0,0,0,0,0,128,0)
	SWCD H 8 A_Scream
	SWCD IJ 8
	SWCD K 8 A_NoBlocking
	SWCD L -1 A_SetFloorClip
	Stop
	}
}