ACTOR TeleporterFastBFG10kCyberDemon : Cyberlord //Am I going too fast, babe?
{
//Creator: GDWolf
//Origin: Complex Very Strong Monsters
//Sprite: ANNI/ANII
//Title: "The Fastest BFG10k Cyberdemon"
Tag "\c[y6]The Fastest BFG10k Cyberdemon\c-"
Health 40000
PainChance 50
Speed 16
PainChance "PDTBFG", 25
PainChance "SoulToxic", 15
PainChance "FatFlamer", 15
PainChance "FiendFire", 15
PainChance "Explosion", 80
Species "Cybers"
DropItem "Grenade Launcher" 128 25
DropItem "BossLifeEssence" 128 25
DropItem "BossArmorBonusMax" 128 1
DropItem "MissileBox" 128 20
DropItem "Supercrate" 256 1
DropItem "The Fastest BFG10K Ever" 200 1
DropItem "D-BFG" 200 1
DropItem "CorruptedEnergy" 150
DropItem "CorruptedEnergy" 100
DropItem "CorruptedEnergy" 100
Obituary "The Fast And Fouriious Cyberdemon was waaaaaaaaaaaaaaaaaaaay too fast for %o."
DamageFactor "Cyber10K", 0.0
DamageFactor "PDTBFG", 0.5
DamageFactor "PDTBFGTracer", 0.8
DamageFactor "GeneralTracer", 0.0
SeeSound "monsters/clsee"
PainSound "monsters/cyberlordpain"
DeathSound "monsters/cldie"
//+ALWAYSFAST
var int user_music;
var int user_bfg;
var int user_bfgsuper;
States 
{    
Spawn: 
    ANNI A 10 A_Look
	ANNI A 10 A_Look
	ANII A 10 A_Look
	ANII A 10 A_Look
    Loop 
See:
	TNT1 A 0 A_JumpIf(user_music == 1,3)
	TNT1 A 0 ACS_NamedExecuteAlways("StartMonsterMusic",0,2011)
    TNT1 A 0 A_SetUserVar("user_music",1) 
    TNT1 A 0 A_Playsound("monsters/clhoof")
    ANNI AABBBB 1 A_Chase		
    TNT1 A 0 A_Playsound("monsters/clhoof") 
    ANNI CCDDDD 1 A_Chase 		 
    Loop 
Missile:
	TNT1 A 0 A_Jump(128,"BFG10k","CorrBFG10k")
Normal:
    ANNI E 12 A_FaceTarget
    TNT1 A 0 A_CustomMissile("CyberLordRocket", 40, 26, 0)
    ANNI F 3 Bright A_CustomMissile("CyberLordRocket", 40, -26, 0)
    ANNI E 3 A_FaceTarget
    TNT1 A 0 A_CustomMissile("CyberLordRocket", 40, 26, 0)
    ANNI F 3 Bright A_CustomMissile("CyberLordRocket", 40, -26, 0)
    ANNI E 3 A_FaceTarget
    TNT1 A 0 A_CustomMissile("CyberLordRocket", 40, 26, 0)
    ANNI F 3 Bright A_CustomMissile("CyberLordRocket", 40, -26, 0)
	ANNI E 12
    TNT1 A 0 A_Jump(128,"BFG10k","CorrBFG10k")
    Goto See
BFG10k:
    TNT1 A 0 A_SetUserVar("user_bfg",0)
	ANNI E 3 A_FaceTarget
BFG10kLoop:
    TNT1 A 0 A_JumpIf(user_bfg >= 100, "BFGEnd")
    TNT1 A 0 A_SetUserVar("user_bfg", user_bfg+1)
	ANNI AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 0 A_Wander
	ANNI AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 0 A_Wander
    ANNI A 1 A_PlayWeaponSound("boss/teleport")
	TNT1 A 0 A_PlaySound("weapons/bfg15kfire")
	ANNI F 0 A_CustomMissile("General10KProjectile", 40, 26, 0)
	ANNI F 0 A_CustomMissile("General10KProjectile", 40, -26, 0)
	ANNI E 1 Bright A_FaceTarget
	Loop
BFGEnd:
	ANNI E 35 A_PlaySound("weapons/bfg15kcooldown") 
	Goto See
CorrBFG10k:
    TNT1 A 0 A_SetUserVar("user_bfgsuper",0)
	ANNI E 3 A_FaceTarget
CorrBFG10kLoop:
    TNT1 A 0 A_JumpIf(user_bfgsuper >= 50, "CorrBFGEnd")
    TNT1 A 0 A_SetUserVar("user_bfgsuper", user_bfgsuper+1)
	ANNI AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 0 A_Wander
	ANNI AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 0 A_Wander
    ANNI A 1 A_PlayWeaponSound("boss/teleport")
	TNT1 A 0 A_PlaySound("Weapons/dbfgfire2")
	ANNI F 0 A_CustomMissile("CorruptedGeneral10KProjectile", 40, 26, 0)
	ANNI F 0 A_CustomMissile("CorruptedGeneral10KProjectile", 40, -26, 0)
	ANNI E 1 Bright A_FaceTarget
	Loop
CorrBFGEnd:
	ANNI E 35 A_PlaySound("Weapons/dbfgcooldown2") 
	Goto See
Pain:
	TNT1 A 0 A_Jump(61,"PainMissile")
    ANNI G 10 A_Pain
    Goto See
PainMissile:
	ANNI G 10 A_Pain
    Goto Missile
Death:
	ANNI G 10 A_Scream
	ANNI H 10 A_NoBlocking
	TNT1 AA 0 A_SpawnItemEx("GibbedGenerator",Random(10,-10),Random(10,-10),Random(20,60),0,0,0,0,128,0)
	TNT1 AAA 0 A_CustomMissile("BigRedBloodCloud", random(10,80), 0, random(0,360), 2, random(0,360))
    ANNI IIIII 2 Bright A_CustomMissile("Kaboom", random(20,80), random(20,-20), random(0,360), 2, random(0,360))
	TNT1 AA 0 A_SpawnItemEx("GibbedGenerator",Random(10,-10),Random(10,-10),Random(20,60),0,0,0,0,128,0)
	TNT1 AAA 0 A_CustomMissile("BigRedBloodCloud", random(10,80), 0, random(0,360), 2, random(0,360))
    ANNI JJJJJ 2 Bright A_CustomMissile("Kaboom", random(20,80), random(20,-20), random(0,360), 2, random(0,360))
    TNT1 AA 0 A_SpawnItemEx("GibbedGenerator",Random(10,-10),Random(10,-10),Random(20,60),0,0,0,0,128,0)
	TNT1 AAA 0 A_CustomMissile("BigRedBloodCloud", random(10,80), 0, random(0,360), 2, random(0,360))		
    ANNI KKKKK 2 Bright A_CustomMissile("Kaboom", random(20,80), random(20,-20), random(0,360), 2, random(0,360))
	TNT1 AA 0 A_SpawnItemEx("GibbedGenerator",Random(10,-10),Random(10,-10),Random(20,60),0,0,0,0,128,0)		
	TNT1 AAA 0 A_CustomMissile("BigRedBloodCloud", random(10,80), 0, random(0,360), 2, random(0,360))
    ANNI LLLLL 1 Bright A_CustomMissile("Kaboom", random(20,80), random(20,-20), random(0,360), 2, random(0,360))
    TNT1 AA 0 A_SpawnItemEx("GibbedGenerator",Random(10,-10),Random(10,-10),Random(20,60),0,0,0,0,128,0)
	TNT1 AAA 0 A_CustomMissile("BigRedBloodCloud", random(10,80), 0, random(0,360), 2, random(0,360))
    ANNI MMMMM 1 Bright A_CustomMissile("Kaboom", random(20,80), random(20,-20), random(0,360), 2, random(0,360))
    TNT1 AAAA 0 A_SpawnItemEx("GibbedGenerator",Random(10,-10),Random(10,-10),Random(20,60),0,0,0,0,128,0)
	TNT1 AAAAAA 0 A_CustomMissile("BigRedBloodCloud", random(10,80), 0, random(0,360), 2, random(0,360))
	TNT1 AAAAAAAA 0 A_CustomMissile("SmokeFX3", Random(20,80), 0, random(0,360), 2, random(0,360))
	TNT1 A 30
	TNT1 AAAAAA 0 A_SpawnItemEx("DCell",0,0,2,random(1,8),0,10,random(0,360),0,0)
	TNT1 A 30
	TNT1 AAAAAA 0 A_SpawnItemEx("DCell",0,0,2,random(1,8),0,10,random(0,360),0,0)
	TNT1 A 30
	TNT1 AAAAAA 0 A_SpawnItemEx("DCell",0,0,2,random(1,8),0,10,random(0,360),0,0)
	TNT1 A 30
	TNT1 AAAAAA 0 A_SpawnItemEx("DCell",0,0,2,random(1,8),0,10,random(0,360),0,0)
	TNT1 A 30
	TNT1 AAAAAA 0 A_SpawnItemEx("DCell",0,0,2,random(1,8),0,10,random(0,360),0,0)
    ANNI NO 5
	TNT1 A 0 A_BossDeath
    ANNI P -1 A_KillMaster
    Stop		
Crush:
	BOCR A -1 A_PlaySound("gib/squish")
	Stop
    }
}