Actor CursedTerminator : Cyberdemon
{
//Creator:  Nemesiscaptain(uwu)and Makarov
//Origin: Infinity Gods
//Sprite: CRST
//Title: "CursedTerminator"
Monster
Health 26000
Speed 40
SeeSound "monster/dtermsit" 
PainSound "monster/dtermpin" 
DeathSound "monster/termdth"
ActiveSound "Terminator/dtermact"
DamageFactor 0.3
Scale 1.25
  DamageFactor "Ice", 0.2
  DamageFactor "InsanityHell", 0.0
  DamageFactor "Explosion", 0.0001
  DamageFactor "PlayerDTRG", 0.0001
  DamageFactor "DTRailgun", 0.0001
  DamageFactor "PDTPuff", 0.0001
  DamageFactor "RailG", 0.0001
  DamageFactor "PyroShot", 0.0001
  DamageFactor "PlayerPyro", 0.0001
  DamageFactor "PlayerBHole", 0.025
  DamageFactor "PlayerDBFG", 0.015
  DamageFactor "PlayerDBFG2", 0.015
  DamageFactor "PlayerNemesisPlasma", 0.265
  DamageFactor "Cursed", 0.2
  DamageFactor "Hackroid", 0.3
  DamageFactor "Legendary", 0.0
  DamageFactor "TrueLegendaryDamage", 0.265
  DamageFactor "TrueLegendaryPlayer", 0.265
BloodColor "Pink"
DamageFactor "Cursed", 0.0
DropItem "NemesisHealthBonusMax", 256, 32
DropItem "NemesisArmorBonus32", 256
DropItem "NemesisHealthBonusMax", 256, 32
DropItem "NemesisArmorBonus32", 256
DropItem "NemesisOmegaSphere", 256, 1
DropItem "LegAmmoSphere", 110, 3
DropItem "EnragedLegendaryPowerShard", 256, 1
DropItem "CRDemonAmmoBox", 200 
DropItem "CRDemonAmmo", 250 
DropItem "AgilityRune", 200, 1
DropItem "LegendaryRune2" 200 1
DropItem "Cursed Rifle", 128, 1
DropItem "SuperCrate" 256 1
DropItem "NemesisShell", 256
DropItem "NemesisShellBox", 130
DropItem "CursedRifle", 128
DropItem "Nemesis Plasmatic Cannon", 200
DropItem "Nemesis Assault Shotgun", 200
DropItem "Nemesis Sawed-Off Shotgun", 200
DropItem "Nemesis BFG", 256
DropItem "Nemesis Rifle", 200
DropItem "Cursed Demon Tech Devastator", 128
DropItem "CursedBFG10K", 128
Tag "\c[p7]Cursed Terminator\c-"
var int user_music;
var int user_missile;
var int user_script;     
 States 
  { 
  Spawn:
    TNT1 AA 0 A_SpawnItem("CursedHellionSmokeSpawner",0,0,0,0)
    CRST AB 2 Bright A_Look
    TNT1 AA 0 A_SpawnItem("CursedHellionSmokeSpawner",0,0,0,0)
    Loop 
  See:
	TNT1 A 0 A_JumpIf(user_music == 1,3)
	TNT1 A 0 ACS_NamedExecuteAlways("InfinityMusic",0,6748,960)
	TNT1 A 0 A_SetUserVar("user_music",1)
	TNT1 A 0 A_ChangeFlag(NOPAIN,0)
	TNT1 A 0 A_Jump(100,"Rush")
	CRST AA 3 Bright A_Chase
	TNT1 AAA 0 A_SpawnItem("CursedHellionSmokeSpawner",0,0,0,0)
	CRST BB 3 Bright A_Chase
	TNT1 AAA 0 A_SpawnItem("CursedHellionSmokeSpawner",0,0,0,0)
	CRST AA 3 Bright A_Chase
	TNT1 AAA 0 A_SpawnItem("CursedHellionSmokeSpawner",0,0,0,0)
	CRST BB 3 Bright A_Chase
	TNT1 AAA 0 A_SpawnItem("CursedHellionSmokeSpawner",0,0,0,0)
	TNT1 A 0 A_Jump(32,"Teleport")
	Goto See
  Rush:
	CRST A 2 Bright A_SpawnItemEx("CursedTerminatorGhost",0,0,0,0,0,0,0,SXF_CLIENTSIDE|SXF_NOCHECKPOSITION)
	CRST AAAA 0 Bright A_Chase
	CRST A 2 Bright A_SpawnItemEx("CursedTerminatorGhost",0,0,0,0,0,0,0,SXF_CLIENTSIDE|SXF_NOCHECKPOSITION)
	CRST AAAA 0 Bright A_Chase  
	CRST B 2 Bright A_SpawnItemEx("CursedTerminatorGhost",0,0,0,0,0,0,0,SXF_CLIENTSIDE|SXF_NOCHECKPOSITION)
	CRST AAAA 0 Bright A_Chase	
	CRST B 2 Bright A_SpawnItemEx("CursedTerminatorGhost",0,0,0,0,0,0,0,SXF_CLIENTSIDE|SXF_NOCHECKPOSITION)
	CRST AAAA 0 Bright A_Chase	
	TNT1 AAA 0 Bright A_SpawnItem("CursedHellionSmokeSpawner",0,0,0,0)	
	CRST A 2 Bright A_SpawnItemEx("CursedTerminatorGhost",0,0,0,0,0,0,0,SXF_CLIENTSIDE|SXF_NOCHECKPOSITION)
	CRST AAAA 0 Bright A_Chase
	CRST A 2 Bright A_SpawnItemEx("CursedTerminatorGhost",0,0,0,0,0,0,0,SXF_CLIENTSIDE|SXF_NOCHECKPOSITION)
	CRST AAAA 0 Bright A_Chase  	
	CRST B 2 Bright A_SpawnItemEx("CursedTerminatorGhost",0,0,0,0,0,0,0,SXF_CLIENTSIDE|SXF_NOCHECKPOSITION)
	CRST AAAA 0 Bright A_Chase
	CRST B 2 Bright A_SpawnItemEx("CursedTerminatorGhost",0,0,0,0,0,0,0,SXF_CLIENTSIDE|SXF_NOCHECKPOSITION)
	CRST AAAA 0 Bright A_Chase	
	TNT1 AAA 0 Bright A_SpawnItem("CursedHellionSmokeSpawner",0,0,0,0)	
	TNT1 A 0 A_Jump(24,"Teleport")
	TNT1 A 0 A_Jump(75,"See")
	Loop
  Teleport:
    CRST E 1 Bright A_UnSetShootable
	CRST EEEE 0 A_SpawnItem("CursedHellionSmokeSpawner",0,0,0,0)
	CRST EEEEEEEEEE 1  A_FadeOut(0.1,0)
	CRST EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE 0 A_Wander
	CRST EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE 0 A_Wander
    CRST E 1 A_PlayWeaponSound("boss/teleport")
	CRST EEEE 0 A_SpawnItem("CursedHellionSmokeSpawner",0,0,0,0)
	CRST EEEEEEEEEEE 1 A_FadeIn(0.1)
    CRST E 1 Bright A_SetShootable
    Goto See		
  Missile:
    TNT1 A 0 A_SetShootable
    TNT1 A 0 A_UnsetInvulnerable
    TNT1 A 0 A_SetTranslucent(1)
    TNT1 A 0 A_JumpifCloser(350,"CursedSSG")
    TNT1 A 0 A_Jump(128,"Railgun","Rockets","Seekers","BFG9K","BFG10K","CursedStarSpam")
  Normal:
    CRST EEE 5 Bright A_FaceTarget
    CRST E 2 Bright A_FaceTarget
	TNT1 A 0 A_CustomMissile("CursedRifleShotEnemy",40,26,random(-4,4),0)
	TNT1 A 0 A_CustomMissile("CursedRifleShotEnemy",40,26,random(-4,4),0)
	CRST F 2 Bright A_PlaySoundEx("NemesisRifle/Fire","Weapon")
	CRST E 2 Bright A_FaceTarget
	TNT1 A 0 A_CustomMissile("CursedRifleShotEnemy",40,-26,random(-4,4),0)
	TNT1 A 0 A_CustomMissile("CursedRifleShotEnemy",40,-26,random(-4,4),0)
	CRST F 2 Bright A_PlaySoundEx("NemesisRifle/Fire","Weapon")
    TNT1 A 0 A_Jump(10,"See")
    TNT1 A 0 A_SpidRefire
	Goto See
  CursedSSG:
    CRST E 5 Bright A_FaceTarget
	TNT1 A 0 A_SpawnItemEx("NemesisShellCasing", 0, 32, 36, Random(2, 6), 0, Random(1, 3), Random(-80, -90), 128)
	TNT1 AAAAAAAA 0 A_CustomMissile("CursedASGBall",32,26,frandom(-10,10),CMF_OFFSETPITCH,frandom(-6,6))
	CRST F 2 Bright A_PlaySoundEx("NemesisASG/Fire","Weapon")
	CRST E 5 Bright A_FaceTarget
	TNT1 A 0 A_SpawnItemEx("NemesisShellCasing", 0, 32, 36, Random(2, 6), 0, Random(1, 3), Random(-80, -90), 128)
	TNT1 AAAAAAAA 0 A_CustomMissile("CursedASGBall",32,26,frandom(-10,10),CMF_OFFSETPITCH,frandom(-6,6))
	CRST F 2 Bright A_PlaySoundEx("NemesisASG/Fire","Weapon")
	CRST E 5 Bright A_FaceTarget
	TNT1 A 0 A_SpawnItemEx("NemesisShellCasing", 0, 32, 36, Random(2, 6), 0, Random(1, 3), Random(-80, -90), 128)
	TNT1 AAAAAAAA 0 A_CustomMissile("CursedASGBall",32,26,frandom(-10,10),CMF_OFFSETPITCH,frandom(-6,6))
	CRST F 2 Bright A_PlaySoundEx("NemesisASG/Fire","Weapon")
	CRST E 5 Bright A_FaceTarget
	TNT1 A 0 A_SpawnItemEx("NemesisShellCasing", 0, 32, 36, Random(2, 6), 0, Random(1, 3), Random(-80, -90), 128)
	TNT1 AAAAAAAA 0 A_CustomMissile("CursedASGBall",32,26,frandom(-10,10),CMF_OFFSETPITCH,frandom(-6,6))
	CRST F 2 Bright A_PlaySoundEx("NemesisASG/Fire","Weapon")
    TNT1 A 0 A_SpidRefire
	Goto See
  CursedStarSpam:
	TNT1 A 0 A_PlaySoundEx("monster/dtermsit","TSIGHT")
	TNT1 A 0 A_SetInvulnerable
	CRST E 0 A_FaceTarget
	CRST EEEE 2 Bright A_SpawnItemEx("TerminatorLineSpawner")
	CRST E 0 A_FaceTarget
	CRST EEEE 2 Bright A_SpawnItemEx("TerminatorLineSpawner")
	TNT1 A 0 A_PlayWeaponSound("star/load1")
	CRST E 0 A_FaceTarget
	CRST EEEE 2 Bright A_SpawnItemEx("TerminatorLineSpawner")
	CRST E 0 A_FaceTarget
	CRST EEEE 2 Bright A_SpawnItemEx("TerminatorLineSpawner")
	TNT1 A 0 A_PlayWeaponSound("star/load2")
	CRST E 0 A_FaceTarget
	CRST EEEE 2 Bright A_SpawnItemEx("TerminatorLineSpawner")
	CRST E 0 A_FaceTarget
	CRST EEEE 2 Bright A_SpawnItemEx("TerminatorLineSpawner") 
	CRST E 0 A_FaceTarget
	CRST EEEE 2 Bright A_SpawnItemEx("TerminatorLineSpawner")
	CRST E 0 A_FaceTarget
	TNT1 A 0 A_PlayWeaponSound("star/load3")
	CRST EEEE 2 Bright A_SpawnItemEx("TerminatorLineSpawner")
	CRST E 0 A_FaceTarget
	CRST EEEE 2 Bright A_SpawnItemEx("TerminatorLineSpawner")  	
	TNT1 A 0 A_UnSetInvulnerable
	CRST E 0 A_FaceTarget
	CRST F 0 A_PlayWeaponSound("star/fire")
	CRST F 4 Bright A_CustomMissile("CursedTerminatorStar",48,17,random(-10,10)) 
	CRST E 6 A_FaceTarget
	CRST F 0 A_PlayWeaponSound("star/fire")
	CRST F 4 Bright A_CustomMissile("CursedTerminatorStar",48,17,random(-10,10)) 
	CRST E 6 A_FaceTarget
	CRST F 0 A_PlayWeaponSound("star/fire")
	CRST F 4 Bright A_CustomMissile("CursedTerminatorStar",48,17,random(-10,10)) 
	CRST E 6 A_FaceTarget
	CRST F 0 A_PlayWeaponSound("star/fire")
	CRST F 4 Bright A_CustomMissile("CursedTerminatorStar",48,17,random(-10,10)) 
	CRST E 6 A_FaceTarget
	CRST F 0 A_PlayWeaponSound("star/fire")
	CRST F 4 Bright A_CustomMissile("CursedTerminatorStar",48,17,random(-10,10)) 
	CRST E 6 A_FaceTarget
	CRST F 0 A_PlayWeaponSound("star/fire")
	CRST F 4 Bright A_CustomMissile("CursedTerminatorStar",48,17,random(-10,10)) 
	CRST E 6 A_FaceTarget
	CRST F 0 A_PlayWeaponSound("star/fire")
	CRST F 4 Bright A_CustomMissile("CursedTerminatorStar",48,17,random(-10,10)) 
	CRST E 6 A_FaceTarget
	CRST F 0 A_PlayWeaponSound("star/fire")
	CRST F 4 Bright A_CustomMissile("CursedTerminatorStar",48,17,random(-10,10)) 
	CRST E 6 A_FaceTarget
	Goto See
  Rockets:
    CRST E 4 Bright A_FaceTarget
    CRST F 3 Bright A_CustomMissile("CursedRevRocket",40,26,0,0)
	CRST E 4 Bright A_FaceTarget
    CRST F 3 Bright A_CustomMissile("CursedRevRocket",40,26,0,0)
	CRST E 4 Bright A_FaceTarget
    CRST F 3 Bright A_CustomMissile("CursedRevRocket",40,26,0,0)
	CRST E 4 Bright A_FaceTarget
    CRST F 3 Bright A_CustomMissile("CursedRevRocket",40,26,0,0)
	CRST E 4 Bright A_FaceTarget
    CRST F 3 Bright A_CustomMissile("CursedRevRocket",40,26,0,0)
	CRST E 3 Bright A_FaceTarget
    CRST F 3 Bright A_CustomMissile("CursedRevRocket",40,26,0,0)
	CRST E 3 Bright A_FaceTarget
    CRST F 3 Bright A_CustomMissile("CursedRevRocket",40,26,0,0)
	CRST E 3 Bright A_FaceTarget
    CRST F 2 Bright A_CustomMissile("CursedRevRocket",40,26,0,0)
	CRST E 3 Bright A_FaceTarget
    CRST F 2 Bright A_CustomMissile("CursedRevRocket",40,26,0,0)
	CRST E 3 Bright A_FaceTarget
    CRST F 2 Bright A_CustomMissile("CursedRevRocket",40,26,0,0)
	TNT1 A 0 A_Jump(87,"Seekers","BFG10K","Railgun")
    Goto See
  Seekers:
    VTRM E 0 A_PlaySound ("devastator/fire")
	CRST F 3 Bright A_CustomMissile("CursedFuckerBall",32,0,random(0,359))	
    CRST E 3 Bright A_FaceTarget
    CRST F 3 Bright A_CustomMissile("CursedHomingRocket",40,26,0,0)
	CRST E 3 Bright A_FaceTarget
    CRST F 3 Bright A_CustomMissile("CursedHomingRocket",40,26,0,0)
    CRST E 3 Bright A_FaceTarget
    CRST F 3 Bright A_CustomMissile("CursedHomingRocket",40,26,0,0)
	CRST E 3 Bright A_FaceTarget
    CRST F 3 Bright A_CustomMissile("CursedHomingRocket",40,26,0,0)
    CRST E 3 Bright A_FaceTarget
    CRST F 3 Bright A_CustomMissile("CursedHomingRocket",40,26,0,0)
	CRST E 3 Bright A_FaceTarget
    CRST F 3 Bright A_CustomMissile("CursedHomingRocket",40,26,0,0)
	TNT1 A 0 A_Jump(87,"BFG10K","Railgun")
    Goto See
  Railgun:
	TNT1 A 0 A_PlaySound("weapons/rgcharge")
	TNT1 A 0 A_Changeflag(reflective,1)
	TNT1 A 0 A_SetUserVar("user_missile", 0)
	CRST EE 10 A_FaceTarget
  RailgunLoop:
	TNT1 A 0 A_JumpIf(user_missile > 40,"RailgunEnd")
	TNT1 A 0 A_SetUserVar("user_missile",user_missile+1)
	CRST E 2 Bright A_FaceTarget
	TNT1 A 0 A_PlaySound("monsters/darkcyberrail",CHAN_WEAPON)
	CRST F 1 Bright A_CustomMissile("CursedRevRailgunProj",58,26,random(-2,3))
	Loop
  RailgunEnd:
	CRST E 15 Bright
	TNT1 A 0 A_Changeflag(reflective,0)
	Goto See
  BFG9K:
	TNT1 A 0 A_PlaySound("weapons/bfgf")
	CRST EEEEEEEEEEEEFFFF 2 A_FaceTarget
	CRST F 1 Bright A_CustomMissile("CursedCyberNobleBFG9500Ball",48,15,random(-4,4))
	CRST F 1 Bright A_CustomMissile("CursedCyberNobleBFG9500Ball",48,15,random(-4,4))
	CRST F 1 Bright A_CustomMissile("CursedCyberNobleBFG9500Ball",48,15,random(-4,4))
	CRST F 1 Bright A_CustomMissile("CursedCyberNobleBFG9500Ball",48,15,random(-4,4))
	CRST F 1 Bright A_CustomMissile("CursedCyberNobleBFG9500Ball",48,15,random(-4,4))
	CRST F 1 Bright A_CustomMissile("CursedCyberNobleBFG9500Ball",48,15,random(-4,4))
	CRST F 1 Bright A_CustomMissile("CursedCyberNobleBFG9500Ball",48,15,random(-4,4))
	CRST F 1 Bright A_CustomMissile("CursedCyberNobleBFG9500Ball",48,15,random(-4,4))
	CRST F 1 Bright A_CustomMissile("CursedCyberNobleBFG9500Ball",48,15,random(-4,4))
	CRST F 1 Bright A_CustomMissile("CursedCyberNobleBFG9500Ball",48,15,random(-4,4))
	CRST F 1 Bright A_CustomMissile("CursedCyberNobleBFG9500Ball",48,15,random(-4,4))
	CRST F 1 Bright A_CustomMissile("CursedCyberNobleBFG9500Ball",48,15,random(-4,4))
	CRST EE 4 A_FaceTarget   
	TNT1 A 0 A_Jump(128,"BFG10K","DTBFG","RedStar","DTDevastator")
	Goto See
  BFG10K:
	TNT1 A 0 A_Changeflag(reflective,1)
	TNT1 A 0 A_PlaySound("weapons/charge15k")
	TNT1 A 0 A_SetUserVar("user_missile", 0)
	CRST EEEEEEE 4 A_FaceTarget
  BFG10KLoop:
	TNT1 A 0 A_JumpIf(user_missile > 40,"BFG10KEnd")
	TNT1 A 0 A_SetUserVar("user_missile",user_missile+1)
	CRST E 2 A_FaceTarget
	TNT1 A 0 A_PlaySound("weapons/bfg15kfire")
	TNT1 A 0 A_CustomMissile("Cursed10kProjectile",48,-15,random(-4,4))
	CRST F 1 Bright A_CustomMissile("Cursed10kProjectile",48,-15,random(-4,4))
	Loop
  BFG10KEnd:
	CRST E 3 Bright A_PlaySound("weapons/bfg15kcooldown",CHAN_AUTO)
	CRST EEEE 3 A_FaceTarget	
	CRST E 4 A_FaceTarget
	TNT1 A 0 A_Changeflag(reflective,0)
	Goto See	
  Pain:
	CRST L 3 A_Pain
	Goto See
  PainMissile: 
	CRST L 3 A_Pain
	Goto Missile
  Death:
    TNT1 A 0
	CRST Q 10 A_Scream
	CRST RRRSSS 2 Bright A_SpawnItemEx("CursedPainfulDeathKaboom",random(-32,32),random(-40,40),random(16,48),random(-4,4),random(-4,4),random(0,4),0,SXF_TRANSFERPOINTERS)
	TNT1 A 0 A_SpawnItem("CursedDeathBall")
	CRST TTTUUU 2 Bright A_SpawnItemEx("CursedPainfulDeathKaboom",random(-32,32),random(-40,40),random(16,48),random(-4,4),random(-4,4),random(0,4),0,SXF_TRANSFERPOINTERS)
	TNT1 AA 0 A_SpawnItemEx("NemesisGibbedGenerator",0,0,0,0,0,0,0,128,0)	
	TNT1 A 0 A_SpawnItem("CursedDeathBall")
	CRST VVVWWW 2 Bright A_CustomMissile("CursedPainfulDeathKaboom", Random(10,50), 0, random(0,360), 2, random(0,360))
	TNT1 AA 0 A_SpawnItemEx("NemesisGibbedGenerator",0,0,0,0,0,0,0,128,0)
	TNT1 A 0 A_PlaySound("DMBall/Impact",0,1.0,0,ATTN_NONE)
	TNT1 A 0 A_SpawnItemEx("BlackDeathSequence")
    TNT1 AAAA 0 A_CustomMissile("LegendarySmokeFX", Random(30,60), 0, random(0,360), 2, random(0,360))
	CRST "X" 6 A_Fall
	CRST "Y" 6
	CRST "Z" 1 A_Playsound("Terminator/terstepA",CHAN_BODY)
	CRST "Z" 5 A_Bossdeath
	TNT1 A 0 A_KillMaster
	CRST "Z" -1
	Stop
	}
}

Actor INFCursedTerminator : CursedTerminator
{
Tag "\c[p7]Cursed Terminator\c-"
States
{
  Spawn:
    TNT1 A 0
    TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("SimpleProgSys") == 0,2)
	TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("RuneTier3SpawnCheck") == 2,1)
	Goto Remove
  Idle:
	TNT1 AA 0 A_SpawnItem("CursedHellionSmokeSpawner",0,0,0,0)
    CRST AB 2 Bright A_Look
    TNT1 AA 0 A_SpawnItem("CursedHellionSmokeSpawner",0,0,0,0)
	Loop
  Remove:
	TNT1 A 1
	TNT1 A 0 A_SpawnItemEx("Cyberdemon",0,0,0,0,0,0,0,SXF_NOCHECKPOSITION)
	TNT1 A 0 A_ChangeFlag("COUNTKILL", FALSE)
	TNT1 A 0
	Stop
	}
}

ACTOR CursedTerminatorGhost
{
Scale 1.4
RENDERSTYLE Translucent
Alpha 0.75
+NOGRAVITY
+CLIENTSIDEONLY
+DONTSPLASH
+NOINTERACTION
+NOCLIP
+NOTIMEFREEZE
States
{
Spawn:
    TNT1 A 0
    TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(304) == 1,"NULL")
    CRST A 2 A_FadeOut(0.09)
    Wait	
    }
}

Actor CursedTerminatorStar : LegTerminatorStar
{
    Obituary "%o was split..."
    States
    {
    Spawn:
	    TNT1 A 0 A_SeekerMissile(15,15)
        6RB1 ABCD 2 Bright A_CustomMissile("CursedStarFX",0,0,0,0)
		TNT1 A 0 A_SeekerMissile(15,15)
        Loop
    Death:
	    TNT1 A 0 A_Explode(192,384,0)
	    TNT1 A 0 Radius_Quake(15,20,0,20,0)
	    TNT1 A 0 A_SpawnItemEx("CursedDeathBallSmall")
	    TNT1 A 0 A_SpawnItemEx("CursedBFGShockwave",0,0,15,0,0,0,0,128)
        TNT1 A 20 A_SpawnItem("CursedDTBFGEx",0,-10)
		6RB1 E 3 Bright
        6RB1 FGHIJKLMNO 3 Bright
        Stop
    }
}