actor angrycow : cyberdemon replaces cyberdemon
{
	var int user_bossexplosiontimer;
	states
	{
	Pain:
		CYBR G 1 a_playsound ("monsters/bosshurt",0)
		"####" "#" 1 bright Thing_SetTranslation(0, 4242)
		"####" "#" 2 bright A_Pain
		"####" "#" 4 bright 
		"####" "#" 2 Thing_SetTranslation(0, 0)
		"####" "#" 1 
		goto see
	pain.zelda:
		TNT1 A 0
		CYBR G 1 a_playsound ("monsters/zeldahurt",0)
		CYBR G 1 bright Thing_SetTranslation(0, 4242)
		TNT1 A 0 a_playsound ("zelda/boss",0,1,0,0.7)
		CYBR G 2 bright A_Pain
		CYBR G 1 bright Thing_SetTranslation(0, 0)
		CYBR G 1 bright Thing_SetTranslation(0, 4242)
		CYBR G 1 bright Thing_SetTranslation(0, 0)
		CYBR G 1 bright Thing_SetTranslation(0, 4242)
		CYBR G 1 Thing_SetTranslation(0, 0)
		Goto See
	death:
		TNT1 A 0
		CYBR H 2 A_BossDeath
		CYBR H 2 A_NoBlocking
		TNT1 A 0 Thing_SetTranslation(0, 0)
		TNT1 A 0 A_SetUserVar("user_bossexplosiontimer", 20)
	DeathExplosionLoop:
		TNT1 A 0 A_JumpIf (user_bossexplosiontimer <= 0, "DeathFinish")
		TNT1 A 0 A_Quake(3, 4, 0, 768, "")
		CYBR H 1 Bright 
		TNT1 A 0 A_Jump (10, 3)
		TNT1 A 0 A_SpawnItemEx ("BossExplosion", frandom(-56,56),frandom(-56,56),frandom(4,90), 0,0,0, 0, SXF_NOCHECKPOSITION)
		TNT1 A 1
		TNT1 A 0 a_playsound ("monsters/bossexplode",7,1,0,0.5)
		TNT1 A 0 a_spawnitemex("cyberdemongib5",0,0,20,frandom(-15,15),frandom(-15,15),frandom(5,10))
		CYBR H 1 Bright
		TNT1 A 1
		TNT1 A 0 A_SetUserVar("user_bossexplosiontimer", user_bossexplosiontimer - 1)
		Goto DeathExplosionLoop
	Deathfinish:
		CYBR I 2 A_Scream
		CYBR I 15 A_NoBlocking
		TNT1 A 0 a_spawnitemex("cyberdemongib5",0,0,20,frandom(-15,15),frandom(-15,15),frandom(5,10))
		TNT1 A 0 a_spawnitemex("cyberdemongib5",0,0,20,frandom(-15,15),frandom(-15,15),frandom(5,10))
		TNT1 A 0 a_spawnitemex("cyberdemongib5",0,0,20,frandom(-15,15),frandom(-15,15),frandom(5,10))
		TNT1 A 0 a_spawnitemex("cyberdemongib5",0,0,20,frandom(-15,15),frandom(-15,15),frandom(5,10))
		CYBR J 3
		TNT1 A 0 A_playsound ("cyberdemon/death2",0,1,0,0)
		TNT1 A 0 a_spawnitemex("cyberdemongib5",0,0,20,frandom(-15,15),frandom(-15,15),frandom(5,10))
		TNT1 A 0 a_spawnitemex("cyberdemongib1",0,0,0,frandom(-20,20),frandom(-20,20),frandom(13,15))
		TNT1 A 0 a_spawnitemex("cyberdemongib2",0,0,0,frandom(-20,20),frandom(-20,20),frandom(13,15))
		TNT1 A 0 a_spawnitemex("cyberdemongib2",0,0,0,frandom(-20,20),frandom(-20,20),frandom(13,15))
		TNT1 A 0 a_spawnitemex("cyberdemongib3",0,0,0,frandom(-20,20),frandom(-20,20),frandom(13,15))
		TNT1 A 0 a_spawnitemex("cyberdemongib3",0,0,0,frandom(-20,20),frandom(-20,20),frandom(13,15))
		TNT1 A 0 a_spawnitemex("cyberdemongib4",0,0,0,frandom(-20,20),frandom(-20,20),frandom(13,15))
		TNT1 A 0 a_spawnitemex("cyberdemongib4",0,0,0,frandom(-20,20),frandom(-20,20),frandom(13,15))
		TNT1 AAAAA 0 a_spawnitemex("bigmissilepack",0,0,20,frandom(-15,15),frandom(-15,15),frandom(5,10))
		CYBR KLMNOP 6 A_Quake(2, 4, 0, 768, "")
		CYBR P 30
		TNT1 AAAAAAAAAA 0 a_spawnitemex ("droppeditemspawner",frandom(-20,20),frandom(-35,30),frandom(20,35))
		CYBR P -1 A_Bossdeath
		Stop
	death.zelda:
		TNT1 A 0
		TNT1 A 0 a_noblocking
		CYBR H 1 bright
		TNT1 A 1
		CYBR H 1 bright
		TNT1 A 1
		CYBR H 1 bright
		TNT1 A 1
		CYBR H 1 bright
		TNT1 A 1
		CYBR H 1 bright
		TNT1 A 1
		CYBR H 1 bright
		TNT1 A 1
		CYBR H 1 bright
		TNT1 A 1
		CYBR H 1 bright
		TNT1 A 1
		CYBR H 1 bright
		TNT1 A 1
		CYBR H 1 bright
		TNT1 A 1
		CYBR H 1 bright
		TNT1 A 1
		CYBR H 1 bright
		TNT1 A 1
		CYBR H 1 bright
		TNT1 A 1
		CYBR H 1 bright
		TNT1 A 1
		CYBR H 1 bright
		TNT1 A 1
		CYBR H 1 bright
		TNT1 A 1
		CYBR H 1 bright
		TNT1 A 1
		CYBR H 1 bright
		TNT1 A 1
		CYBR H 1 bright
		TNT1 A 1
		CYBR H 1 bright
		TNT1 A 1
		CYBR H 1 bright
		TNT1 A 1
		CYBR H 1 bright
		TNT1 A 1
		CYBR H 1 bright
		TNT1 A 1
		CYBR H 1 bright
		TNT1 A 1
		CYBR H 1 bright
		TNT1 A 1
		CYBR H 1 bright
		TNT1 A 1
		CYBR H 1 bright
		TNT1 A 1 a_scream
		CYBR H 1 bright
		TNT1 A 1
		CYBR H 1 bright
		TNT1 A 1
		CYBR H 1 bright
		TNT1 A 1
		CYBR I 4 bright
		CYBR J 3 bright
		TNT1 A 0 a_playsound ("zelda/boss",0)
		TNT1 AAAAA 0 a_spawnitemex("bigmissilepack",0,0,20,frandom(-15,15),frandom(-15,15),frandom(5,10))
		TNT1 A 1 a_spawnitemex ("zeldabossdie",0,0,35)
		TNT1 A -1 a_bossdeath
		stop
		
	}
}

actor cyberdemongib1 : zombiegib1
{
	states
	{
	spawn:
		CBG1 ABCD 1
		loop
	death:
		TNT1 A 1
		stop
	}
}

actor cyberdemongib2 : zombiegib1
{
	states
	{
	spawn:
		CBG2 ABCD 1
		loop
	}
}

actor cyberdemongib3 : zombiegib1
{
	states
	{
	spawn:
		CBG3 ABCD 1
		loop
	}
}

actor cyberdemongib4 : zombiegib1
{
	states
	{
	spawn:
		CBG4 ABCD 1
		loop
	}
}

actor cyberdemongib5 : zombiegib1
{
	states
	{
	spawn:
		TNT1 A 0
		TNT1 A 0 a_jump (40, "flightloop2")
		TNT1 A 0 a_jump (40, "flightloop3")
		TNT1 A 1 a_jump (40, "flightloop4")
	flightloop1:
		CBG5 ABCD 1
		loop
	flightloop2:
		CBG6 AB 1
		loop
	flightloop3:
		CBG7 ABCD 1
		loop
	flightloop4:
		CBG8 ABCD 1
		loop
	death:
		TNT1 A 1
		stop
	}
}

actor zeldabossdie
{
	+NOINTERACTION
	+clientsideonly
	scale 8
	Radius 4
	Height 5
	+bright
	states
	{
	spawn:
		TNT1 A 0
		ZDTH A 2
		ZDTH B 2
		ZDTH A 2
		stop
	Death:
		TNT1 A 1
		stop
	}
}
