ACTOR TheCyberdemon: Cyberdemon Replaces Cyberdemon
{
    //damagefactor "BFG", 0.5
    damagefactor "Head", 0.8
    damagefactor "MinorHead", 1.5
	damagefactor "Explosive", 1.1
    damagefactor "HKFT", 0.05
	damagefactor "HKFT", 0.05
	damagefactor "Decaptate", 5.0
	damagefactor "Avoid", 0.0
	+NOICEDEATH
    Health 4000
    damagefactor "Crush", 20.0
	MaxStepHeight 24
	MaxDropOffHeight 32
    Scale 1.2
	Radius 45
	Height 100
	+MISSILEMORE
	+MISSILEEVENMORE
    +DONTRIP
    +NORADIUSDMG
	Speed 22
	FastSpeed 26
	mass 5000
	PainChance "Taunt", 255
	PainChance "Head", 64
	DropItem "DemonStrengthRune" 25
    BloodType "Nashgore_Blood"
damagefactor "Blood", 0.0 damagefactor "BlueBlood", 0.0 damagefactor "GreenBlood", 0.0
	States
	{
	
	Death.KillMe:
    Death.Taunt:
	    TNT1 A 0 A_ChangeFlag("SOLID", 0)
        TNT1 A 0 A_SpawnItem("TheCyberdemon")
        Stop
		
    Spawn:
		TNT1 A 0 A_SpawnItem("CybersHitBox", 0, 100,0)
        CYBR D 10 A_Look
		TNT1 A 0 A_SpawnItem("CybersHitBox", 0, 100,0)
        CYBR Z 10 A_Look
        Loop

	See:
		TNT1 A 0 A_SpawnItem("CybersHitBox", 0, 100,0)
		CYBR A 3 A_Hoof
		CYBR A 3 //A_Chase
		TNT1 A 0 A_JumpIfCloser(120, "Stomp")
		TNT1 A 0 A_SpawnItem("CybersHitBox", 0, 100,0)
		CYBR AA 2 A_Chase
		TNT1 A 0 A_JumpIfCloser(120, "Stomp")
        //TNT1 A 0 A_SpawnItemEx("CyberStep",12,-30)
		CYBR BB 2 A_Chase
		TNT1 A 0 A_SpawnItem("CybersHitBox", 0, 100,0)
        CYBR BBC 2 A_Chase
		TNT1 A 0 A_JumpIfCloser(120, "Stomp")
		TNT1 A 0 A_SpawnItem("CybersHitBox", 0, 100,0)
        CYBR C 2 A_Chase
		CYBR C 2
		CYBR C 2 A_Metal
		TNT1 A 0 A_SpawnItem("CybersHitBox", 0, 100,0)
        //TNT1 A 0 A_SpawnItemEx("CyberStep",12,30)
		CYBR D 2 A_Chase
		CYBR D 2 A_Chase
		TNT1 A 0 A_JumpIfCloser(120, "Stomp")
		TNT1 A 0 A_SpawnItem("CybersHitBox", 0, 100,0)
		CYBR DD 2 A_Chase
		Loop


	Missile:
	    TNT1 A 0 A_JumpIfCloser(180, "Stomp")
		TNT1 A 0 A_JumpIfInventory("Enraged", 1, "SpecialAttack")
		TNT1 A 0 A_SpawnItem("CybersHitBox", 0, 100,0)
		CYBR E 8 A_FaceTarget
		TNT1 A 0 A_SpawnItem("CybersHitBox", 0, 100,0)
		CYBR F 6 BRIGHT A_CustomMissile("CyberBalls",60,-25,0,0)
		TNT1 A 0 A_JumpIfCloser(180, "Stomp")
		TNT1 A 0 A_SpawnItem("CybersHitBox", 0, 100,0)
		CYBR E 6 A_FaceTarget
		TNT1 A 0 A_SpawnItem("CybersHitBox", 0, 100,0)
		CYBR F 6 BRIGHT A_CustomMissile("CyberBalls",60,-25,-7,0)
		TNT1 A 0 A_JumpIfCloser(180, "Stomp")
		TNT1 A 0 A_SpawnItem("CybersHitBox", 0, 100,0)
		CYBR E 6 A_FaceTarget
		TNT1 A 0 A_SpawnItem("CybersHitBox", 0, 100,0)
		CYBR F 6 BRIGHT A_CustomMissile("CyberBalls",60,-25,7,0)
		TNT1 A 0 A_JumpIfCloser(180, "Stomp")
		TNT1 A 0 A_SpawnItem("CybersHitBox", 0, 100,0)
		CYBR E 6 A_FaceTarget
		TNT1 A 0 A_SpawnItem("CybersHitBox", 0, 100,0)
		CYBR F 6 BRIGHT A_CustomMissile("CyberBalls",60,-25,0,0)
		TNT1 A 0 A_JumpIfCloser(180, "Stomp")
		TNT1 A 0 A_SpawnItem("CybersHitBox", 0, 100,0)
		CYBR E 6 A_FaceTarget
		Goto See
		
		 
	Stomp:
		TNT1 A 0 A_SpawnItem("CybersHitBox", 0, 100,0)
		CYBR Z 5 A_FaceTarget
		TNT1 A 0 A_SpawnItem("CybersHitBox", 0, 100,0)
	    CYMA A 7 A_FaceTarget
		TNT1 A 0 A_SpawnItem("CybersHitBox", 0, 100,0)
		TNT1 A 0 A_CustomMissile("CyberStomp",10,0,0,0)
	    CYMA B 7
		TNT1 A 0 A_SpawnItem("CybersHitBox", 0, 100,0)
		CYMA B 7
		TNT1 A 0 A_SpawnItem("CybersHitBox", 0, 100,0)
		Goto See
	Death:
		CYBR H 10
		EXPL A 0 Radius_Quake (6, 100, 0, 22, 0)
        TNT1 AAAA 0 A_CustomMissile ("ExplosionSpawner", 90, 0, random (0, 360), 2, random (0, 180))
        TNT1 AAAAAA 0 A_CustomMissile ("ExplosionSpawner", 90, 0, random (0, 360), 2, random (0, 180))
        TNT1 AAAA 0 A_CustomMissile ("UltraGoreSPawner", 90, 0, random (0, 360), 2, random (0, 180))
		TNT1 A 0 A_CustomMissile ("XDeathCyberdemonHead", 120, 0, random (0, 360), 2, random (0, 180))
        TNT1 AAAAAA 0 A_CustomMissile ("UltraGoreSpawner", 90, 0, random (0, 360), 2, random (0, 180))
        TNT1 A 0 A_CustomMissile ("CyberXDeath", 0, 0, random (0, 360), 2, random (0, 160))
		CYBR I 5 A_Scream
		CYBR JKL 5
		CYBR M 5 A_NoBlocking
		CYBR NOP 5
		CYBR P 120
		CYBR P -1 A_BossDeath
		Stop
	
	Death.Decaptate:
	    TNT1 A 0 A_CustomMissile ("XDeathCyberdemonHead", 120, 0, random (0, 360), 2, random (0, 180))
		TNT1 AAAAAAAAA 0 A_CustomMissile ("XDeath1", 120, 0, random (0, 360), 2, random (0, 180))
		CYBB AAAAA 8 A_SpawnItem("MuchBlood", 0, 120)
		CYBB ABCABCB 8 A_SpawnItem("MuchBlood", 0, 120)
		EXPL A 0 Radius_Quake (6, 100, 0, 22, 0)
        TNT1 AAAA 0 A_CustomMissile ("ExplosionSpawner", 90, 0, random (0, 360), 2, random (0, 180))
        TNT1 AAAAAA 0 A_CustomMissile ("ExplosionSpawner", 90, 0, random (0, 360), 2, random (0, 180))
        TNT1 AAAA 0 A_CustomMissile ("UltraGoreSPawner", 90, 0, random (0, 360), 2, random (0, 180))
		
        TNT1 AAAAAA 0 A_CustomMissile ("UltraGoreSpawner", 90, 0, random (0, 360), 2, random (0, 180))
        TNT1 A 0 A_CustomMissile ("CyberXDeath", 0, 0, random (0, 360), 2, random (0, 160))
		CYBR I 0 A_Fall
		CYBR JKL 0
		CYBR M 0 A_NoBlocking
		CYBR NOP 0
		CYBR P 120
		CYBR P -1 A_BossDeath
		Stop
	
    Crush:
        TNT1 A 0 A_PlaySound("misc/xdeath4")
        CRS3 A 5
        CRS3 A -1
        Stop
	
	Pain.Taunt:
		TNT1 A 0
		TNT1 A 0 A_JumpIfInventory("Enraged", 1, "SpecialAttack")
		SPOS B 0 A_Pain
		TNT1 A 0 A_ChangeFlag("FASTER", 1)
		TNT1 A 0 A_ChangeFlag("MISSILEMORE", 1)
		TNT1 A 0 A_ChangeFlag("MISSILEEVENMORE", 1)
		TNT1 A 0 A_PlaySound("demon/pain")
		CYBT A 1 A_FaceTarget
		CYBT ABCCBADE 4
		TNT1 A 0 A_PlaySound("CYBTAT", 1)
		CYBT FGHGFGHGFGHGFGHG 3
		CYBT EDA 4
		TNT1 A 0 A_GiveInventory("Enraged", 1)
		Goto Missile
	
	SpecialAttack:
		TNT1 A 0 A_SpawnItem("CybersHitBox", 0, 100,0)
		CYBR E 6 A_FaceTarget
		TNT1 A 0 A_SpawnItem("CybersHitBox", 0, 100,0)
		CYBR F 4 BRIGHT A_CustomMissile("CyberBalls",60,-25,0,0)
		TNT1 A 0 A_JumpIfCloser(180, "Stomp")
		TNT1 A 0 A_SpawnItem("CybersHitBox", 0, 100,0)
		CYBR E 4 A_FaceTarget
		TNT1 A 0 A_SpawnItem("CybersHitBox", 0, 100,0)
		CYBR F 4 BRIGHT A_CustomMissile("CyberBalls",60,-25,-7,0)
		TNT1 A 0 A_JumpIfCloser(180, "Stomp")
		TNT1 A 0 A_SpawnItem("CybersHitBox", 0, 100,0)
		CYBR E 4 A_FaceTarget
		TNT1 A 0 A_SpawnItem("CybersHitBox", 0, 100,0)
		CYBR F 4 BRIGHT A_CustomMissile("CyberBalls",60,-25,7,0)
		TNT1 A 0 A_JumpIfCloser(180, "Stomp")
		TNT1 A 0 A_SpawnItem("CybersHitBox", 0, 100,0)
		CYBR E 4 A_FaceTarget
		TNT1 A 0 A_SpawnItem("CybersHitBox", 0, 100,0)
		CYBR F 4 BRIGHT A_CustomMissile("CyberBalls",60,-25,0,0)
		TNT1 A 0 A_JumpIfCloser(180, "Stomp")
		TNT1 A 0 A_SpawnItem("CybersHitBox", 0, 100,0)
		CYBR E 4 A_FaceTarget
		TNT1 A 0 A_SpawnItem("CybersHitBox", 0, 100,0)
		CYBR F 4 BRIGHT A_CustomMissile("CyberBalls",60,-25,0,0)
		CYBR E 4 A_FaceTarget
		TNT1 A 0 A_SpawnItem("CybersHitBox", 0, 100,0)
		CYBR F 4 BRIGHT A_CustomMissile("CyberBalls",60,-25,0,0)
		Goto See
	
	}
}
