ACTOR 9 : GenericBoss
{
//Creator: Complex Doom CF 3.0 team
//Origin: Complex Doom CF 3.0 Aprilfools & CF-v2.15
//Sprite: NINE/NIN2
//Title: "9"
  floatspeed 6
  Speed 6
  Health 2599
  +NORADIUSDMG
  DamageFactor "Legendary", 0.5
  Painchance 10
  Obituary "%o experienced hellfire from 9."
  SeeSound "9/sight"
  ActiveSound "9/active"
  DeathSound "9/death"
  PainSound "remihurt"
  DropItem "BossLifeEssence" 255 25
  DropItem "BossArmorBonusMax" 255 1
  DropItem "GreaterDemonicEnergy" 128 200
  DropItem "DemonicChalice" 128
  DropItem "SkullOfPower" 128
  DropItem "PyroCannon" 32 1 
  DropItem "GreaterFireEnergy" 128 100
  DropItem "HellfireArmor" 32
  Tag "\c[k7]9\c-"
  var int user_music;
  States
  {
  Spawn:
	TNT1 A 0
	TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("Disable2hu") == 1, "Remove")
  Idle:
    NINE AAAABBBBCCCCDDDDEEEEFFFF 1 A_Look
    Loop
  Remove:
	TNT1 A 1
	TNT1 A 0 A_SpawnItemEx("Cacodemon~",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,2062)
	TNT1 A 0 A_SetUserVar("user_music",1)
    NINE AAAABBBBCCCCDDDDEEEEFFFF 1 A_Chase
    Loop
  Pain:
    NINE G 10 A_Pain
    Goto See
  Melee:
	Goto Missile
  Missile:
    NIN2 A 0 A_facetarget
	NIN2 A 0 A_Playsound("9/warn")
    NIN2 A 0 A_Jump(32,"Pyroball"/*,"RedSmog","BlackIceSpikes","Inferno"*/)
  9Balls: //I probably could've named this better but who cares at this point
	TNT1 A 0 A_Jump(128,"9Barrage")
    NIN2 A 6
	NIN2 BC 8
	NIN2 D 0 A_CustomMissile("ExplodeyNineBall",25,0,0)
	NIN2 D 0 A_CustomMissile("ExplodeyNineBall",25,0,20)
	NIN2 D 0 A_CustomMissile("ExplodeyNineBall",25,0,40)
	NIN2 D 0 A_CustomMissile("ExplodeyNineBall",25,0,30)
	NIN2 D 0 A_CustomMissile("ExplodeyNineBall",25,0,-30)
	NIN2 D 0 A_CustomMissile("ExplodeyNineBall",25,0,-20)
	NIN2 D 10 A_CustomMissile("ExplodeyNineBall",25,0,-40)
	NIN2 EA 6
	NIN2 BC 8
	NIN2 D 0 A_CustomMissile("ExplodeyNineBall",25,0,0)
	NIN2 D 0 A_CustomMissile("ExplodeyNineBall",25,0,10)
	NIN2 D 0 A_CustomMissile("ExplodeyNineBall",25,0,20)
	NIN2 D 0 A_CustomMissile("ExplodeyNineBall",25,0,-10)
	NIN2 D 10 A_CustomMissile("ExplodeyNineBall",25,0,-20)
	NIN2 D 0 A_CustomMissile("ExplodeyNineBall",25,0,0)
	NIN2 D 0 A_CustomMissile("ExplodeyNineBall",25,0,10)
	NIN2 D 0 A_CustomMissile("ExplodeyNineBall",25,0,20)
	NIN2 D 0 A_CustomMissile("ExplodeyNineBall",25,0,-10)
	NIN2 E 10 A_CustomMissile("ExplodeyNineBall",25,0,-20)
	NIN2 D 0 A_CustomMissile("ExplodeyNineBall",25,0,0)
	NIN2 D 0 A_CustomMissile("ExplodeyNineBall",25,0,10)
	NIN2 D 0 A_CustomMissile("ExplodeyNineBall",25,0,20)
	NIN2 D 0 A_CustomMissile("ExplodeyNineBall",25,0,-10)
	NIN2 D 10 A_CustomMissile("ExplodeyNineBall",25,0,-20)
	NIN2 A 6
	NIN2 BC 8
	NIN2 D 0 A_CustomMissile("ExplodeyNineBall",25,0,0)
	NIN2 D 0 A_CustomMissile("ExplodeyNineBall",25,0,20)
	NIN2 D 0 A_CustomMissile("ExplodeyNineBall",25,0,40)
	NIN2 D 0 A_CustomMissile("ExplodeyNineBall",25,0,30)
	NIN2 D 0 A_CustomMissile("ExplodeyNineBall",25,0,-30)
	NIN2 D 0 A_CustomMissile("ExplodeyNineBall",25,0,-20)
	NIN2 D 10 A_CustomMissile("ExplodeyNineBall",25,0,-40)
	NIN2 EF 6
	Goto See
  9Barrage:
    NIN2 A 6
	NIN2 BC 8
	NIN2 DEDEDEDEDEDEDEDEDEDEDEDEDED 4 A_CustomMissile("ExplodeyNineBall",25,0,random(-6,6))
	NIN2 EF 6
	Goto See
  PyroBall:
	NIN2 GHHHIIIJJ 5 A_SpawnItem("HellFireBaronFlameSpawner")
	NIN2 K 15 A_CustomMissile("NinePyroBall",25,0,0)
	NIN2 LMN 6
	Goto See
  Death:
	TNT1 A 0
    TNT1 A 0 A_Scream
    NINE GGGGGGGGG 6 A_SpawnItemEx ("Edgy2huBossDeathFlame", 0, 0, 0, random(-3,3), random(-3,3), random(-3,3), random (0, 360))
	TNT1 A 0 A_NoBlocking
	NINE AAAA 0 A_CustomMissile("Edgy2huBossDeathFlame3", random(5, 55), 0, random(0,360), CMF_OFFSETPITCH, frandom(-40, 70))
	NINE G 2 A_SpawnItemEx ("Edgy2huBossDeathFlame", 0, 0, 0, random(-3,3), random(-3,3), random(-3,3), random (0, 360))
    NINE AAAA 0 A_CustomMissile("Edgy2huBossDeathFlame3", random(5, 55), 0, random(0,360), CMF_OFFSETPITCH, frandom(-40, 70))
	NINE G 2 A_SpawnItemEx ("Edgy2huBossDeathFlame", 0, 0, 0, random(-3,3), random(-3,3), random(-3,3), random (0, 360))
    NINE AAAA 0 A_CustomMissile("Edgy2huBossDeathFlame3", random(5, 55), 0, random(0,360), CMF_OFFSETPITCH, frandom(-40, 70))
	NINE G 2 A_SpawnItemEx ("Edgy2huBossDeathFlame", 0, 0, 0, random(-3,3), random(-3,3), random(-3,3), random (0, 360))
    NINE AAAA 0 A_CustomMissile("Edgy2huBossDeathFlame3", random(5, 55), 0, random(0,360), CMF_OFFSETPITCH, frandom(-40, 70))
	NINE G 2 A_SpawnItemEx ("Edgy2huBossDeathFlame", 0, 0, 0, random(-3,3), random(-3,3), random(-3,3), random (0, 360))
    NINE AAAA 0 A_CustomMissile("Edgy2huBossDeathFlame3", random(5, 55), 0, random(0,360), CMF_OFFSETPITCH, frandom(-40, 70))
	NINE G 2 A_SpawnItemEx ("Edgy2huBossDeathFlame", 0, 0, 0, random(-3,3), random(-3,3), random(-3,3), random (0, 360))
    NINE AAAA 0 A_CustomMissile("Edgy2huBossDeathFlame3", random(5, 55), 0, random(0,360), CMF_OFFSETPITCH, frandom(-40, 70))
	TNT1 A 2 A_SpawnItemEx ("Edgy2huBossDeathFlame", 0, 0, 0, random(-3,3), random(-3,3), random(-3,3), random (0, 360))
    NINE AAAA 0 A_CustomMissile("Edgy2huBossDeathFlame3", random(5, 55), 0, random(0,360), CMF_OFFSETPITCH, frandom(-40, 70))
	TNT1 A 2 A_SpawnItemEx ("Edgy2huBossDeathFlame", 0, 0, 0, random(-3,3), random(-3,3), random(-3,3), random (0, 360))
    NINE AAAA 0 A_CustomMissile("Edgy2huBossDeathFlame3", random(5, 55), 0, random(0,360), CMF_OFFSETPITCH, frandom(-40, 70))
	TNT1 A 2 A_SpawnItemEx ("Edgy2huBossDeathFlame", 0, 0, 0, random(-3,3), random(-3,3), random(-3,3), random (0, 360))
    NINE AAAA 0 A_CustomMissile("Edgy2huBossDeathFlame3", random(5, 55), 0, random(0,360), CMF_OFFSETPITCH, frandom(-40, 70))
	TNT1 A 2 A_SpawnItemEx ("Edgy2huBossDeathFlame", 0, 0, 0, random(-3,3), random(-3,3), random(-3,3), random (0, 360))
    NINE AAAA 0 A_CustomMissile("Edgy2huBossDeathFlame3", random(5, 55), 0, random(0,360), CMF_OFFSETPITCH, frandom(-40, 70))
	TNT1 A 2 A_SpawnItemEx ("Edgy2huBossDeathFlame", 0, 0, 0, random(-3,3), random(-3,3), random(-3,3), random (0, 360))
    NINE AAAA 0 A_CustomMissile("Edgy2huBossDeathFlame3", random(5, 55), 0, random(0,360), CMF_OFFSETPITCH, frandom(-40, 70))
	TNT1 A 2 A_SpawnItemEx ("Edgy2huBossDeathFlame", 0, 0, 0, random(-3,3), random(-3,3), random(-3,3), random (0, 360))
    NINE AAAA 0 A_CustomMissile("Edgy2huBossDeathFlame3", random(5, 55), 0, random(0,360), CMF_OFFSETPITCH, frandom(-40, 70))
	TNT1 A 2 A_SpawnItemEx ("Edgy2huBossDeathFlame", 0, 0, 0, random(-3,3), random(-3,3), random(-3,3), random (0, 360))
	TNT1 A 1
    Stop
  }
}


ACTOR ExplodeyNineBall : GenericSuperOrb
{
  Speed 35
  damage 4
  Scale 0.7
  SeeSound "remishot"
  DeathSound "9ball/explode"
  States
  {
  Spawn:
    CLBA F 1 Bright A_SpawnItemEx("YellowProjParticleSuperLarge",0,0,0,0,frandom(-1,1),frandom(-1,1),random(0,359))
    Loop
  Death:
	TNT1 A 0
	TNT1 A 0 A_Explode(35,100)
	TNT1 A 0 A_SpawnItem("YellowProjExplode")
	TNT1 AAAAAAAAA 0 A_SpawnItemEx("YellowProjParticleLarge",0,0,0,frandom(-4,4),frandom(-4,4),frandom(-4,4),random(0,359))
    CLBA F 1 Bright A_FadeOut(0.2)
    Goto Death+3
  }
}


ACTOR NinePyroBall : GenericSuperOrb
{
  Speed 20
  Damage 20
  Scale 1.5
  +FORCERADIUSDMG
  States
  {
  Spawn:
	TNT1 A 0 A_Playsound("monster/ambientfire2",7,1.0,1)
    CLBB F 1 Bright A_SpawnItemEx("YellowProjParticleSuperLarge2",0,0,0,0,frandom(-1,1),frandom(-1,1),random(0,359))
    TNT1 A 0 A_SpawnItemEx("YellowProjParticleSuperLarge2",0,0,0,0,frandom(-1,1),frandom(-1,1),random(0,359))
    TNT1 AA 0 A_SpawnItemEx("CardinalFire",0,0,0,0,frandom(-2,2),frandom(-2,2),random(0,359))
    Loop
  Death:
	TNT1 A 0
	TNT1 A 0 A_Stopsound(7)
	TNT1 A 0 A_SpawnItem("YellowProjExplodeLarge")
	TNT1 AAAAAAAAA 0 A_SpawnItemEx("YellowProjParticleSuperLarge",0,0,0,frandom(-4,4),frandom(-4,4),frandom(-4,4),random(0,359))
    TNT1 AA 0 A_CustomMissile("Kaboom",0,0,random(0,360),2,random(0,360))
	TNT1 A 0 A_Explode(128,128)
    CLBB F 8 Bright
	TNT1 A 0 A_SpawnItem("YellowProjExplodeLarge")
	TNT1 AAAAAAAAA 0 A_SpawnItemEx("YellowProjParticleSuperLarge",0,0,0,frandom(-4,4),frandom(-4,4),frandom(-4,4),random(0,359))
    TNT1 AA 0 A_CustomMissile("Kaboom",0,0,random(0,360),2,random(0,360))
	TNT1 A 0 A_Explode(128,128)
    CLBB F 8 Bright
	TNT1 A 0 A_SpawnItem("YellowProjExplodeLarge")
	TNT1 AAAAAAAAA 0 A_SpawnItemEx("YellowProjParticleSuperLarge",0,0,0,frandom(-4,4),frandom(-4,4),frandom(-4,4),random(0,359))
    TNT1 AA 0 A_CustomMissile("Kaboom",0,0,random(0,360),2,random(0,360))
	TNT1 A 0 A_Explode(128,128)
    CLBB F 8 Bright
	TNT1 A 0 A_SpawnItem("YellowProjExplodeLarge")
	TNT1 AAAAAAAAA 0 A_SpawnItemEx("YellowProjParticleSuperLarge",0,0,0,frandom(-4,4),frandom(-4,4),frandom(-4,4),random(0,359))
    TNT1 AA 0 A_CustomMissile("Kaboom",0,0,random(0,360),2,random(0,360))
	TNT1 A 0 A_Explode(128,128)
    CLBB F 8 Bright
	TNT1 A 0 A_SpawnItem("YellowProjExplodeLarge")
	TNT1 AAAAAAAAA 0 A_SpawnItemEx("YellowProjParticleSuperLarge",0,0,0,frandom(-4,4),frandom(-4,4),frandom(-4,4),random(0,359))
    TNT1 AA 0 A_CustomMissile("Kaboom",0,0,random(0,360),2,random(0,360))
	TNT1 A 0 A_Explode(128,128)
    CLBB F 8 Bright
	TNT1 A 0 A_SpawnItem("YellowProjExplodeLarge")
	TNT1 AAAAAAAAA 0 A_SpawnItemEx("YellowProjParticleSuperLarge",0,0,0,frandom(-4,4),frandom(-4,4),frandom(-4,4),random(0,359))
    TNT1 AA 0 A_CustomMissile("Kaboom",0,0,random(0,360),2,random(0,360))
	TNT1 A 0 A_Explode(128,128)
    CLBB F 8 Bright
	TNT1 A 0 A_SpawnItem("YellowProjExplodeLarge")
	TNT1 AAAAAAAAA 0 A_SpawnItemEx("YellowProjParticleSuperLarge",0,0,0,frandom(-4,4),frandom(-4,4),frandom(-4,4),random(0,359))
    TNT1 AA 0 A_CustomMissile("Kaboom",0,0,random(0,360),2,random(0,360))
	TNT1 A 0 A_Explode(128,128)
    CLBB F 8 Bright
	TNT1 A 0 A_SpawnItem("YellowProjExplodeLarge")
	TNT1 AAAAAAAAA 0 A_SpawnItemEx("YellowProjParticleSuperLarge",0,0,0,frandom(-4,4),frandom(-4,4),frandom(-4,4),random(0,359))
    TNT1 AA 0 A_CustomMissile("Kaboom",0,0,random(0,360),2,random(0,360))
	TNT1 A 0 A_Explode(128,128)
    CLBB F 8 Bright
	TNT1 A 0 A_SpawnItem("YellowProjExplodeLarge")
	TNT1 AAAAAAAAA 0 A_SpawnItemEx("YellowProjParticleSuperLarge",0,0,0,frandom(-4,4),frandom(-4,4),frandom(-4,4),random(0,359))
    TNT1 AA 0 A_CustomMissile("Kaboom",0,0,random(0,360),2,random(0,360))
	TNT1 A 0 A_Explode(128,128)
    CLBB F 8 Bright
	TNT1 A 0 A_SpawnItem("YellowProjExplodeLarge")
	TNT1 AAAAAAAAA 0 A_SpawnItemEx("YellowProjParticleSuperLarge",0,0,0,frandom(-4,4),frandom(-4,4),frandom(-4,4),random(0,359))
    TNT1 AA 0 A_CustomMissile("Kaboom",0,0,random(0,360),2,random(0,360))
	TNT1 A 0 A_Explode(128,128)
    CLBB F 8 Bright
	TNT1 A 0 A_Playsound("Weapons/PCnnEx",6)
	TNT1 A 0 A_Playsound("weapons/hellex",7)
	TNT1 A 0 Radius_Quake(15,20,0,20,0)
	HFBA D 0 A_CustomMissile("FuelExplosion01",0,0,0,30)
    HFBA D 0 A_CustomMissile("FuelExplosion01",0,0,65,30)
    HFBA D 0 A_CustomMissile("FuelExplosion01",0,0,120,30)
    HFBA D 0 A_CustomMissile("FuelExplosion01",0,0,165,30)
    HFBA D 0 A_CustomMissile("FuelExplosion01",0,0,220,30)
    HFBA D 0 A_CustomMissile("FuelExplosion01",0,0,265,30)
    HFBA D 0 A_CustomMissile("FuelExplosion01",0,0,330,30)
    HFBA D 0 A_CustomMissile("FuelExplosion01",0,0,375,30)
    HFBA D 0 A_Mushroom("HFCyberMushroomFireballs",4)
	TNT1 A 0 A_Explode(200,300,0,1)
    Stop
  }
}