ACTOR CorruptedSoul : LegendarySoul2
{
//Creator: Eshkere_Jason
//Origin: Divine Infinity
//Sprite: C0RZ
//Title: "Corrupted Soul" 
//Info: bro its true legendary soul but blue chaos soul sprite :sob:
Health 1150
Radius 20
Height 56
Speed 35
Mass 100
PainChance 10
PainChance "ZombieDemonTech", 0
BloodColor "Blue"
DropItem "HandGrenadeAmmo" 256 2
DropItem "MineAmmo" 256 2
DropItem "Backpack" 256 1
DropItem "Armorplate" 256 1
DropItem "Portablemedkit" 256 1
Dropitem "D-BFG", 100, 1
Dropitem "MarineSquadBeacon", 80, 1
Dropitem "MarineDBFGBeacon", 55, 1
Dropitem "DCellPack", 256, 32
Dropitem "DCellPack", 128, 30
Dropitem "DCell", 256, 10
Dropitem "DCell", 256, 10
Dropitem "DCell", 256, 10
DamageFactor 0.5
DamageFactor "Explosion", 0.2
DamageFactor "PlayerDTRG", 0.4
DamageFactor "DTRailgun", 0.4
DamageFactor "Player",0.1
DamageFactor "LegendaryPlayer",0.5
DamageFactor "Legendary",0.1
DamageFactor "CChainTracer",0.0
DamageFactor "DBFG2",0.0
DamageFactor "SuperWeapon", 0.75
DamageFactor "LegendaryPlayer", 0.75
DamageFactor "LegendaryGuru", 0.75
DamageFactor "LegendaryGuruPlayer", 0.75
DamageFactor "PlayerDevBall", 0.65
DamageFactor "PlayerDevTracer", 0.15
DamageFactor "PowerDoubleDamage", 0.35
DamageFactor "BFG10K", 0.65
DamageFactor "BFG9500Ball", 0.1
DamageFactor "CustomSpray", 0.1
DamageFactor "BFGSplash", 0.1
DamageFactor "BFGSpray", 0.1
DamageFactor "Explosion", 0.1
DamageFactor "PDTBFG", 0.1
DamageFactor "PDTBFGTracer", 0.1
DamageFactor "PlayerDTBFGRailgunSlug", 0.1
DamageFactor "PDTPuff", 0.1
MONSTER
SeeSound "ChaosSoul/sight"
PainSound "ChaosSoul/pain"
DeathSound "ChaosSoul/death"
ActiveSound "ChaosSoul/active"
Obituary "%o was vaporized by an \c[l5]Corrupted Soul\c- overheated plasma."
Tag "\c[l5]Corrupted Soul\c-"
+NOTIMEFREEZE
+NOFEAR
+BOSS
+BOSSDEATH
+FLOORCLIP
+MISSILEMORE
+MISSILEEVENMORE
+QUICKTORETALIATE
+NOICEDEATH
+NODROPOFF
+DONTGIB
+NOTARGET
+BRIGHT
var int user_music;
var int user_protection;
var int user_protected;
var int user_missile;
States
{
  Spawn:
    TNT1 A 0 A_SpawnItem("BHellionSmokeSpawner")
	TNT1 A 0 A_SpawnItem("CBoysFireSpawner")
    C0RS A 2 A_Look
	TNT1 A 0 A_SpawnItem("CBoysFireSpawner")
    C0RS B 2 A_Look
	TNT1 A 0 A_SpawnItem("CBoysFireSpawner")
    C0RS A 2 A_Look
	TNT1 A 0 A_SpawnItem("CBoysFireSpawner")
    C0RS A 2 A_Look
    Loop
  See:
    TNT1 A 0 A_JumpIf(user_music == 1,3)
	TNT1 A 0 ACS_NamedExecuteAlways("InfinityMusic",0,928,150)
	TNT1 A 0 A_SetUserVar("user_music",1)
	TNT1 A 0 A_ChangeFlag(NOPAIN,0)
	TNT1 A 0 A_SpawnItem("BHellionSmokeSpawner")
	C0RS A 0 A_UnSetInvulnerable
    C0RS A 2 A_Chase
	TNT1 A 0 A_SpawnItem("CBoysFireSpawner")
	C0RS B 2 A_Chase
	TNT1 A 0 A_SpawnItem("CBoysFireSpawner")
	C0RS A 2 A_Chase
	TNT1 A 0 A_SpawnItem("CBoysFireSpawner")
	TNT1 A 0 A_Jump(64,"Avoid","Rush","Teleport")
    Loop
  Rush:
    TNT1 A 0
	C0RS AA 0 A_Chase
    C0RS A 1 Bright A_SpawnItemEx("TrueLegendarySoulGhost")
	C0RS AA 0 A_Chase
    C0RS B 1 Bright A_SpawnItemEx("TrueLegendarySoulGhost")
	TNT1 A 0 A_Jump(12,"See")
    Loop
  Avoid:
	C0RS C 0
	C0RS C 0 A_SetAngle(angle+random(0,359))
	C0RS C 0 A_Recoil(-50)
	C0RS C 0 A_FaceTarget
	C0RS CDCDCDCDCDCDC 1 Bright A_SpawnItemEx("TrueLegendarySoulGhost2")
	TNT1 A 0 A_Jump(128,"See")
	C0RS D 1 Bright A_Stop
    Goto Avoid
  Teleport:
    C0RS A 1 Bright A_UnSetShootable
	C0RS AAAAAAAAAAA 1 A_FadeOut(0.1,0)
	C0RS AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 0 A_Wander
    C0RS A 1 A_PlayWeaponSound("boss/teleport")
	C0RS AAAAAAAAAAA 1 A_FadeIn(0.1)
    C0RS A 1 Bright A_SetShootable
    Goto See
  Missile:
    TNT1 A 0 A_SetTranslucent(1)
    TNT1 A 0 A_Jump(32,"Super")
	TNT1 A 0 A_Jump(44,"Rage")
	TNT1 A 0 A_Jump(128,"HellStaff","FastBall","BFG15K","Laser")
  Normal:
	C0RS C 10 A_FaceTarget
	TNT1 A 0 A_SpawnItem("BHellionSmokeSpawner")
	TNT1 A 0 A_SpawnItem("CBoysFireSpawner")
	C0RS D 2 A_SkullAttack(50)
	TNT1 A 0 A_SpawnItem("BHellionSmokeSpawner")
	TNT1 A 0 A_SpawnItem("CBoysFireSpawner")
	C0RS C 2 A_CposRefire
	TNT1 A 0 A_SpawnItem("BHellionSmokeSpawner")
	TNT1 A 0 A_SpawnItem("CBoysFireSpawner")
	C0RS D 2 A_CposRefire
	TNT1 A 0 A_SpawnItem("BHellionSmokeSpawner")
	TNT1 A 0 A_SpawnItem("CBoysFireSpawner")
	TNT1 A 0 A_JumpIf(velx != 0 || vely != 0,2)
	TNT1 A 0 A_Jump(188,"See")
	TNT1 A 0 A_Jump(16,"See")
	C0RS C 2 Bright A_CposRefire
	Goto Normal+1
  Rage:
    TNT1 A 0 A_JumpIfHealthLower(300,"TrueKamikaze")
    C0RS C 1 Bright A_JumpIfCloser(1500,1)
    Goto Normal
    C0RS D 1 Bright A_PlaySound("legsoul/see")
	C0RS D 0 A_SetInvulnerable
	C0RS C 1 Bright A_FaceTarget
  RageWait:
    TNT1 A 0 A_JumpIf(user_ragewait >= 28,"RageGo")
	TNT1 A 0 A_SetUserVar("user_ragewait",user_ragewait+1)
    C0RS C 0 A_JumpIfTargetInLos(2)
	C0RS C 0 A_Jump(256,2)
	C0RS C 0 A_FaceTarget
	C0RS C 2 Bright A_SpawnItem("LFiendFlameSpawner",0,0,0,0)
	Loop
  RageGo:
    TNT1 A 0 A_SetUserVar("user_ragewait",0) 
	TNT1 A 0 A_UnSetInvulnerable
	TNT1 A 0 A_ChangeFlag(NOPAIN,1)
	TNT1 A 0 A_CustomMissile("LegSoulCharge",18,0,0,CMF_AIMDIRECTION)
	TNT1 A 0 A_SpawnItemEx("TrueLegendarySoulGhost2")
	TNT1 A 0 A_SpawnItem("CBoysFireSpawner")
	TNT1 A 0 A_SpawnItem("LFiendFlameSpawner",0,0,0,0)
	C0RS C 2 Bright A_SkullAttack(75)
	TNT1 A 0 A_CustomMissile("LegSoulCharge",18,0,0,CMF_AIMDIRECTION)
	TNT1 A 0 A_SpawnItemEx("TrueLegendarySoulGhost2")
	TNT1 A 0 A_SpawnItem("CBoysFireSpawner")
	TNT1 A 0 A_SpawnItem("LFiendFlameSpawner",0,0,0,0)
	C0RS D 2 Bright A_CposRefire
	TNT1 A 0 A_CustomMissile("LegSoulCharge",18,0,0,CMF_AIMDIRECTION)
	TNT1 A 0 A_SpawnItemEx("TrueLegendarySoulGhost2")
	TNT1 A 0 A_SpawnItem("CBoysFireSpawner")
	TNT1 A 0 A_SpawnItem("LFiendFlameSpawner",0,0,0,0)
	C0RS C 2 Bright A_CposRefire
	TNT1 A 0 A_CustomMissile("LegSoulCharge",18,0,0,CMF_AIMDIRECTION)
	TNT1 A 0 A_SpawnItemEx("TrueLegendarySoulGhost2")
	TNT1 A 0 A_SpawnItem("CBoysFireSpawner")
	TNT1 A 0 A_SpawnItem("LFiendFlameSpawner",0,0,0,0)
	C0RS D 2 Bright A_CposRefire
	Goto RageGo+3
  HellStaff:
   	C0RS CDC 3 Bright A_FaceTarget
	C0RS D 0 A_FaceTarget
	C0RS D 3 A_CustomMissile("LegNecroHellStaffBall",20,0,random(-3,3))
	C0RS C 2 A_FaceTarget
	C0RS C 3 A_CustomMissile("LegNecroHellStaffBall",20,0,random(-3,3))
	C0RS D 2 A_FaceTarget
	C0RS D 3 A_CustomMissile("LegNecroHellStaffBall",20,0,random(-3,3))
	C0RS C 2 A_FaceTarget
	C0RS C 3 A_CustomMissile("LegNecroHellStaffBall",20,0,random(-3,3))
	C0RS D 2 A_FaceTarget
	C0RS D 3 A_CustomMissile("LegNecroHellStaffBall",20,0,random(-3,3))
	C0RS C 2 A_FaceTarget
	C0RS C 3 A_CustomMissile("LegNecroHellStaffBall",20,0,random(-3,3))
	Goto See
  FastBall:
	TNT1 A 0 A_SpawnItemEx("CBoysFireSpawner")
    C0RS A 2 Bright A_FaceTarget
	TNT1 A 0 A_SpawnItemEx("CBoysFireSpawner")
    C0RS B 2 Bright A_FaceTarget
	TNT1 A 0 A_SpawnItemEx("CBoysFireSpawner")
    C0RS A 2 Bright A_FaceTarget
	TNT1 A 0 A_SpawnItemEx("CBoysFireSpawner")
    C0RS B 2 Bright A_FaceTarget
	TNT1 A 0 A_SpawnItemEx("CBoysFireSpawner")
    C0RS C 2 Bright A_FaceTarget
	TNT1 A 0 A_SpawnItemEx("CBoysFireSpawner")
	C0RS D 2 Bright A_CustomMissile("TrueLegRedFastBall",10,0,0)
	TNT1 A 0 A_SpawnItemEx("CBoysFireSpawner")
    C0RS C 2 Bright A_FaceTarget
	TNT1 A 0 A_SpawnItemEx("CBoysFireSpawner")
    C0RS A 2 Bright A_FaceTarget
	TNT1 A 0 A_SpawnItemEx("CBoysFireSpawner")
    C0RS B 2 Bright A_FaceTarget
    TNT1 A 0 A_Jump(32,"Super")
	Goto See
  BFG15K:
	C0RS C 0 A_PlaySound("legsoul/see")
	TNT1 A 0 A_SpawnItemEx("CBoysFireSpawner")
    C0RS A 2 Bright A_FaceTarget
	TNT1 A 0 A_SpawnItemEx("CBoysFireSpawner")
    C0RS B 2 Bright A_FaceTarget
	TNT1 A 0 A_SpawnItemEx("CBoysFireSpawner")
    C0RS A 2 Bright A_FaceTarget
	TNT1 A 0 A_SpawnItemEx("CBoysFireSpawner")
    C0RS B 2 Bright A_FaceTarget
	TNT1 A 0 A_SpawnItemEx("CBoysFireSpawner")
    C0RS A 2 Bright A_FaceTarget
	TNT1 A 0 A_SpawnItemEx("CBoysFireSpawner")
    C0RS B 2 Bright A_FaceTarget
	TNT1 A 0 A_SpawnItemEx("CBoysFireSpawner")
    C0RS A 2 Bright A_FaceTarget
	TNT1 A 0 A_SpawnItemEx("CBoysFireSpawner")
    C0RS C 2 Bright A_FaceTarget
	C0RS C 4 A_CustomMissile("TLegendaryCyberBFG15KBall",20,0,random(-4,4))
	C0RS D 8 A_FaceTarget
	C0RS C 4 A_CustomMissile("TLegendaryCyberBFG15KBall",20,0,random(-4,4))
	C0RS D 8 A_FaceTarget
	C0RS C 4 A_CustomMissile("TLegendaryCyberBFG15KBall",20,0,random(-4,4))
	C0RS D 8 A_FaceTarget
	C0RS C 4 A_CustomMissile("TLegendaryCyberBFG15KBall",20,0,random(-4,4))
	TNT1 A 0 A_Jump(32,"Laser","Super")
    Goto See
   Laser:
	C0RS BC 5 A_FaceTarget
	C0RS D 3 A_CustomMissile("LegSoulRedLaser",10)
	TNT1 A 0 A_FaceTarget
	C0RS C 3 A_CustomMissile("LegSoulRedLaser",10)
	TNT1 A 0 A_FaceTarget
	C0RS D 3 A_CustomMissile("LegSoulRedLaser",10)
	TNT1 A 0 A_FaceTarget
	C0RS C 3 A_CustomMissile("LegSoulRedLaser",10)
	TNT1 A 0 A_FaceTarget
	C0RS D 3 A_CustomMissile("LegSoulRedLaser",10)
	TNT1 A 0 A_FaceTarget
	C0RS C 3 A_CustomMissile("LegSoulRedLaser",10)
	TNT1 A 0 A_FaceTarget
	C0RS D 3 A_CustomMissile("LegSoulRedLaser",10)
	TNT1 A 0 A_FaceTarget
	C0RS C 3 A_CustomMissile("LegSoulRedLaser",10)
	TNT1 A 0 A_FaceTarget
	C0RS D 3 A_CustomMissile("LegSoulRedLaser",10)
	TNT1 A 0 A_FaceTarget
	C0RS C 3 A_CustomMissile("LegSoulRedLaser",10)
	TNT1 A 0 A_FaceTarget
	TNT1 A 0 A_Jump(32,"BFG15K","Super")
	Goto See
  TrueKamikaze:
	C0RS C 1 A_PlaySound("legsoul/see")
	C0RS A 0 A_SetInvulnerable
	C0RS D 1 A_FaceTarget
  KamikazeWait:
    TNT1 A 0 A_JumpIf(user_ragewait >= 19,"KamikazeSuper")
	TNT1 A 0 A_SetUserVar("user_ragewait",user_ragewait+1)
	C0RS C 0 A_FaceTarget
	TNT1 A 0 Radius_Quake(4,2,0,80,0)
	C0RS C 2 A_SpawnItem("LFiendFlameSpawner")
	C0RS D 0 A_FaceTarget
	TNT1 A 0 Radius_Quake(4,2,0,80,0)
	C0RS D 2 A_SpawnItem("LFiendFlameSpawner")
	Loop
  KamikazeSuper:
    TNT1 A 0 A_JumpIf(user_ragewait >= 38,"KamikazeSuperGo")
	TNT1 A 0 A_SetUserVar("user_ragewait",user_ragewait+1)
	C0RS A 0 A_FaceTarget
	TNT1 A 0 Radius_Quake(8,2,0,80,0)
	TNT1 A 0 A_SpawnItem("BHellionSmokeSpawner")
	TNT1 A 0 A_SpawnItemEx("DTBFGLightningBlueSpawner",Random(-1,1),Random(-1,1),9)
	C0RS C 2 A_SpawnItem("LFiendFlameSpawner")
	C0RS A 0 A_FaceTarget
	TNT1 A 0 Radius_Quake(8,2,0,80,0)
	TNT1 A 0 A_SpawnItem("BHellionSmokeSpawner")
	TNT1 A 0 A_SpawnItemEx("DTBFGLightningBlueSpawner",Random(-1,1),Random(-1,1),9)
	C0RS D 2 A_SpawnItem("LFiendFlameSpawner")
	Loop
  KamikazeSuperGo:
    TNT1 A 0 A_ChangeFlag(NOINTERACTION,1)
    TNT1 A 0 A_CustomMissile("TrueLegSoulKamikaze")
	TNT1 A 1 A_ChangeFlag(COUNTKILL,0)
	Stop
  Super:
  	TNT1 A 0 A_PlaySound("EnragedSoul/See")
	TNT1 A 0 A_SetInvulnerable
	TNT1 A 0 A_FaceTarget
  SuperWait:
    TNT1 A 0 A_JumpIf(user_ragewait >= 11,"SuperGo")
	C0RS C 2 A_SpawnItem("LFiendFlameSpawner")
	TNT1 A 0 A_FaceTarget
	C0RS D 2 A_SpawnItem("LFiendFlameSpawner")
	TNT1 A 0 A_FaceTarget
	TNT1 A 0 A_SetUserVar("user_ragewait",user_ragewait+1)
	Loop
  SuperGo:
	TNT1 A 0 A_SetUserVar("user_ragewait",0) 
	C0RS C 4 A_CustomMissile("TrueLegSoulBigBall",20,0,0)
	C0RS D 8 A_UnSetInvulnerable
    Goto RageGo
  Pain:
    TNT1 A 0
	TNT1 A 0 A_KillChildren
    TNT1 A 0 A_Jump(8,"Super")
  	TNT1 A 0 A_Jump(21,"Teleport")	
	TNT1 A 0 A_Jump(128,"PainMissile")
    C0RS E 2 Bright
    C0RS E 2 Bright A_Pain
    Goto See
  PainMissile:
    C0RS E 2 Bright
    C0RS E 2 Bright A_Pain
    Goto Missile
  Death:
    TNT1 A 0
    TNT1 A 0 A_SetTranslucent(0.75,1)
	C0RS F 0 A_Scream
    C0RS EEEFFFFFGGGGG 2 Bright A_SpawnItemEx("PainfulDeathKaboom",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("SoulPart1",0,0,Random(10,20),Random(8,-8),Random(8,-8),Random(6,8))
	TNT1 A 0 A_SpawnItemEx("SoulPart2",0,0,Random(10,20),Random(8,-8),Random(8,-8),Random(6,8))
	TNT1 AA 0 A_SpawnItemEx("SoulPart3",0,0,Random(10,20),Random(8,-8),Random(8,-8),Random(6,8))
    TNT1 A 0 A_PlaySound("weapons/dtech10kexplode")
	TNT1 A 0 A_SpawnItemEx("BlueDTech10KShockwave",0,0,15,0,0,0,0,128)
    TNT1 A 0 A_SpawnItem("BlueDTBFGEx",0,-10)
	//TNT1 A 0 A_SpawnItem("MiniTrueDeathBall")
    C0RS H 4 Bright
    TNT1 AA 0 A_SpawnItemEx("BlueParticleSpawner", 0, 0, 0, 0, 0, 0, 0, 128) 
	TNT1 AAAA 0 A_CustomMissile("SmokeFX2", 0, 0, random(0,360), 2, random(0,360))
    C0RS I 4 Bright A_NoBlocking
    C0RS JKL 4 Bright
    Stop
  }
}