Actor _Ettin : NewEttin
{
	-TELESTOMP
	Height 56
	Scale 0.85
	Species "Demon"
	States
	{
	Spawn:
		ETTN A 0
		ETTN A 0 ACS_NamedExecuteAlways("WOC Monster Init",0,60,0)
		Goto Idle
	Raise:
		TNT1 A 0 ACS_NamedExecuteAlways("WOC Monster Init",0,60,0)
		ETTN QPONMLKJI 4
		goto See
	}
}

Actor _Bormereth : Bormereth
{
	-TELESTOMP
	Height 56
	Scale 0.85
	Species "Demon"
	States
    {
    Spawn:
		BRMN A 0
		BRMN A 0 ACS_NamedExecuteAlways("WOC Monster Init",0,60,WOC_STATUSIMMUNE)
		Goto Idle
	}
}

Actor _Centaur : NewCentaur
{
	-TELESTOMP
	Height 56
	Scale 0.9
	dropitem "ArtiEmptyFlask" 64
    dropitem "ArtiMaroonFlask" 16
    dropitem "ReagentRed" 64
	Species "Demon"
	States
	{
	Spawn:
		CENT A 0
		CENT A 0 ACS_NamedExecuteAlways("WOC Monster Init",0,68,WOC_STAT)//increase health on higher difficulties
		Goto Idle
	Raise:
		TNT1 A 0 ACS_NamedExecuteAlways("WOC Monster Init",0,68,WOC_STAT)
		CENT SRQPONMLK 4
		goto See
	}
}

Actor _CentaurLeader : NewCentaurLeader
{
	-TELESTOMP
	Health 400
	+BOSSDEATH
	dropitem "ArtiEmptyFlask" 32
    dropitem "ArtiBlueFlask" 32  
    dropitem "ReagentRed" 64
	//Translation "48:79=%[0.00,0.00,0.00]:[1.50,0.94,0.39]", "80:111=%[0.00,0.00,0.00]:[0.63,0.68,1.35]"
	Species "Arachnotron"
	States
	{
	Spawn:
		SLGH A 0
		SLGH A 0 ACS_NamedExecuteAlways("WOC Monster Init",0,75,WOC_STAT)
		Goto Idle
	Raise:
		TNT1 A 0 ACS_NamedExecuteAlways("WOC Monster Init",0,75,WOC_STAT)
		SLGH SRQPONMLK 4
		goto See
	}
}

Actor _FireDemon : NewFireDemon
{
	-TELESTOMP
	-INVULNERABLE
	Scale 0.85
	SeeSound "FireDemonActive"
	Species "ShotgunGuy"
	States
	{
	Spawn:
		FDMN X 0 Bright
		FDMN X 0 ACS_NamedExecuteAlways("WOC Monster Init",0,52,0)
	Idle:
		FDMN AB 10 Bright A_LookEx(0, 0, 0, 0, 0, "Chase")
		Loop
	Missile:
       FDMN K 3 Bright A_FaceTarget
	   TNT1 A 0 A_FaceTarget
	   TNT1 A 0 A_PlaySound("FireDemonAttack")
       FDMN K 5 Bright A_CustomMissile("FireDemonMissile",26)
	   TNT1 A 0 A_FaceTarget
	   TNT1 A 0 A_PlaySound("FireDemonAttack")
       FDMN K 5 Bright A_CustomMissile("FireDemonMissile",26)
	   TNT1 A 0 A_FaceTarget
	   TNT1 A 0 A_PlaySound("FireDemonAttack")
       FDMN K 5 Bright A_CustomMissile("FireDemonMissile",26)
       Goto Chase
	}
}

Actor _FireDemonQueen : FireDemonQueen
{
	-TELESTOMP
	-INVULNERABLE
	Scale 0.85
	SeeSound "FireDemonActive"
	Species "ShotgunGuy"
	States
	{
	Spawn:
		FDNQ X 0 Bright
		FDNQ X 0 ACS_NamedExecuteAlways("WOC Monster Init",0,52,WOC_STATUSIMMUNE)
	Idle:
		FDNQ AB 10 Bright A_LookEx(0, 0, 0, 0, 0, "Chase")
		Loop
	Missile:
		TNT1 A 0 A_Jump(48,28)
		FDNQ K 3 Bright A_FaceTarget
		TNT1 A 0 A_PlaySound("FireDemonAttack")
		FDNQ K 4 Bright A_CustomMissile("FireDemonQueenMissile",26)
		TNT1 A 0 A_FaceTarget
		TNT1 A 0 A_PlaySound("FireDemonAttack")
		FDNQ K 4 Bright A_CustomMissile("FireDemonQueenMissile",26)
		TNT1 A 0 A_FaceTarget
		TNT1 A 0 A_PlaySound("FireDemonAttack")
		FDNQ K 4 Bright A_CustomMissile("FireDemonQueenMissile",26)
		TNT1 A 0 A_FaceTarget
		TNT1 A 0 A_PlaySound("FireDemonAttack")
		FDNQ K 4 Bright A_CustomMissile("FireDemonQueenMissile",26)
		TNT1 A 0 A_FaceTarget
		TNT1 A 0 A_PlaySound("FireDemonAttack")
		FDNQ K 4 Bright A_CustomMissile("FireDemonQueenMissile",26)
		TNT1 A 0 A_FaceTarget
		TNT1 A 0 A_PlaySound("FireDemonAttack")
		FDNQ K 4 Bright A_CustomMissile("FireDemonQueenMissile",26)
		TNT1 A 0 A_FaceTarget
		TNT1 A 0 A_PlaySound("FireDemonAttack")
		FDNQ K 4 Bright A_CustomMissile("FireDemonQueenMissile",26)
		TNT1 A 0 A_FaceTarget
		TNT1 A 0 A_PlaySound("FireDemonAttack")
		FDNQ K 4 Bright A_CustomMissile("FireDemonQueenMissile",26)
		TNT1 A 0 A_FaceTarget
		TNT1 A 0 A_PlaySound("FireDemonAttack")
		FDNQ K 4 Bright A_CustomMissile("FireDemonQueenMissile",26)
		Goto Chase
		TNT1 A 0 Thing_Stop(0)
		TNT1 A 0 A_KillChildren
		TNT1 A 0 A_UnSetShootable
		FDNQ AAAAAAAAA 1 Bright A_FadeOut(0.10)
		FDNQ A 1 Bright A_SetTranslucent(0.0)
		TNT1 A 0 A_SpawnItemEx("_FireDemonQueenClone",-50,100,0,0,0,0,0,16)
		TNT1 A 0 A_SpawnItemEx("_FireDemonQueenClone",50,-100,0,0,0,0,0,16)
		TNT1 A 0 A_SpawnItemEx("_FireDemonQueenClone",100,100,0,0,0,0,0,16)
		TNT1 A 0 A_SpawnItemEx("_FireDemonQueenClone",-100,-50,0,0,0,0,0,16)
		FDNQ AAAAAAAAAA 1 Bright A_FadeIn(0.10)
		TNT1 A 0 A_SetShootable
		Goto Chase
	}
}

Actor _FireDemonQueenClone : FireDemonQueenClone
{
	-TELESTOMP
	-INVULNERABLE
	Scale 0.85
	Species "ShotgunGuy"
	States
	{
	Spawn:
		FNDQ A 0
		FNDQ A 0 ACS_NamedExecuteAlways("WOC Monster Init",0,52,WOC_STATUSIMMUNE)
		FDNQ AAAAAAA 1 Bright A_FadeIn(0.10)
		Goto Chase
	Missile:
		FDNQ K 3 Bright A_FaceTarget
		TNT1 A 0 A_PlaySound("FireDemonAttack")
		FDNQ K 4 Bright A_CustomMissile("FireDemonQueenMissile",26)
		TNT1 A 0 A_FaceTarget
		TNT1 A 0 A_PlaySound("FireDemonAttack")
		FDNQ K 4 Bright A_CustomMissile("FireDemonQueenMissile",26)
		TNT1 A 0 A_FaceTarget
		TNT1 A 0 A_PlaySound("FireDemonAttack")
		FDNQ K 4 Bright A_CustomMissile("FireDemonQueenMissile",26)
		Goto Chase
	}
}

Actor _Demon1 : NewDemon1
{
	-TELESTOMP
	Scale 0.9
	Height 56
	Radius 20
	Health 350
	Species "Revenant"
	States
	{
	Spawn:
		DEMN A 0
		DEMN A 0 ACS_NamedExecuteAlways("WOC Monster Init",0,84,0)
		Goto Idle
	Missile:
		DEMN E 0 A_Jump(128,"Breath")
		DEMN E 5 A_FaceTarget
		DEMN F 6 A_FaceTarget
		DEMN G 5 A_CustomMissile("Demon3FX", 62, 0)
		Goto See
	Breath:
		DEMN G 0 A_JumpIfCloser(300, 1)
		Goto Missile+1
		DEMN G 5 A_FaceTarget
		DEMN G 0 A_FaceTarget
		DEMN G 2 A_CustomMissile("Demon3Jet", 62, 0, FRandom(-5,5))
		DEMN G 0 A_FaceTarget
		DEMN G 2 A_CustomMissile("Demon3Jet", 62, 0, FRandom(-5,5))
		DEMN G 0 A_FaceTarget
		DEMN G 2 A_CustomMissile("Demon3Jet", 62, 0, FRandom(-5,5))
		DEMN G 0 A_FaceTarget
		DEMN G 2 A_CustomMissile("Demon3Jet", 62, 0, FRandom(-5,5))
		DEMN G 0 A_FaceTarget
		DEMN G 2 A_CustomMissile("Demon3Jet", 62, 0, FRandom(-5,5))
		DEMN G 0 A_FaceTarget
		DEMN G 2 A_CustomMissile("Demon3Jet", 62, 0, FRandom(-5,5))
		DEMN G 0 A_FaceTarget
		DEMN G 2 A_CustomMissile("Demon3Jet", 62, 0, FRandom(-5,5))
		DEMN G 0 A_FaceTarget
		DEMN G 2 A_CustomMissile("Demon3Jet", 62, 0, FRandom(-5,5))
		DEMN G 0 A_FaceTarget
		DEMN G 2 A_CustomMissile("Demon3Jet", 62, 0, FRandom(-5,5))
		DEMN G 0 A_FaceTarget
		DEMN G 2 A_CustomMissile("Demon3Jet", 62, 0, FRandom(-5,5))
		Goto See
	Raise:
		DEMN E 0 ACS_NamedExecuteAlways("WOC Monster Init",0,84,0)
		DEMN PONMLKJIH 6 
		goto See
	}
}

Actor _Demon2 : NewDemon2
{
	-TELESTOMP
	Scale 0.9
	Height 56
	Radius 20
	Health 350
	Species "Revenant"
	States
	{
	Spawn:
		DEM2 A 0
		DEM2 A 0 ACS_NamedExecuteAlways("WOC Monster Init",0,84,0)
		Goto Idle
	Missile:
		DEM2 E 0 A_Jump(128,"Breath")
		DEM2 E 5 A_FaceTarget
		DEM2 F 6 A_FaceTarget
		DEM2 G 5 A_CustomMissile("Demon4FX", 62, 0)
		Goto See
	Breath:
		DEM2 G 0 A_JumpIfCloser(300, 1)
		Goto Missile+1
		DEM2 G 5 A_FaceTarget
		DEM2 G 0 A_FaceTarget
		DEM2 G 2 A_CustomMissile("Demon4Jet", 62, 0, FRandom(-5,5))
		DEM2 G 0 A_FaceTarget
		DEM2 G 2 A_CustomMissile("Demon4Jet", 62, 0, FRandom(-5,5))
		DEM2 G 0 A_FaceTarget
		DEM2 G 2 A_CustomMissile("Demon4Jet", 62, 0, FRandom(-5,5))
		DEM2 G 0 A_FaceTarget
		DEM2 G 2 A_CustomMissile("Demon4Jet", 62, 0, FRandom(-5,5))
		DEM2 G 0 A_FaceTarget
		DEM2 G 2 A_CustomMissile("Demon4Jet", 62, 0, FRandom(-5,5))
		DEM2 G 0 A_FaceTarget
		DEM2 G 2 A_CustomMissile("Demon4Jet", 62, 0, FRandom(-5,5))
		DEM2 G 0 A_FaceTarget
		DEM2 G 2 A_CustomMissile("Demon4Jet", 62, 0, FRandom(-5,5))
		DEM2 G 0 A_FaceTarget
		DEM2 G 2 A_CustomMissile("Demon4Jet", 62, 0, FRandom(-5,5))
		DEM2 G 0 A_FaceTarget
		DEM2 G 2 A_CustomMissile("Demon4Jet", 62, 0, FRandom(-5,5))
		DEM2 G 0 A_FaceTarget
		DEM2 G 2 A_CustomMissile("Demon4Jet", 62, 0, FRandom(-5,5))
		Goto See
	Raise:
		DEM2 E 0 ACS_NamedExecuteAlways("WOC Monster Init",0,84,0)
		DEM2 PONMLKJIH 6 
		goto See
	}
}

Actor _Demon5 : Demon5
{
	-TELESTOMP
	Scale 0.9
	Height 56
	Radius 20
	Species "Revenant"
	States
	{
	Spawn:
		DEM5 A 0
		DEM5 A 0 ACS_NamedExecuteAlways("WOC Monster Init",0,84,WOC_STATUSIMMUNE)
		Goto Idle
	Missile:
		DEM5 E 5 A_FaceTarget
		DEM5 F 6 A_FaceTarget
		DEM5 G 0 A_Jump(128,6)
		DEM5 G 0 A_CustomMissile ("Demon5FX1", 62, 0, -10)
		DEM5 G 0 A_CustomMissile ("Demon5FX1", 62, 0, 0)
		DEM5 G 0 A_CustomMissile ("Demon5FX1", 62, 0, -20)
		DEM5 G 0 A_CustomMissile ("Demon5FX1", 62, 0, 20)
		DEM5 G 5 A_CustomMissile ("Demon5FX1", 62, 0, 10)
		Goto See
		DEM5 G 2 A_CustomMissile("Demon5Jet", 62, 0)
		DEM5 G 2 A_CustomMissile("Demon5Jet", 62, 0)
		DEM5 G 2 A_CustomMissile("Demon5Jet", 62, 0)
		DEM5 G 2 A_CustomMissile("Demon5Jet", 62, 0)
		DEM5 G 2 A_CustomMissile("Demon5Jet", 62, 0)
		DEM5 G 2 A_CustomMissile("Demon5Jet", 62, 0)
		DEM5 G 2 A_CustomMissile("Demon5Jet", 62, 0)
		DEM5 G 2 A_CustomMissile("Demon5Jet", 62, 0)
		DEM5 G 2 A_CustomMissile("Demon5Jet", 62, 0)
		DEM5 G 2 A_CustomMissile("Demon5Jet", 62, 0)
		Goto See
	}
}

Actor _Bishop : NewBishop replaces Bishop
{
	-TELESTOMP
	Scale 0.875
	Height 56
	Radius 20
	Health 250
	Species "Cacodemon"
	States
	{
	Spawn:
		BISH A 0
		BISH A 0 ACS_NamedExecuteAlways("WOC Monster Init",0,56,0)
		Goto Idle
	Raise:
		BISH O 0 ACS_NamedExecuteAlways("WOC Monster Init",0,56,0)
		BISH ON 5 
		BISH MLKJIH 5 Bright
		BISH G 5
		goto See
	}
}

Actor _Vampire : Vampire
{
	-TELESTOMP
	Scale 0.875
	Height 56
	Radius 20
	Health 325
	Species "Cacodemon"
	States
	{
	Spawn:
		VAM1 A 0
		VAM1 A 0 ACS_NamedExecuteAlways("WOC Monster Init",0,56,0)
		Goto Idle
	Raise:
		VAM1 O 0 ACS_NamedExecuteAlways("WOC Monster Init",0,56,0)
		VAM1 ON 5 
		VAM1 MLKJIH 5 Bright
		VAM1 G 5
		goto See
	}
}

Actor _VampirePainBlur : VampirePainBlur replaces VampirePainBlur { Scale 0.875 }

Actor _VampireBlur : VampireBlur replaces VampireBlur { Scale 0.875 }

Actor _DarkPatriarch : DarkPatriarch
{
	-TELESTOMP
	Scale 0.875
	Height 56
	Radius 20
	Species "Cacodemon"
}

Actor _DarkPatriarchClone : DarkPatriarchClone replaces DarkPatriarchClone
{
	-TELESTOMP
	Scale 0.875
	Height 56
	Radius 20
	Species "Cacodemon"
}

Actor _PatriarchBlur : PatriarchBlur replaces PatriarchBlur { Scale 0.875 }

Actor _NewSorcFX3 : SorcFX3 replaces SorcFX3
{
	Height 56
	Radius 20
	/*+NODAMAGETHRUST*/
	+DONTFALL
	States
    {
    Spawn:
		SBS3 ABC 2 Bright
		Loop
    Death:
		SBS3 A 2 Bright A_SetTranslucent(1,1)
		SBS3 A 0 Bright A_SpawnItemEx("_HeresiarchNewBishop",0,0,0,0,0,0,0,SXF_SETMASTER)
		SBS3 DEFGH 2 Bright
		Stop
    }
}

Actor _HeresiarchNewBishop : HeresiarchNewBishop replaces HeresiarchNewBishop
{
	-TELESTOMP
	Scale 0.875
	Height 56
	Radius 20
	Health 250
	Species "Cyberdemon"
	States
	{
	Spawn:
		BISH A 0
		BISH A 0 ACS_NamedExecuteAlways("WOC Monster Init",0,56,WOC_MINIONSUMMON)
		BISH P 4
		BISH ON 4
		BISH MLKJIH 3
		BISH G 3
		Goto Idle
	Raise:
		BISH O 0 ACS_NamedExecuteAlways("WOC Monster Init",0,56,WOC_MINIONSUMMON)
		BISH ON 5 
		BISH MLKJIH 5 Bright
		BISH G 5
		goto See
	}
}

Actor _BishopBlur : BishopBlur replaces BishopBlur { Scale 0.875 }

Actor _BishopPainBlur : BishopPainBlur replaces BishopPainBlur { Scale 0.875 }

Actor _Wraith : NewWraith
{
	-TELESTOMP
	Health 300
	Species "Cacodemon"
	States
	{
	Spawn:
		WRTH A 0
		WRTH A 0 ACS_NamedExecuteAlways("WOC Monster Init",0,55,0)
		Goto Look
	Raise:
		WRTH R 0 ACS_NamedExecuteAlways("WOC Monster Init",0,55,0)
		WRTH RQPONMLKJI 5
		goto See
	}
}

Actor _Ghostie : Ghostie
{
	-TELESTOMP
	Health 350
	Species "Cacodemon"
	States
	{
	Spawn:
		GOST A 0
		GOST A 0 ACS_NamedExecuteAlways("WOC Monster Init",0,55,0)
		Goto Look
	Raise:
		GOST R 0 ACS_NamedExecuteAlways("WOC Monster Init",0,55,0)
		GOST RQPONMLKJI 5
		goto See
	}
}

Actor _IceGuy : NewIceGuy
{
	-TELESTOMP
	Height 64
	Radius 30
	Scale 0.95
	Health 650
	+BOSSDEATH
	Species "Fatso"
	States
	{
	Spawn:
		ICEY A 0
		ICEY A 0 ACS_NamedExecuteAlways("WOC Monster Init",0,72,0)
	Idle:
		ICEY A 10 A_IceGuyLook
		Loop
	}
}

ACTOR _Dragon
{
	Health 3000
	Speed 20
	Height 65
	Radius 36
	Mass 0x7fffffff
	Monster
	+NOGRAVITY
	+FLOAT
	+NOBLOOD
	+BOSS
	+DONTMORPH
	+NOTARGET
	+NOICEDEATH
	+BOSSDEATH
	+NOFEAR
	SeeSound "DragonSight"
	AttackSound "DragonAttack"
	PainSound "DragonPain"
	DeathSound "DragonDeath"
	ActiveSound "DragonActive"
	Obituary "$OB_DRAGON"
	DamageFactor "Deathblow", 0
	+NOTARGET
	+DONTHARMSPECIES
	+LOOKALLAROUND
	+USEKILLSCRIPTS
	Damagefactor "PoisonCloud", 0.25
	DropItem "AccessoryRandomSpawner" 16
	Damagetype "Physical"
	Species "Cyberdemon"
	Tag "Death Wyvern"
	DamageFactor "Holy", 1.5
	DamageFactor "HolyPlayer", 1.5
	DamageFactor "HolyTime", 1.5
	DamageFactor "PoisonTime", 0.0
	DamageFactor "Bleed", 0.0
  States
  {
  Spawn:
	DRAG D 0
	DRAG D 0 ACS_NamedExecuteAlways("WOC Monster Init",0,65,WOC_STATUSIMMUNE|WOC_MAXLEVEL)
  Idle:
    DRAG D 10 A_Look
    Loop
  See:
    DRAG AABB 2 A_Chase
	DRAG C 0 A_PlaySound("DragonWingflap")
	DRAG CCDDCCBB 2 A_Chase
	DRAG AABB 2 A_Chase
	DRAG C 0 A_PlaySound("DragonWingflap")
	DRAG CCDDCCBB 2 A_Chase
    Loop
  Missile:
	DRAG E 0 A_FaceTarget
    DRAG E 0 A_CustomMissile("DragonFireball")
	DRAG E 0 A_SpidRefire
	DRAG E 0 A_Wander
	DRAG E 2 A_FaceTarget
	DRAG E 0 A_Wander
	DRAG E 2 A_FaceTarget
	DRAG E 0 A_Wander
	DRAG E 2 A_FaceTarget
	DRAG E 0 A_Wander
	DRAG E 2 A_FaceTarget
	DRAG E 0 A_Jump(128, "See")
    Loop
  Death:
    DRAG G 5 A_ScreamAndUnblock
    DRAG H 4
    DRAG I 4 A_BossDeath
    DRAG J 4 A_JumpIf (z <= floorz, "Crash")
    Wait
  Crash:
    DRAG KL 5
	DRAG M 0 A_SetFloorClip
    DRAG M -1 A_BossDeath
    Stop
  }
}

Actor _Korax
{
	Health 10000
	Damagefactor "PoisonCloud", 0.25
	DamageFactor "Deathblow", 0
	BloodColor "0 78 0"
	+NOPAIN
	+NEVERRESPAWN
	+NOTARGET
	Speed 10
	Radius 65
	Height 100
	Mass 2000
	Damage 15
	Monster
	+BOSS
	+FLOORCLIP
	+DONTMORPH
	+NOTARGET
	+NOICEDEATH
	+BOSSDEATH
	+NOFEAR
	+MISSILEMORE
	+MISSILEEVENMORE
	+QUICKTORETALIATE
	+DONTHARMSPECIES
	+LOOKALLAROUND
	+USEKILLSCRIPTS
	Minmissilechance 32
	DropItem "AccessoryRandomSpawner" 16
	SeeSound "KoraxSight"
	AttackSound "KoraxAttack"
	PainSound "KoraxPain"
	DeathSound "KoraxDeath"
	ActiveSound "KoraxActive"
	Obituary "$OB_KORAX" // "%o was swept from the board by Korax."
	Species "Cyberdemon"
	Tag "Korax"
	DamageFactor "Shadow", 0.75
	DamageFactor "ShadowPlayer", 0.75
	DamageFactor "ShadowTime", 0.75
	DamageFactor "Holy", 1.25
	DamageFactor "HolyPlayer", 1.25
	DamageFactor "HolyTime", 1.25
	DamageFactor "Poison", 0.75
	DamageFactor "PoisonPlayer", 0.75
	DamageFactor "PoisonTime", 0.75
	States
    {
	Spawn:
		KORX A 0
		KORX A 0 ACS_NamedExecuteAlways("WOC Monster Init",0,115,WOC_STAT|WOC_STATUSIMMUNE|WOC_MAXLEVEL)
	Idle:
		KORX A 5 A_Look
		Loop
	See:
		KORX AAA 3 A_Chase
		KORX B 3 A_Chase
		KORX BBB 3 A_Chase
		KORX C 0 A_PlaySound("KoraxStep")
		KORX C 3 A_Chase
		KORX CCC 3 A_Chase
		KORX D 3 A_Chase
		KORX DDD 3 A_Chase
		KORX A 0 A_PlaySound("KoraxStep")
		KORX A 3 A_Chase
		Loop
	Pain:
		KORX H 5 A_Pain
		KORX H 5
		Goto See
	Missile:
		KORX E 6 Bright A_FaceTarget
		KORX E 0 A_PlaySound("KoraxAttack")
		TNT1 A 0 A_Jump(256, "Spikes", "Meteor", "Wraith", "DemonFX1", "DemonFX2", "Firedemon", "Centaur", "Serpent", "IceGuy", "BaronOfHell")
		Goto See
	Meteor:
		KORX W 10 A_FaceTarget
		KORX W 0 A_PlaySound("KoraxCommand")
		KORX G 15 Bright A_CustomMissile("KoraxMeteorSpawner")
		Goto See
	Spikes:
		KORX W 10 A_FaceTarget
		KORX W 0 A_PlaySound("KoraxCommand")
		KORX G 15 Bright A_CustomMissile("KoraxSpikeShot", 32)
		Goto See
	Serpent:
		KORX A 0 A_CustomMissile ("SerpentFX", 55, -52, 0, 4, 0)
		KORX A 0 A_CustomMissile ("SerpentFX", 55, 52, 0, 4, 0)
		KORX A 0 A_CustomMissile ("SerpentFX", 82, -52, 0, 4, 0)
		KORX A 0 A_CustomMissile ("SerpentFX", 82, 52, 0, 4, 0)
		KORX A 0 A_CustomMissile ("SerpentFX", 110, -35, 0, 4, 0)
		KORX F 6 A_CustomMissile ("SerpentFX", 110, 35, 0, 4, 0)
		KORX E 4 Bright A_FaceTarget
		Goto See
	Wraith:
		KORX A 0 A_CustomMissile ("WraithFX1", 55, -52, 0, 4, 0)
		KORX A 0 A_CustomMissile ("WraithFX1", 55, 52, 0, 4, 0)
		KORX A 0 A_CustomMissile ("WraithFX1", 82, -52, 0, 4, 0)
		KORX A 0 A_CustomMissile ("WraithFX1", 82, 52, 0, 4, 0)
		KORX A 0 A_CustomMissile ("WraithFX1", 110, -35, 0, 4, 0)
		KORX F 6 A_CustomMissile ("WraithFX1", 110, 35, 0, 4, 0)
		KORX E 4 Bright A_FaceTarget
		Goto See
	DemonFX1:
		KORX A 0 A_CustomMissile ("Demon1FX1", 55, -52, 0, 4, 0)
		KORX A 0 A_CustomMissile ("Demon1FX1", 55, 52, 0, 4, 0)
		KORX A 0 A_CustomMissile ("Demon1FX1", 82, -52, 0, 4, 0)
		KORX A 0 A_CustomMissile ("Demon1FX1", 82, 52, 0, 4, 0)
		KORX A 0 A_CustomMissile ("Demon1FX1", 110, -35, 0, 4, 0)
		KORX F 6 A_CustomMissile ("Demon1FX1", 110, 35, 0, 4, 0)
		KORX E 4 Bright A_FaceTarget
		Goto See
	DemonFX2:
		KORX A 0 A_CustomMissile ("Demon2FX1", 55, -52, 0, 4, 0)
		KORX A 0 A_CustomMissile ("Demon2FX1", 55, 52, 0, 4, 0)
		KORX A 0 A_CustomMissile ("Demon2FX1", 82, -52, 0, 4, 0)
		KORX A 0 A_CustomMissile ("Demon2FX1", 82, 52, 0, 4, 0)
		KORX A 0 A_CustomMissile ("Demon2FX1", 110, -35, 0, 4, 0)
		KORX F 6 A_CustomMissile ("Demon2FX1", 110, 35, 0, 4, 0)
		KORX E 4 Bright A_FaceTarget
		Goto See
	FireDemon:
		KORX A 0 A_CustomMissile ("Firedemonmissile", 55, -52, 0, 4, 0)
		KORX A 0 A_CustomMissile ("Firedemonmissile", 55, 52, 0, 4, 0)
		KORX A 0 A_CustomMissile ("Firedemonmissile", 82, -52, 0, 4, 0)
		KORX A 0 A_CustomMissile ("Firedemonmissile", 82, 52, 0, 4, 0)
		KORX A 0 A_CustomMissile ("Firedemonmissile", 110, -35, 0, 4, 0)
		KORX F 6 A_CustomMissile ("Firedemonmissile", 110, 35, 0, 4, 0)
		KORX E 4 Bright A_FaceTarget
		Goto See
	Centaur:
		KORX A 0 A_CustomMissile ("CentaurFX", 55, -52, 0, 4, 0)
		KORX A 0 A_CustomMissile ("CentaurFX", 55, 52, 0, 4, 0)
		KORX A 0 A_CustomMissile ("CentaurFX", 82, -52, 0, 4, 0)
		KORX A 0 A_CustomMissile ("CentaurFX", 82, 52, 0, 4, 0)
		KORX A 0 A_CustomMissile ("CentaurFX", 110, -35, 0, 4, 0)
		KORX F 6 A_CustomMissile ("CentaurFX", 110, 35, 0, 4, 0)
		KORX E 4 Bright A_FaceTarget
		Goto See
	IceGuy:
		KORX A 0 A_CustomMissile ("NewIceGuyFX", 55, -52, 0, 4, 0)
		KORX A 0 A_CustomMissile ("NewIceGuyFX", 55, 52, 0, 4, 0)
		KORX A 0 A_CustomMissile ("NewIceGuyFX", 82, -52, 0, 4, 0)
		KORX A 0 A_CustomMissile ("NewIceGuyFX", 82, 52, 0, 4, 0)
		KORX A 0 A_CustomMissile ("NewIceGuyFX", 110, -35, 0, 4, 0)
		KORX F 6 A_CustomMissile ("NewIceGuyFX", 110, 35, 0, 4, 0)
		KORX E 4 Bright A_FaceTarget
		Goto See
	BaronOfHell:
		KORX A 0 A_CustomMissile ("NewBaronBall", 55, -52, 0, 4, 0)
		KORX A 0 A_CustomMissile ("NewBaronBall", 55, 52, 0, 4, 0)
		KORX A 0 A_CustomMissile ("NewBaronBall", 82, -52, 0, 4, 0)
		KORX A 0 A_CustomMissile ("NewBaronBall", 82, 52, 0, 4, 0)
		KORX A 0 A_CustomMissile ("NewBaronBall", 110, -35, 0, 4, 0)
		KORX F 6 A_CustomMissile ("NewBaronBall", 110, 35, 0, 4, 0)
		KORX E 4 Bright A_FaceTarget
		Goto See
	Death:
		KORX I 1 A_SpawnItemEx ("KaGas", 0, 0,0,random(-9,9),random(-9,9),random(5,9), 48, 128)
        KORX I 1 A_SpawnItemEx ("KaGas", 0, 0,0,random(-9,9),random(-9,9),random(5,9), 48, 128)
        KORX I 1 A_SpawnItemEx ("KaGas", 0, 0,0,random(-9,9),random(-9,9),random(5,9), 48, 128)
        KORX I 1 A_SpawnItemEx ("KaGas", 0, 0,0,random(-9,9),random(-9,9),random(5,9), 48, 128)
        KORX I 1 A_SpawnItemEx ("KaGas", 0, 0,0,random(-9,9),random(-9,9),random(5,9), 48, 128)
        KORX I 1 A_SpawnItemEx ("KaGas", 0, 0,0,random(-9,9),random(-9,9),random(5,9), 48, 128)
        KORX I 1 A_SpawnItemEx ("KaGas", 0, 0,0,random(-9,9),random(-9,9),random(5,9), 48, 128)
        KORX I 1 A_SpawnItemEx ("KaGas", 0, 0,0,random(-9,9),random(-9,9),random(5,9), 48, 128)
        KORX I 1 A_SpawnItemEx ("KaGas", 0, 0,0,random(-9,9),random(-9,9),random(5,9), 48, 128)
        KORX I 1 A_SpawnItemEx ("KaGas", 0, 0,0,random(-9,9),random(-9,9),random(5,9), 48, 128)
        KORX I 1 A_SpawnItemEx ("KaGas", 0, 0,0,random(-9,9),random(-9,9),random(5,9), 48, 128)
        KORX I 1 A_SpawnItemEx ("KaGas", 0, 0,0,random(-9,9),random(-9,9),random(5,9), 48, 128)
        KORX I 1 A_SpawnItemEx ("KaGas", 0, 0,0,random(-9,9),random(-9,9),random(5,9), 48, 128)
        KORX I 1 A_SpawnItemEx ("KaGas", 0, 0,0,random(-9,9),random(-9,9),random(5,9), 48, 128)
        KORX I 1 A_SpawnItemEx ("KaGas", 0, 0,0,random(-9,9),random(-9,9),random(5,9), 48, 128)
        KORX I 1 A_SpawnItemEx ("KaGas", 0, 0,0,random(-9,9),random(-9,9),random(5,9), 48, 128)
        KORX I 1 A_SpawnItemEx ("KaGas", 0, 0,0,random(-9,9),random(-9,9),random(5,9), 48, 128)
        KORX I 1 A_SpawnItemEx ("KaGas", 0, 0,0,random(-9,9),random(-9,9),random(5,9), 48, 128)
        KORX I 1 A_SpawnItemEx ("KaGas", 0, 0,0,random(-9,9),random(-9,9),random(5,9), 48, 128)
        KORX I 1 A_SpawnItemEx ("KaGas", 0, 0,0,random(-9,9),random(-9,9),random(5,9), 48, 128)
        KORX I 1 A_SpawnItemEx ("KaGas", 0, 0,0,random(-9,9),random(-9,9),random(5,9), 48, 128)
        KORX I 1 A_SpawnItemEx ("KaGas", 0, 0,0,random(-9,9),random(-9,9),random(5,9), 48, 128)
        KORX I 1 A_SpawnItemEx ("KaGas", 0, 0,0,random(-9,9),random(-9,9),random(5,9), 48, 128)
        KORX I 1 A_SpawnItemEx ("KaGas", 0, 0,0,random(-9,9),random(-9,9),random(5,9), 48, 128)
        KORX I 1 A_SpawnItemEx ("KaGas", 0, 0,0,random(-9,9),random(-9,9),random(5,9), 48, 128)
        KORX I 1 A_SpawnItemEx ("KaGas", 0, 0,0,random(-9,9),random(-9,9),random(5,9), 48, 128)
        KORX I 1 A_SpawnItemEx ("KaGas", 0, 0,0,random(-9,9),random(-9,9),random(5,9), 48, 128)
        KORX I 1 A_SpawnItemEx ("KaGas", 0, 0,0,random(-9,9),random(-9,9),random(5,9), 48, 128)
        KORX I 1 A_SpawnItemEx ("KaGas", 0, 0,0,random(-9,9),random(-9,9),random(5,9), 48, 128)
        KORX I 1 A_SpawnItemEx ("KaGas", 0, 0,0,random(-9,9),random(-9,9),random(5,9), 48, 128)
        KORX I 1 A_SpawnItemEx ("KaGas", 0, 0,0,random(-9,9),random(-9,9),random(5,9), 48, 128)
        KORX I 1 A_SpawnItemEx ("KaGas", 0, 0,0,random(-9,9),random(-9,9),random(5,9), 48, 128)
        KORX I 1 A_SpawnItemEx ("KaGas", 0, 0,0,random(-9,9),random(-9,9),random(5,9), 48, 128)
        KORX I 1 A_SpawnItemEx ("KaGas", 0, 0,0,random(-9,9),random(-9,9),random(5,9), 48, 128)
        KORX I 1 A_SpawnItemEx ("KaGas", 0, 0,0,random(-9,9),random(-9,9),random(5,9), 48, 128)
        KORX I 1 A_SpawnItemEx ("KaGas", 0, 0,0,random(-9,9),random(-9,9),random(5,9), 48, 128)
        KORX I 1 A_SpawnItemEx ("KaGas", 0, 0,0,random(-9,9),random(-9,9),random(5,9), 48, 128)
        KORX I 1 A_SpawnItemEx ("KaGas", 0, 0,0,random(-9,9),random(-9,9),random(5,9), 48, 128)
        KORX I 1 A_SpawnItemEx ("KaGas", 0, 0,0,random(-9,9),random(-9,9),random(5,9), 48, 128)
        KORX I 1 A_SpawnItemEx ("KaGas", 0, 0,0,random(-9,9),random(-9,9),random(5,9), 48, 128)
        KORX I 1 A_SpawnItemEx ("KaGas", 0, 0,0,random(-9,9),random(-9,9),random(5,9), 48, 128)
        KORX I 1 A_SpawnItemEx ("KaGas", 0, 0,0,random(-9,9),random(-9,9),random(5,9), 48, 128)
        KORX I 1 A_SpawnItemEx ("KaGas", 0, 0,0,random(-9,9),random(-9,9),random(5,9), 48, 128)
        KORX I 1 A_SpawnItemEx ("KaGas", 0, 0,0,random(-9,9),random(-9,9),random(5,9), 48, 128)
        KORX I 1 A_SpawnItemEx ("KaGas", 0, 0,0,random(-9,9),random(-9,9),random(5,9), 48, 128)
        KORX I 1 A_SpawnItemEx ("KaGas", 0, 0,0,random(-9,9),random(-9,9),random(5,9), 48, 128)
        KORX I 1 A_SpawnItemEx ("KaGas", 0, 0,0,random(-9,9),random(-9,9),random(5,9), 48, 128)
        KORX I 1 A_SpawnItemEx ("KaGas", 0, 0,0,random(-9,9),random(-9,9),random(5,9), 48, 128)
        KORX I 1 A_SpawnItemEx ("KaGas", 0, 0,0,random(-9,9),random(-9,9),random(5,9), 48, 128)
        KORX I 1 A_SpawnItemEx ("KaGas", 0, 0,0,random(-9,9),random(-9,9),random(5,9), 48, 128)
        KORX I 1 A_SpawnItemEx ("KaGas", 0, 0,0,random(-9,9),random(-9,9),random(5,9), 48, 128)
        KORX I 1 A_SpawnItemEx ("KaGas", 0, 0,0,random(-9,9),random(-9,9),random(5,9), 48, 128)
        KORX I 1 A_SpawnItemEx ("KaGas", 0, 0,0,random(-9,9),random(-9,9),random(5,9), 48, 128)
        KORX I 1 A_SpawnItemEx ("KaGas", 0, 0,0,random(-9,9),random(-9,9),random(5,9), 48, 128)
        KORX I 1 A_SpawnItemEx ("KaGas", 0, 0,0,random(-9,9),random(-9,9),random(5,9), 48, 128)
        KORX I 1 A_SpawnItemEx ("KaGas", 0, 0,0,random(-9,9),random(-9,9),random(5,9), 48, 128)
        KORX I 1 A_SpawnItemEx ("KaGas", 0, 0,0,random(-9,9),random(-9,9),random(5,9), 48, 128)
        KORX I 1 A_SpawnItemEx ("KaGas", 0, 0,0,random(-9,9),random(-9,9),random(5,9), 48, 128)
        KORX I 1 A_SpawnItemEx ("KaGas", 0, 0,0,random(-9,9),random(-9,9),random(5,9), 48, 128)
        KORX I 1 A_SpawnItemEx ("KaGas", 0, 0,0,random(-9,9),random(-9,9),random(5,9), 48, 128)
        KORX I 1 A_SpawnItemEx ("KaGas", 0, 0,0,random(-9,9),random(-9,9),random(5,9), 48, 128)
        KORX I 1 A_SpawnItemEx ("KaGas", 0, 0,0,random(-9,9),random(-9,9),random(5,9), 48, 128)
        KORX I 1 A_SpawnItemEx ("KaGas", 0, 0,0,random(-9,9),random(-9,9),random(5,9), 48, 128)
        KORX I 1 A_SpawnItemEx ("KaGas", 0, 0,0,random(-9,9),random(-9,9),random(5,9), 48, 128)
        KORX I 1 A_SpawnItemEx ("KaGas", 0, 0,0,random(-9,9),random(-9,9),random(5,9), 48, 128)
        KORX I 1 A_SpawnItemEx ("KaGas", 0, 0,0,random(-9,9),random(-9,9),random(5,9), 48, 128)
        KORX I 1 A_SpawnItemEx ("KaGas", 0, 0,0,random(-9,9),random(-9,9),random(5,9), 48, 128)
		KORX J 5 A_FaceTarget
		KORX K 5 A_Scream
		KORX LMNOP 5
		KORX Q 10
		KORX R 0 A_CustomMissile("InstaWraithVerge")
		KORX R 1 A_SpawnItemEx ("KaGas", 0, 0,0,random(-9,9),random(-9,9),random(5,9), 48, 128)
		KORX R 1 A_SpawnItemEx ("KaGas", 0, 0,0,random(-9,9),random(-9,9),random(5,9), 48, 128)
		KORX R 1 A_SpawnItemEx ("KaGas", 0, 0,0,random(-9,9),random(-9,9),random(5,9), 48, 128)
		KORX R 1 A_SpawnItemEx ("KaGas", 0, 0,0,random(-9,9),random(-9,9),random(5,9), 48, 128)
		KORX R 1 A_SpawnItemEx ("KaGas", 0, 0,0,random(-9,9),random(-9,9),random(5,9), 48, 128)
		KORX R 1 A_SpawnItemEx ("KaGas", 0, 0,0,random(-9,9),random(-9,9),random(5,9), 48, 128)
		KORX R 1 A_SpawnItemEx ("KaGas", 0, 0,0,random(-9,9),random(-9,9),random(5,9), 48, 128)
		KORX S 5 A_NoBlocking
		KORX TU 5
		KORX V -1 A_BossDeath
		Stop
	}
}

ACTOR InstaWraithVerge : HolyMissile
{
  Speed 0
  Radius 15
  Height 8
  Damage 0
  Damagetype "Holy"
  States
  {
  Spawn:
    SPIR PPPP 0 Bright
  Death:
    SPIR P 1 Bright A_CHolyAttack2
    Stop
  }
}

ACTOR KoraxMeteorSpawner
{
	Radius 8
	Height 8
	Speed 500
	Damage 0
	PROJECTILE
	+SKYEXPLODE
	RENDERSTYLE ADD
	ALPHA 0.80
	var int user_count;
	States
	{
	Spawn:
		TNT1 A 1
		Loop
	Death:
		TNT1 A 0 A_JumpIf(user_count > 9, "Disappear")
		TNT1 A 0 A_SetUserVar("user_count", user_count+1)
		TNT1 A 0 A_CustomMissile("KoraxFireballSpawner",0,0,0,6)
		TNT1 A 0 A_CustomMissile("KoraxFireballSpawner",0,0,90,6)
		TNT1 A 0 A_CustomMissile("KoraxFireballSpawner",0,0,180,6)
		TNT1 A 0 A_CustomMissile("KoraxFireballSpawner",0,0,270,6)
		TNT1 A 35
		Loop
	Disappear:
		TNT1 A 1
		Stop
	}
}

ACTOR KoraxFireballSpawner
{
	Radius 0
	Height 32
	Speed 16
        RenderStyle NONE
	Alpha 0.85
	PROJECTILE
        +CEILINGHUGGER
        +NOCLIP
        SeeSound "weapons/diasht"
	states
	{
	Spawn:
           TNT1 AAA 1 
		   TNT1 A 0 A_CustomMissile("KoraxFireball",-16,0,0,6,0)
		   TNT1 AAA 1 
		   TNT1 A 0 A_CustomMissile("KoraxFireball",-16,0,0,6,0)
		   TNT1 AAA 1 
		   TNT1 A 0 A_CustomMissile("KoraxFireball",-16,0,0,6,0)
		   TNT1 AAA 1
		   TNT1 A 0 A_CustomMissile("KoraxFireball",-16,0,0,6,0)
		   TNT1 AAA 1 
		   TNT1 A 0 A_CustomMissile("KoraxFireball",-16,0,0,6,0)
		   TNT1 AAA 1 
		   TNT1 A 0 A_CustomMissile("KoraxFireball",-16,0,0,6,0)
		   TNT1 AAA 1 
		   TNT1 A 0 A_CustomMissile("KoraxFireball",-16,0,0,6,0)
		   TNT1 AAA 1 
		   TNT1 A 0 A_CustomMissile("KoraxFireball",-16,0,0,6,0)
		   TNT1 AAA 1 
		   TNT1 A 0 A_CustomMissile("KoraxFireball",-16,0,0,6,0)
		   TNT1 AAA 1 
		   TNT1 A 0 A_CustomMissile("KoraxFireball",-16,0,0,6,0)
           TNT1 A 0
           TNT1 A 0
	   stop
	}
}

ACTOR KoraxFireball : FireBall
{
	Speed 0
	Damage (ACS_NamedExecuteWithResult("WOC Monster Damage Scale",WOCTARGET,FRandom(8,28)))
	DamageType "Fire"
	-NOGRAVITY
	+SPAWNCEILING
	+NODAMAGETHRUST
	Gravity 1
	RenderStyle Add
	Deathsound "Mage/PilarOfFlameBall/Impact"
	States
	{
	Spawn:
		FBL1 AAAABBBB 1 Bright //A_SpawnItemEx("PillarOfFlameBallTrail", Random(-2, 2), Random(-2, 2), Random(-2, 2), 0, 0, 0, 0, 128)
		Loop
	Death:
		XPL1 ABCDEF 2 Bright
		Stop
	}
}

ACTOR KoraxSpikeShot
{
	Radius 20
	Height 10
	Speed 15
	Damage 0
	ReactionTime 100
	PROJECTILE
	RENDERSTYLE Normal
	+RIPPER
	+FLOORHUGGER
	+THRUGHOST
	+MTHRUSPECIES
	+BLOODLESSIMPACT +NODAMAGETHRUST +DONTBLAST
	-NOGRAVITY
	DeathSound "weapons/stab"
	States
	{
	Spawn:
		TNT1 A 4 A_SpawnItemEx("KoraxSpike", 0, 0, 0, 0, 0, 0, 0, SXF_NOCHECKPOSITION)
		TNT1 A 0 A_Countdown
		loop
	Death:
		TNT1 A 2 Bright
		stop
	}
}

Actor KoraxSpike
{
	Height 84
	+NODAMAGETHRUST +DONTBLAST
	PROJECTILE
	+RIPPER
	-NOBLOCKMAP
	//+SOLID
	+DONTSPLASH
	Radius 20
	Damage (0)
	+BLOODLESSIMPACT
	+THRUSPECIES
	+DONTREFLECT
	+EXTREMEDEATH
	Species "Cyberdemon"
	var int user_count;
	States
	{
	Spawn:
		TNT1 A 2
		SPKD D 0 A_ChangeFlag("Solid", 1)
		SPKD D 0 A_Explode(ACS_NamedExecuteWithResult("WOC Monster Damage Scale",WOCTARGET,500),20,0,0,20)
		SPKD D 0 A_PlaySound("ThrustSpikeRaise")
		SPKD AAABBBCCCDDDEEEFFFGGGHHH 1
	Looper:
		SPKD I 0 A_JumpIf(user_count > 35*10, "BAI")
		SPKD I 1 A_SetUserVar(user_count, user_count+1)
		Loop
	BAI:
		SPKD D 0 A_PlaySound("ThrustSpikeLower")
		SPKD IIHHGGFFEEDDCCBBAA 1
		Stop
	}
}

ACTOR _Heresiarch
{ 
	Health 10000
	Speed 20
	Radius 40 
	Height 110 
	Mass 0x7FFFFFFF
	PainChance 0
	DamageFactor "Deathblow", 0
	DamageFactor "PoisonCloud", 0.25
	DropItem "AccessoryRandomSpawner" 16
	DropItem "NewArtiBoostMana" 64
	MONSTER
	+FLOORCLIP
	+BOSS
	+DONTMORPH
	+NOTARGET
	+NOICEDEATH
	+NOFEAR
	+NOBLOODDECALS
	+MISSILEMORE
	+DONTHARMSPECIES
	+NOTARGET
	+NOPAIN
	+LOOKALLAROUND
	+BOSSDEATH
	Bloodtype "EtherealBloodPurple"
	Obituary "%o had %p bones rolled by the Heresiarch."
	SeeSound "SorcererSight"
	PainSound "SorcererPain"
	DeathSound "SorcererDeathScream"
	ActiveSound "SorcererActive"
	Species "Cyberdemon"
	Tag "Heresiarch"
	var int user_count;
	DamageFactor "Arcane", 0.75
	DamageFactor "ArcanePlayer", 0.75
	DamageFactor "ArcaneTime", 0.75
	DamageFactor "Physical", 1.25
	DamageFactor "PhysicalPlayer", 1.25
	DamageFactor "Bleed", 1.25
	DamageFactor "Poison", 1.25
	DamageFactor "PoisonPlayer", 1.25
	DamageFactor "PoisonTime", 1.25
	States 
	{ 
	Spawn:
		TNT1 A 0
		TNT1 A 0 ACS_NamedExecuteAlways("WOC Monster Init", 0, 100,WOC_STAT|WOC_STATUSIMMUNE|WOC_MAXLEVEL)
		TNT1 A 0 ACS_ExecuteAlways(964, 0, 4)
	
		TNT1 A 0 ACS_ExecuteAlways(968, 0, 0)
	Idle:
		SORC AB 10 A_Look 
		Loop 
	See:
		SORC A 5 A_Chase
		SORC B 5 A_Chase
		SORC C 5 A_Chase
		SORC D 5 A_Chase
		TNT1 A 0 //A_ChangeFlag("NOPAIN" 0)
		Loop
	Pain:
		SORC G 8 //A_ChangeFlag("NOPAIN" 1)
		SORC G 8 A_Pain
	Goto See
	Missile:
		SORC F 0 ACS_ExecuteAlways(967, 0, 0)
		SORC F 0 A_SetUserVar("user_count", 0)
	Decide:
		SORC F 0 A_JumpIf(user_count == 7, "FinishDecide")
		SORC FF 5 Bright A_FaceTarget
		TNT1 A 0 A_JumpIf(user_count == 6, "SkipLastSound")
		SORC F 0 A_PlaySound("SorcererBallWoosh", CHAN_AUTO)
	SkipLastSound:
		SORC F 0 A_SetUserVar("user_count", user_count + 1)
		Goto Decide
	FinishDecide:
		SORC F 0 A_SetUserVar("user_count", 0)
		SORC F 0 A_PlaySound("SorcererSpellCast")
		SORC F 0 A_JumpIfInventory("HersheyGotShield", 1, "HasShield")
		SORC F 0 A_JumpIf(ACS_ExecuteWithResult(971), "Reconsider2")
		// no shield => make shield 80% of time, otherwise whiplash 80% of the time
		SORC F 0 //A_Jump(204, "MakeShield")
		SORC F 0 A_Jump(256, "Whiplash", "RedHead", "MakeShield")
		Goto RedHead
	HasShield:
		SORC F 0 A_JumpIf(ACS_ExecuteWithResult(971), "Reconsider1")
		SORC F 0 A_Jump(204, "Whiplash")
		Goto RedHead
	Reconsider1:
		// has shield, health is low
		SORC F 0 A_Jump(204, "MakeBishop")
		SORC F 0 A_Jump(128, "Whiplash")
		Goto RedHead
	Reconsider2:
		// no shield, health is low
		SORC F 0 A_Jump(160, "MakeBishop", "MakeShield")
		SORC F 0 A_Jump(128, "Whiplash")
		Goto RedHead
	MakeShield:
		SORC E 0 A_PlaySound("SorcererSpellCast", CHAN_AUTO)
		SORC E 0 A_GiveInventory("HersheyGotShield", 1)
		SORC E 0 A_SetReflectiveInvulnerable
		SORC E 0 ACS_ExecuteAlways(968, 0, 1)
		SORC E 0 ACS_ExecuteAlways(972)
		SORC E 0 ACS_ExecuteAlways(967, 0, 1)
		SORC EE 2 Bright A_FaceTarget
		SORC E 0 ACS_ExecuteAlways(967, 0, 2)
		TNT1 A 0 //A_ChangeFlag("NOPAIN" 0)
		Goto See
	RedHead:
		SORC E 0 ACS_ExecuteAlways(967, 0, 1)
		SORC E 0 A_CustomMissile("ZSorcFX1", 32, 0, 26, CMF_AIMDIRECTION, 10)
		SORC E 0 A_CustomMissile("ZSorcFX1", 32, 0, -26, CMF_AIMDIRECTION, 10)
		SORC EE 2 Bright A_FaceTarget
		SORC E 0 ACS_ExecuteAlways(967, 0, 2)
		TNT1 A 0 //A_ChangeFlag("NOPAIN" 0)
		Goto See
	Whiplash:
		SORC E 0 ACS_ExecuteAlways(967, 0, 1)
	WhiplashLoop:
		SORC E 0 A_JumpIf(user_count == 18, "WhiplashFinish")
		SORC E 0 A_PlaySound("SorcererSpellCast", CHAN_AUTO)
		SORC E 0 A_SpawnItem("ZSorcSpark1", 5, 72)
		SORC E 2 Bright A_CustomMissile ("ZSorcFX4", 32, 0, 20 * sin(15 * user_count), CMF_OFFSETPITCH, -4)
		SORC E 0 A_FaceTarget
		SORC E 0 A_SetUserVar("user_count", user_count + 1)
		Loop
	WhiplashFinish:
		SORC E 0 ACS_ExecuteAlways(967, 0, 2)
		TNT1 A 0 //A_ChangeFlag("NOPAIN" 0)
		Goto See
	MakeBishop:
		SORC E 0 ACS_ExecuteAlways(967, 0, 1)
		SORC E 0 A_CustomMissile("ZSorcFX3", 32, 0, Random(-90, 90), CMF_AIMDIRECTION, -5)
		SORC E 0 A_PlaySound("SorcererSpellCast")
		SORC EE 2 Bright A_FaceTarget
		SORC E 0 ACS_ExecuteAlways(967, 0, 2)
		TNT1 A 0 //A_ChangeFlag("NOPAIN" 0)
		Goto See
	Death:
		SORC H 0 ACS_ExecuteAlways(967, 0, 3)
		SORC H 0 A_CustomMissile("SorcBall1Projectile", 100, 0, 0 + random(-30, 30), CMF_AIMDIRECTION)
		SORC H 0 A_CustomMissile("SorcBall2Projectile", 100, 0, 120 + random(-30, 30), CMF_AIMDIRECTION)
		SORC H 0 A_CustomMissile("SorcBall3Projectile", 100, 0, 240 + random(-30, 30), CMF_AIMDIRECTION)
		SORC H 5
		SORC I 5 Bright A_FaceTarget
		SORC I 5 A_Scream
		SORC I 1 A_SpawnItemEx ("KaZap", 0, 0,0,random(-9,9),random(-9,9),random(5,9), 48, 128)
		SORC I 1 A_SpawnItemEx ("KaBoom", 0, 0,0,random(-9,9),random(-9,9),random(5,9), 48, 128)
		SORC I 1 A_SpawnItemEx ("KaGas", 0, 0,0,random(-9,9),random(-9,9),random(5,9), 48, 128)
		SORC I 1 A_SpawnItemEx ("KaZap", 0, 0,0,random(-9,9),random(-9,9),random(5,9), 48, 128)
		SORC I 1 A_SpawnItemEx ("KaBoom", 0, 0,0,random(-9,9),random(-9,9),random(5,9), 48, 128)
		SORC I 1 A_SpawnItemEx ("KaGas", 0, 0,0,random(-9,9),random(-9,9),random(5,9), 48, 128)
		SORC I 1 A_SpawnItemEx ("KaZap", 0, 0,0,random(-9,9),random(-9,9),random(5,9), 48, 128)
		SORC I 1 A_SpawnItemEx ("KaBoom", 0, 0,0,random(-9,9),random(-9,9),random(5,9), 48, 128)
		SORC I 1 A_SpawnItemEx ("KaGas", 0, 0,0,random(-9,9),random(-9,9),random(5,9), 48, 128)
		SORC I 1 A_SpawnItemEx ("KaZap", 0, 0,0,random(-9,9),random(-9,9),random(5,9), 48, 128)
		SORC I 1 A_SpawnItemEx ("KaBoom", 0, 0,0,random(-9,9),random(-9,9),random(5,9), 48, 128)
		SORC I 1 A_SpawnItemEx ("KaGas", 0, 0,0,random(-9,9),random(-9,9),random(5,9), 48, 128)
		SORC I 1 A_SpawnItemEx ("KaZap", 0, 0,0,random(-9,9),random(-9,9),random(5,9), 48, 128)
		SORC I 1 A_SpawnItemEx ("KaBoom", 0, 0,0,random(-9,9),random(-9,9),random(5,9), 48, 128)
		SORC I 1 A_SpawnItemEx ("KaGas", 0, 0,0,random(-9,9),random(-9,9),random(5,9), 48, 128)
		SORC I 1 A_SpawnItemEx ("KaZap", 0, 0,0,random(-9,9),random(-9,9),random(5,9), 48, 128)
		SORC I 1 A_SpawnItemEx ("KaBoom", 0, 0,0,random(-9,9),random(-9,9),random(5,9), 48, 128)
		SORC I 1 A_SpawnItemEx ("KaGas", 0, 0,0,random(-9,9),random(-9,9),random(5,9), 48, 128)
		SORC I 1 A_SpawnItemEx ("KaZap", 0, 0,0,random(-9,9),random(-9,9),random(5,9), 48, 128)
		SORC I 1 A_SpawnItemEx ("KaBoom", 0, 0,0,random(-9,9),random(-9,9),random(5,9), 48, 128)
		SORC I 1 A_SpawnItemEx ("KaGas", 0, 0,0,random(-9,9),random(-9,9),random(5,9), 48, 128)
		SORC I 1 A_SpawnItemEx ("KaZap", 0, 0,0,random(-9,9),random(-9,9),random(5,9), 48, 128)
		SORC I 1 A_SpawnItemEx ("KaBoom", 0, 0,0,random(-9,9),random(-9,9),random(5,9), 48, 128)
		SORC I 1 A_SpawnItemEx ("KaZap", 0, 0,0,random(-9,9),random(-9,9),random(5,9), 48, 128)
		SORC I 1 A_SpawnItemEx ("KaBoom", 0, 0,0,random(-9,9),random(-9,9),random(5,9), 48, 128)
		SORC I 1 A_SpawnItemEx ("KaGas", 0, 0,0,random(-9,9),random(-9,9),random(5,9), 48, 128)
		SORC I 1 A_SpawnItemEx ("KaZap", 0, 0,0,random(-9,9),random(-9,9),random(5,9), 48, 128)
		SORC I 1 A_SpawnItemEx ("KaBoom", 0, 0,0,random(-9,9),random(-9,9),random(5,9), 48, 128)
		SORC I 1 A_SpawnItemEx ("KaGas", 0, 0,0,random(-9,9),random(-9,9),random(5,9), 48, 128)
		SORC I 1 A_SpawnItemEx ("KaZap", 0, 0,0,random(-9,9),random(-9,9),random(5,9), 48, 128)
		SORC I 1 A_SpawnItemEx ("KaBoom", 0, 0,0,random(-9,9),random(-9,9),random(5,9), 48, 128)
		SORC I 1 A_SpawnItemEx ("KaGas", 0, 0,0,random(-9,9),random(-9,9),random(5,9), 48, 128)
		SORC J 5 //A_Scream
		SORC KLMNOPQRST 5
		SORC U 5 A_NoBlocking
		SORC VWXY 5
		SORC Z -1 A_BossDeath
		Stop
	} 
}

Actor HersheyBallSet : Inventory {
	inventory.maxamount 1
}

Actor HersheyDead : Inventory {
	inventory.maxamount 1
}

Actor HersheyAttack : Inventory {
	inventory.maxamount 1
}

Actor HersheyOnAttack : Inventory {
	inventory.maxamount 1
}

Actor HersheyGotShield : Inventory {
	inventory.maxamount 1
}

Actor RevertStates : CustomInventory {
	inventory.maxamount 1
	+ALWAYSPICKUP
	+AUTOACTIVATE
	States {
		Pickup:
			TNT1 A 0 A_UnsetReflectiveInvulnerable
			TNT1 A 0 A_TakeInventory("HersheyGotShield", 1)
		Stop
	}
}

Actor ZSorcBallBase {
    +NOGRAVITY
    +NOCLIP
	+NOINTERACTION
    Radius 2
    Height 2
	Speed 16
}

Actor SorcBall1New : ZSorcBallBase {
	+CLIENTSIDEONLY
	var int user_angle;
	States {
		Spawn:
			TNT1 A 0
			TNT1 A 0 A_SetUserVar("user_angle", 0)
			TNT1 A 0 ACS_ExecuteAlways(970, 0, 0, 1, 32)
		SpawnLoop:
			SBMP A 1 ACS_ExecuteAlways(970, 0, 1, 1, 32)
			TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(969) == -2, "Death")
			TNT1 A 0 A_SetUserVar("user_angle", user_angle + 2 * ACS_ExecuteWithResult(969))
			SBMP A 1 ACS_ExecuteAlways(970, 0, 1, 1, 32)
			TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(969) == -2, "Death")
			TNT1 A 0 A_SetUserVar("user_angle", user_angle + 2 * ACS_ExecuteWithResult(969))			
			SBMP B 1 ACS_ExecuteAlways(970, 0, 1, 1, 32)
			TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(969) == -2, "Death")
			TNT1 A 0 A_SetUserVar("user_angle", user_angle + 2 * ACS_ExecuteWithResult(969))		
			SBMP B 1 ACS_ExecuteAlways(970, 0, 1, 1, 32)
			TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(969) == -2, "Death")
			TNT1 A 0 A_SetUserVar("user_angle", user_angle + 2 * ACS_ExecuteWithResult(969))	
			SBMP C 1 ACS_ExecuteAlways(970, 0, 1, 1, 32)
			TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(969) == -2, "Death")
			TNT1 A 0 A_SetUserVar("user_angle", user_angle + 2 * ACS_ExecuteWithResult(969))		
			SBMP C 1 ACS_ExecuteAlways(970, 0, 1, 1, 32)
			TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(969) == -2, "Death")
			TNT1 A 0 A_SetUserVar("user_angle", user_angle + 2 * ACS_ExecuteWithResult(969))					
			SBMP D 1 ACS_ExecuteAlways(970, 0, 1, 1, 32)
			TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(969) == -2, "Death")
			TNT1 A 0 A_SetUserVar("user_angle", user_angle + 2 * ACS_ExecuteWithResult(969))
			SBMP D 1 ACS_ExecuteAlways(970, 0, 1, 1, 32)
			TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(969) == -2, "Death")
			TNT1 A 0 A_SetUserVar("user_angle", user_angle + 2 * ACS_ExecuteWithResult(969))					
			SBMP E 1 ACS_ExecuteAlways(970, 0, 1, 1, 32)
			TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(969) == -2, "Death")
			TNT1 A 0 A_SetUserVar("user_angle", user_angle + 2 * ACS_ExecuteWithResult(969))		
			SBMP E 1 ACS_ExecuteAlways(970, 0, 1, 1, 32)
			TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(969) == -2, "Death")
			TNT1 A 0 A_SetUserVar("user_angle", user_angle + 2 * ACS_ExecuteWithResult(969))				
			SBMP F 1 ACS_ExecuteAlways(970, 0, 1, 1, 32)
			TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(969) == -2, "Death")
			TNT1 A 0 A_SetUserVar("user_angle", user_angle + 2 * ACS_ExecuteWithResult(969))			
			SBMP F 1 ACS_ExecuteAlways(970, 0, 1, 1, 32)
			TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(969) == -2, "Death")
			TNT1 A 0 A_SetUserVar("user_angle", user_angle + 2 * ACS_ExecuteWithResult(969))				
			SBMP G 1 ACS_ExecuteAlways(970, 0, 1, 1, 32)
			TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(969) == -2, "Death")
			TNT1 A 0 A_SetUserVar("user_angle", user_angle + 2 * ACS_ExecuteWithResult(969))			
			SBMP G 1 ACS_ExecuteAlways(970, 0, 1, 1, 32)
			TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(969) == -2, "Death")
			TNT1 A 0 A_SetUserVar("user_angle", user_angle + 2 * ACS_ExecuteWithResult(969))	
			SBMP H 1 ACS_ExecuteAlways(970, 0, 1, 1, 32)
			TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(969) == -2, "Death")
			TNT1 A 0 A_SetUserVar("user_angle", user_angle + 2 * ACS_ExecuteWithResult(969))			
			SBMP H 1 ACS_ExecuteAlways(970, 0, 1, 1, 32)
			TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(969) == -2, "Death")
			TNT1 A 0 A_SetUserVar("user_angle", user_angle + 2 * ACS_ExecuteWithResult(969))	
			SBMP I 1 ACS_ExecuteAlways(970, 0, 1, 1, 32)
			TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(969) == -2, "Death")
			TNT1 A 0 A_SetUserVar("user_angle", user_angle + 2 * ACS_ExecuteWithResult(969))			
			SBMP I 1 ACS_ExecuteAlways(970, 0, 1, 1, 32)
			TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(969) == -2, "Death")
			TNT1 A 0 A_SetUserVar("user_angle", user_angle + 2 * ACS_ExecuteWithResult(969))		
			SBMP J 1 ACS_ExecuteAlways(970, 0, 1, 1, 32)
			TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(969) == -2, "Death")
			TNT1 A 0 A_SetUserVar("user_angle", user_angle + 2 * ACS_ExecuteWithResult(969))		
			SBMP J 1 ACS_ExecuteAlways(970, 0, 1, 1, 32)
			TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(969) == -2, "Death")
			TNT1 A 0 A_SetUserVar("user_angle", user_angle + 2 * ACS_ExecuteWithResult(969))	
			SBMP K 1 ACS_ExecuteAlways(970, 0, 1, 1, 32)
			TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(969) == -2, "Death")
			TNT1 A 0 A_SetUserVar("user_angle", user_angle + 2 * ACS_ExecuteWithResult(969))		
			SBMP K 1 ACS_ExecuteAlways(970, 0, 1, 1, 32)
			TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(969) == -2, "Death")
			TNT1 A 0 A_SetUserVar("user_angle", user_angle + 2 * ACS_ExecuteWithResult(969))		
			SBMP L 1 ACS_ExecuteAlways(970, 0, 1, 1, 32)
			TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(969) == -2, "Death")
			TNT1 A 0 A_SetUserVar("user_angle", user_angle + 2 * ACS_ExecuteWithResult(969))		
			SBMP L 1 ACS_ExecuteAlways(970, 0, 1, 1, 32)
			TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(969) == -2, "Death")
			TNT1 A 0 A_SetUserVar("user_angle", user_angle + 2 * ACS_ExecuteWithResult(969))		
			SBMP M 1 ACS_ExecuteAlways(970, 0, 1, 1, 32)
			TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(969) == -2, "Death")
			TNT1 A 0 A_SetUserVar("user_angle", user_angle + 2 * ACS_ExecuteWithResult(969))	
			SBMP M 1 ACS_ExecuteAlways(970, 0, 1, 1, 32)
			TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(969) == -2, "Death")
			TNT1 A 0 A_SetUserVar("user_angle", user_angle + 2 * ACS_ExecuteWithResult(969))	
			SBMP N 1 ACS_ExecuteAlways(970, 0, 1, 1, 32)
			TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(969) == -2, "Death")
			TNT1 A 0 A_SetUserVar("user_angle", user_angle + 2 * ACS_ExecuteWithResult(969))	
			SBMP N 1 ACS_ExecuteAlways(970, 0, 1, 1, 32)
			TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(969) == -2, "Death")
			TNT1 A 0 A_SetUserVar("user_angle", user_angle + 2 * ACS_ExecuteWithResult(969))	
			SBMP O 1 ACS_ExecuteAlways(970, 0, 1, 1, 32)
			TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(969) == -2, "Death")
			TNT1 A 0 A_SetUserVar("user_angle", user_angle + 2 * ACS_ExecuteWithResult(969))			
			SBMP O 1 ACS_ExecuteAlways(970, 0, 1, 1, 32)
			TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(969) == -2, "Death")
			TNT1 A 0 A_SetUserVar("user_angle", user_angle + 2 * ACS_ExecuteWithResult(969))	
			SBMP P 1 ACS_ExecuteAlways(970, 0, 1, 1, 32)
			TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(969) == -2, "Death")
			TNT1 A 0 A_SetUserVar("user_angle", user_angle + 2 * ACS_ExecuteWithResult(969))		
			SBMP P 1 ACS_ExecuteAlways(970, 0, 1, 1, 32)
			TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(969) == -2, "Death")
			TNT1 A 0 A_SetUserVar("user_angle", user_angle + 2 * ACS_ExecuteWithResult(969))	
		Loop
		Death:
			TNT1 A 1
		Stop
	}
}

Actor SorcBall2New : ZSorcBallBase {
	+CLIENTSIDEONLY
	var int user_angle;
	States {
		Spawn:
			TNT1 A 0
			TNT1 A 0 A_SetUserVar("user_angle", 60)
			TNT1 A 0 ACS_ExecuteAlways(970, 0, 0, 2, 32)
		SpawnLoop:
			SBMB A 1 ACS_ExecuteAlways(970, 0, 1, 2, 32)
			TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(969) == -2, "Death")
			TNT1 A 0 A_SetUserVar("user_angle", user_angle + 2 * ACS_ExecuteWithResult(969))
			SBMB A 1 ACS_ExecuteAlways(970, 0, 1, 2, 32)
			TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(969) == -2, "Death")
			TNT1 A 0 A_SetUserVar("user_angle", user_angle + 2 * ACS_ExecuteWithResult(969))			
			SBMB B 1 ACS_ExecuteAlways(970, 0, 1, 2, 32)
			TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(969) == -2, "Death")
			TNT1 A 0 A_SetUserVar("user_angle", user_angle + 2 * ACS_ExecuteWithResult(969))		
			SBMB B 1 ACS_ExecuteAlways(970, 0, 1, 2, 32)
			TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(969) == -2, "Death")
			TNT1 A 0 A_SetUserVar("user_angle", user_angle + 2 * ACS_ExecuteWithResult(969))	
			SBMB C 1 ACS_ExecuteAlways(970, 0, 1, 2, 32)
			TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(969) == -2, "Death")
			TNT1 A 0 A_SetUserVar("user_angle", user_angle + 2 * ACS_ExecuteWithResult(969))		
			SBMB C 1 ACS_ExecuteAlways(970, 0, 1, 2, 32)
			TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(969) == -2, "Death")
			TNT1 A 0 A_SetUserVar("user_angle", user_angle + 2 * ACS_ExecuteWithResult(969))					
			SBMB D 1 ACS_ExecuteAlways(970, 0, 1, 2, 32)
			TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(969) == -2, "Death")
			TNT1 A 0 A_SetUserVar("user_angle", user_angle + 2 * ACS_ExecuteWithResult(969))
			SBMB D 1 ACS_ExecuteAlways(970, 0, 1, 2, 32)
			TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(969) == -2, "Death")
			TNT1 A 0 A_SetUserVar("user_angle", user_angle + 2 * ACS_ExecuteWithResult(969))					
			SBMB E 1 ACS_ExecuteAlways(970, 0, 1, 2, 32)
			TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(969) == -2, "Death")
			TNT1 A 0 A_SetUserVar("user_angle", user_angle + 2 * ACS_ExecuteWithResult(969))		
			SBMB E 1 ACS_ExecuteAlways(970, 0, 1, 2, 32)
			TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(969) == -2, "Death")
			TNT1 A 0 A_SetUserVar("user_angle", user_angle + 2 * ACS_ExecuteWithResult(969))				
			SBMB F 1 ACS_ExecuteAlways(970, 0, 1, 2, 32)
			TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(969) == -2, "Death")
			TNT1 A 0 A_SetUserVar("user_angle", user_angle + 2 * ACS_ExecuteWithResult(969))			
			SBMB F 1 ACS_ExecuteAlways(970, 0, 1, 2, 32)
			TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(969) == -2, "Death")
			TNT1 A 0 A_SetUserVar("user_angle", user_angle + 2 * ACS_ExecuteWithResult(969))				
			SBMB G 1 ACS_ExecuteAlways(970, 0, 1, 2, 32)
			TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(969) == -2, "Death")
			TNT1 A 0 A_SetUserVar("user_angle", user_angle + 2 * ACS_ExecuteWithResult(969))			
			SBMB G 1 ACS_ExecuteAlways(970, 0, 1, 2, 32)
			TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(969) == -2, "Death")
			TNT1 A 0 A_SetUserVar("user_angle", user_angle + 2 * ACS_ExecuteWithResult(969))	
			SBMB H 1 ACS_ExecuteAlways(970, 0, 1, 2, 32)
			TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(969) == -2, "Death")
			TNT1 A 0 A_SetUserVar("user_angle", user_angle + 2 * ACS_ExecuteWithResult(969))			
			SBMB H 1 ACS_ExecuteAlways(970, 0, 1, 2, 32)
			TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(969) == -2, "Death")
			TNT1 A 0 A_SetUserVar("user_angle", user_angle + 2 * ACS_ExecuteWithResult(969))	
			SBMB I 1 ACS_ExecuteAlways(970, 0, 1, 2, 32)
			TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(969) == -2, "Death")
			TNT1 A 0 A_SetUserVar("user_angle", user_angle + 2 * ACS_ExecuteWithResult(969))			
			SBMB I 1 ACS_ExecuteAlways(970, 0, 1, 2, 32)
			TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(969) == -2, "Death")
			TNT1 A 0 A_SetUserVar("user_angle", user_angle + 2 * ACS_ExecuteWithResult(969))		
			SBMB J 1 ACS_ExecuteAlways(970, 0, 1, 2, 32)
			TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(969) == -2, "Death")
			TNT1 A 0 A_SetUserVar("user_angle", user_angle + 2 * ACS_ExecuteWithResult(969))		
			SBMB J 1 ACS_ExecuteAlways(970, 0, 1, 2, 32)
			TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(969) == -2, "Death")
			TNT1 A 0 A_SetUserVar("user_angle", user_angle + 2 * ACS_ExecuteWithResult(969))	
			SBMB K 1 ACS_ExecuteAlways(970, 0, 1, 2, 32)
			TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(969) == -2, "Death")
			TNT1 A 0 A_SetUserVar("user_angle", user_angle + 2 * ACS_ExecuteWithResult(969))		
			SBMB K 1 ACS_ExecuteAlways(970, 0, 1, 2, 32)
			TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(969) == -2, "Death")
			TNT1 A 0 A_SetUserVar("user_angle", user_angle + 2 * ACS_ExecuteWithResult(969))		
			SBMB L 1 ACS_ExecuteAlways(970, 0, 1, 2, 32)
			TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(969) == -2, "Death")
			TNT1 A 0 A_SetUserVar("user_angle", user_angle + 2 * ACS_ExecuteWithResult(969))		
			SBMB L 1 ACS_ExecuteAlways(970, 0, 1, 2, 32)
			TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(969) == -2, "Death")
			TNT1 A 0 A_SetUserVar("user_angle", user_angle + 2 * ACS_ExecuteWithResult(969))		
			SBMB M 1 ACS_ExecuteAlways(970, 0, 1, 2, 32)
			TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(969) == -2, "Death")
			TNT1 A 0 A_SetUserVar("user_angle", user_angle + 2 * ACS_ExecuteWithResult(969))	
			SBMB M 1 ACS_ExecuteAlways(970, 0, 1, 2, 32)
			TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(969) == -2, "Death")
			TNT1 A 0 A_SetUserVar("user_angle", user_angle + 2 * ACS_ExecuteWithResult(969))	
			SBMB N 1 ACS_ExecuteAlways(970, 0, 1, 2, 32)
			TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(969) == -2, "Death")
			TNT1 A 0 A_SetUserVar("user_angle", user_angle + 2 * ACS_ExecuteWithResult(969))	
			SBMB N 1 ACS_ExecuteAlways(970, 0, 1, 2, 32)
			TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(969) == -2, "Death")
			TNT1 A 0 A_SetUserVar("user_angle", user_angle + 2 * ACS_ExecuteWithResult(969))	
			SBMB O 1 ACS_ExecuteAlways(970, 0, 1, 2, 32)
			TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(969) == -2, "Death")
			TNT1 A 0 A_SetUserVar("user_angle", user_angle + 2 * ACS_ExecuteWithResult(969))			
			SBMB O 1 ACS_ExecuteAlways(970, 0, 1, 2, 32)
			TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(969) == -2, "Death")
			TNT1 A 0 A_SetUserVar("user_angle", user_angle + 2 * ACS_ExecuteWithResult(969))	
			SBMB P 1 ACS_ExecuteAlways(970, 0, 1, 2, 32)
			TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(969) == -2, "Death")
			TNT1 A 0 A_SetUserVar("user_angle", user_angle + 2 * ACS_ExecuteWithResult(969))		
			SBMB P 1 ACS_ExecuteAlways(970, 0, 1, 2, 32)
			TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(969) == -2, "Death")
			TNT1 A 0 A_SetUserVar("user_angle", user_angle + 2 * ACS_ExecuteWithResult(969))	
		Loop
		Death:
			TNT1 A 1
		Stop
	}
}

Actor SorcBall3New : ZSorcBallBase {
	+CLIENTSIDEONLY
	var int user_angle;
	States {
		Spawn:
			TNT1 A 0
			TNT1 A 0 A_SetUserVar("user_angle", 120)
			TNT1 A 0 ACS_ExecuteAlways(970, 0, 0, 3, 32)
		SpawnLoop:
			SBMG A 1 ACS_ExecuteAlways(970, 0, 1, 3, 32)
			TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(969) == -2, "Death")
			TNT1 A 0 A_SetUserVar("user_angle", user_angle + 2 * ACS_ExecuteWithResult(969))
			SBMG A 1 ACS_ExecuteAlways(970, 0, 1, 3, 32)
			TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(969) == -2, "Death")
			TNT1 A 0 A_SetUserVar("user_angle", user_angle + 2 * ACS_ExecuteWithResult(969))			
			SBMG B 1 ACS_ExecuteAlways(970, 0, 1, 3, 32)
			TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(969) == -2, "Death")
			TNT1 A 0 A_SetUserVar("user_angle", user_angle + 2 * ACS_ExecuteWithResult(969))		
			SBMG B 1 ACS_ExecuteAlways(970, 0, 1, 3, 32)
			TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(969) == -2, "Death")
			TNT1 A 0 A_SetUserVar("user_angle", user_angle + 2 * ACS_ExecuteWithResult(969))	
			SBMG C 1 ACS_ExecuteAlways(970, 0, 1, 3, 32)
			TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(969) == -2, "Death")
			TNT1 A 0 A_SetUserVar("user_angle", user_angle + 2 * ACS_ExecuteWithResult(969))		
			SBMG C 1 ACS_ExecuteAlways(970, 0, 1, 3, 32)
			TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(969) == -2, "Death")
			TNT1 A 0 A_SetUserVar("user_angle", user_angle + 2 * ACS_ExecuteWithResult(969))					
			SBMG D 1 ACS_ExecuteAlways(970, 0, 1, 3, 32)
			TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(969) == -2, "Death")
			TNT1 A 0 A_SetUserVar("user_angle", user_angle + 2 * ACS_ExecuteWithResult(969))
			SBMG D 1 ACS_ExecuteAlways(970, 0, 1, 3, 32)
			TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(969) == -2, "Death")
			TNT1 A 0 A_SetUserVar("user_angle", user_angle + 2 * ACS_ExecuteWithResult(969))					
			SBMG E 1 ACS_ExecuteAlways(970, 0, 1, 3, 32)
			TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(969) == -2, "Death")
			TNT1 A 0 A_SetUserVar("user_angle", user_angle + 2 * ACS_ExecuteWithResult(969))		
			SBMG E 1 ACS_ExecuteAlways(970, 0, 1, 3, 32)
			TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(969) == -2, "Death")
			TNT1 A 0 A_SetUserVar("user_angle", user_angle + 2 * ACS_ExecuteWithResult(969))				
			SBMG F 1 ACS_ExecuteAlways(970, 0, 1, 3, 32)
			TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(969) == -2, "Death")
			TNT1 A 0 A_SetUserVar("user_angle", user_angle + 2 * ACS_ExecuteWithResult(969))			
			SBMG F 1 ACS_ExecuteAlways(970, 0, 1, 3, 32)
			TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(969) == -2, "Death")
			TNT1 A 0 A_SetUserVar("user_angle", user_angle + 2 * ACS_ExecuteWithResult(969))				
			SBMG G 1 ACS_ExecuteAlways(970, 0, 1, 3, 32)
			TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(969) == -2, "Death")
			TNT1 A 0 A_SetUserVar("user_angle", user_angle + 2 * ACS_ExecuteWithResult(969))			
			SBMG G 1 ACS_ExecuteAlways(970, 0, 1, 3, 32)
			TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(969) == -2, "Death")
			TNT1 A 0 A_SetUserVar("user_angle", user_angle + 2 * ACS_ExecuteWithResult(969))	
			SBMG H 1 ACS_ExecuteAlways(970, 0, 1, 3, 32)
			TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(969) == -2, "Death")
			TNT1 A 0 A_SetUserVar("user_angle", user_angle + 2 * ACS_ExecuteWithResult(969))			
			SBMG H 1 ACS_ExecuteAlways(970, 0, 1, 3, 32)
			TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(969) == -2, "Death")
			TNT1 A 0 A_SetUserVar("user_angle", user_angle + 2 * ACS_ExecuteWithResult(969))	
			SBMG I 1 ACS_ExecuteAlways(970, 0, 1, 3, 32)
			TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(969) == -2, "Death")
			TNT1 A 0 A_SetUserVar("user_angle", user_angle + 2 * ACS_ExecuteWithResult(969))			
			SBMG I 1 ACS_ExecuteAlways(970, 0, 1, 3, 32)
			TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(969) == -2, "Death")
			TNT1 A 0 A_SetUserVar("user_angle", user_angle + 2 * ACS_ExecuteWithResult(969))		
			SBMG J 1 ACS_ExecuteAlways(970, 0, 1, 3, 32)
			TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(969) == -2, "Death")
			TNT1 A 0 A_SetUserVar("user_angle", user_angle + 2 * ACS_ExecuteWithResult(969))		
			SBMG J 1 ACS_ExecuteAlways(970, 0, 1, 3, 32)
			TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(969) == -2, "Death")
			TNT1 A 0 A_SetUserVar("user_angle", user_angle + 2 * ACS_ExecuteWithResult(969))	
			SBMG K 1 ACS_ExecuteAlways(970, 0, 1, 3, 32)
			TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(969) == -2, "Death")
			TNT1 A 0 A_SetUserVar("user_angle", user_angle + 2 * ACS_ExecuteWithResult(969))		
			SBMG K 1 ACS_ExecuteAlways(970, 0, 1, 3, 32)
			TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(969) == -2, "Death")
			TNT1 A 0 A_SetUserVar("user_angle", user_angle + 2 * ACS_ExecuteWithResult(969))		
			SBMG L 1 ACS_ExecuteAlways(970, 0, 1, 3, 32)
			TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(969) == -2, "Death")
			TNT1 A 0 A_SetUserVar("user_angle", user_angle + 2 * ACS_ExecuteWithResult(969))		
			SBMG L 1 ACS_ExecuteAlways(970, 0, 1, 3, 32)
			TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(969) == -2, "Death")
			TNT1 A 0 A_SetUserVar("user_angle", user_angle + 2 * ACS_ExecuteWithResult(969))		
			SBMG M 1 ACS_ExecuteAlways(970, 0, 1, 3, 32)
			TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(969) == -2, "Death")
			TNT1 A 0 A_SetUserVar("user_angle", user_angle + 2 * ACS_ExecuteWithResult(969))	
			SBMG M 1 ACS_ExecuteAlways(970, 0, 1, 3, 32)
			TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(969) == -2, "Death")
			TNT1 A 0 A_SetUserVar("user_angle", user_angle + 2 * ACS_ExecuteWithResult(969))	
			SBMG N 1 ACS_ExecuteAlways(970, 0, 1, 3, 32)
			TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(969) == -2, "Death")
			TNT1 A 0 A_SetUserVar("user_angle", user_angle + 2 * ACS_ExecuteWithResult(969))	
			SBMG N 1 ACS_ExecuteAlways(970, 0, 1, 3, 32)
			TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(969) == -2, "Death")
			TNT1 A 0 A_SetUserVar("user_angle", user_angle + 2 * ACS_ExecuteWithResult(969))	
			SBMG O 1 ACS_ExecuteAlways(970, 0, 1, 3, 32)
			TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(969) == -2, "Death")
			TNT1 A 0 A_SetUserVar("user_angle", user_angle + 2 * ACS_ExecuteWithResult(969))			
			SBMG O 1 ACS_ExecuteAlways(970, 0, 1, 3, 32)
			TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(969) == -2, "Death")
			TNT1 A 0 A_SetUserVar("user_angle", user_angle + 2 * ACS_ExecuteWithResult(969))	
			SBMG P 1 ACS_ExecuteAlways(970, 0, 1, 3, 32)
			TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(969) == -2, "Death")
			TNT1 A 0 A_SetUserVar("user_angle", user_angle + 2 * ACS_ExecuteWithResult(969))		
			SBMG P 1 ACS_ExecuteAlways(970, 0, 1, 3, 32)
			TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(969) == -2, "Death")
			TNT1 A 0 A_SetUserVar("user_angle", user_angle + 2 * ACS_ExecuteWithResult(969))	
		Loop
		Death:
			TNT1 A 1
		Stop
	}
}

Actor SorcBallProjectileBase {
	PROJECTILE
	Speed 6
	Height 10
	Radius 5
	//+FULLVOLDEATH
	+CANBOUNCEWATER
	+NOWALLBOUNCESND
	-NOGRAVITY
    -ACTIVATEIMPACT
    -ACTIVATEPCROSS
	+HEXENBOUNCE
	/*+NODAMAGETHRUST*/
	Gravity 0.075
	BounceCount 5
	SeeSound "SorcererBallBounce"
    DeathSound "SorcererBigBallExplode"
}

Actor SorcBall1Projectile : SorcBallProjectileBase {
	SeeSound "SorcererBallBounce"
    DeathSound "SorcererBigBallExplode"
	States {
		Spawn:
			SBMP ABCDEFGHIJKLMNOP 2 Bright
		Loop
		Death:
			TNT1 A 0 A_ChangeFlag("NOBOUNCESOUND", 1)
			SBS4 D 2 Bright A_Explode(ACS_NamedExecuteWithResult("WOC Monster Damage Scale",WOCTARGET,255), 255, 0)
			SBS4 E 2 Bright
			SBS4 FGH 2 Bright
		Stop
	}
}

Actor SorcBall2Projectile : SorcBallProjectileBase {
	SeeSound "SorcererBallBounce"
    DeathSound "SorcererBigBallExplode"
	States {
		Spawn:
			SBMB ABCDEFGHIJKLMNOP 2 Bright
		Loop
		Death:
			TNT1 A 0 A_ChangeFlag("NOBOUNCESOUND", 1)
			SBS5 D 2 Bright A_Explode(ACS_NamedExecuteWithResult("WOC Monster Damage Scale",WOCTARGET,255), 255, 0)
			SBS5 E 2 Bright
			SBS5 FGH 2 Bright
		Stop
	}
}

Actor SorcBall3Projectile : SorcBallProjectileBase {
	SeeSound "SorcererBallBounce"
    DeathSound "SorcererBigBallExplode"
	States {
		Spawn:
			SBMG ABCDEFGHIJKLMNOP 2 Bright
		Loop
		Death:
			TNT1 A 0 A_ChangeFlag("NOBOUNCESOUND", 1)
			SBS3 D 2 Bright A_Explode(ACS_NamedExecuteWithResult("WOC Monster Damage Scale",WOCTARGET,255), 255, 0)
			SBS3 E 2 Bright
			SBS3 FGH 2 Bright
		Stop
	}
}

Actor ZSorcFX3 
{
	Speed 15
	Radius 22
	Height 65
	+NOBLOCKMAP
	+MISSILE
	+NOTELEPORT
	+DONTBLAST
	SeeSound "Hershey/Bishop"

	States
	{
	Spawn:
		SBS3 ABC 2 Bright
		Loop
	Death:
		SBS3 A 0 Bright A_Stop
		SBS3 A 2 Bright A_SetTranslucent(1,1)
		SBS3 A 0 Bright A_SpawnItemEx("_HeresiarchNewBishop",0,0,0,0,0,0,0,SXF_SETMASTER)
		SBS3 DEFGH 2 Bright
		Stop
	}
}

Actor ZSorcFX4
{
	Speed 16
	Radius 10
	Height 10
	Projectile
	/*+NODAMAGETHRUST*/
	Damagetype "Arcane"
	DeathSound "SorcererBallExplode"
	ReactionTime 87

	States 
	{
	Spawn:
		SBS4 ABC 2 Bright A_CountDown
		Loop
	Death:
		SBS4 D 0 Bright A_SetTranslucent(1,1)
		SBS4 D 2 Bright A_Explode(ACS_NamedExecuteWithResult("WOC Monster Damage Scale",WOCTARGET,40), 128, 0)
		SBS4 EFGH 2 Bright
		Stop
	}
}

Actor ZSorcSpark1 : SorcSpark1 {
	VSpeed 2
	+CLIENTSIDEONLY
}

Actor ZSorcFX1 {
	Speed 10
	Radius 5
	Height 5
	Projectile
	-NOGRAVITY
	+FULLVOLDEATH
	+CANBOUNCEWATER
	+NOWALLBOUNCESND
	+SEEKERMISSILE
	BounceFactor 1.0
	+HEXENBOUNCE
	/*+NODAMAGETHRUST*/
	Renderstyle Add
	SeeSound "SorcererBallBounce"
	DeathSound "SorcererHeadScream"
	var int user_count;
	Damagetype "Fire"
	States {
		Spawn:
			SBS1 A 2 Bright
			TNT1 A 0 A_SetUserVar("user_count", 20) // base is 17
		SpawnLoop:
			TNT1 A 0 A_JumpIf(user_count < 1, "Death")
			SBS1 B 3 Bright A_SeekerMissile(2, 6)
			SBS1 C 3 Bright A_SeekerMissile(2, 6)
			SBS1 D 3 Bright A_SeekerMissile(2, 6)
			TNT1 A 0 A_SetUserVar("user_count", user_count - 1)
		Loop
		Death:
			TNT1 A 0 A_Stop
			TNT1 A 0 A_PlaySound("SorcererHeadScream")
			FX13 I 2 Bright A_Explode(ACS_NamedExecuteWithResult("WOC Monster Damage Scale",WOCTARGET,60), 128, 0)
			FX13 JKLM 2 Bright
			Stop
	}
}

Actor OrbiterClockwise {
	Speed 15
	Radius 5
	Height 5
	+NOBLOCKMAP
	+NOGRAVITY
	+NOTELEPORT
	+NOCLIP
	+CLIENTSIDEONLY
	var int user_angle;
	var int user_count;
	States {
		Spawn:
			SBS2 A 3 Bright
		Orbit:
			SBS2 A 2 Bright A_SetUserVar("user_angle", 0)
			SBS2 A 2 Bright A_SetUserVar("user_count", 0)
		OrbitLoop:
			// these values aren't arbitrary. In the source, shield lasts 255 (+1) units. Each unit is consumed in 2 tics. There are 16 2 tic frames here. 16 x 16 = 256.
			TNT1 A 0 A_JumpIf(user_count > 15, "Death")
			TNT1 A 0 A_SpawnItem("OrbiterTrail")
			SBS2 BB 1 Bright ACS_ExecuteAlways(970, 0, 2, 0, 40)
			TNT1 A 0 A_SpawnItem("OrbiterTrail")
			SBS2 CC 1 Bright ACS_ExecuteAlways(970, 0, 2, 0, 40)
			TNT1 A 0 A_SpawnItem("OrbiterTrail")
			SBS2 DD 1 Bright ACS_ExecuteAlways(970, 0, 2, 0, 40)
			TNT1 A 0 A_SpawnItem("OrbiterTrail")
			SBS2 EE 1 Bright ACS_ExecuteAlways(970, 0, 2, 0, 40)
			TNT1 A 0 A_SpawnItem("OrbiterTrail")
			SBS2 FF 1 Bright ACS_ExecuteAlways(970, 0, 2, 0, 40)
			TNT1 A 0 A_SpawnItem("OrbiterTrail")
			SBS2 GG 1 Bright ACS_ExecuteAlways(970, 0, 2, 0, 40)
			TNT1 A 0 A_SpawnItem("OrbiterTrail")
			SBS2 HH 1 Bright ACS_ExecuteAlways(970, 0, 2, 0, 40)
			TNT1 A 0 A_SpawnItem("OrbiterTrail")
			SBS2 II 1 Bright ACS_ExecuteAlways(970, 0, 2, 0, 40)
			TNT1 A 0 A_SpawnItem("OrbiterTrail")
			SBS2 JJ 1 Bright ACS_ExecuteAlways(970, 0, 2, 0, 40)
			TNT1 A 0 A_SpawnItem("OrbiterTrail")
			SBS2 KK 1 Bright ACS_ExecuteAlways(970, 0, 2, 0, 40)
			TNT1 A 0 A_SpawnItem("OrbiterTrail")
			SBS2 LL 1 Bright ACS_ExecuteAlways(970, 0, 2, 0, 40)
			TNT1 A 0 A_SpawnItem("OrbiterTrail")
			SBS2 MM 1 Bright ACS_ExecuteAlways(970, 0, 2, 0, 40)
			TNT1 A 0 A_SpawnItem("OrbiterTrail")
			SBS2 NN 1 Bright ACS_ExecuteAlways(970, 0, 2, 0, 40)
			TNT1 A 0 A_SpawnItem("OrbiterTrail")
			SBS2 OO 1 Bright ACS_ExecuteAlways(970, 0, 2, 0, 40)
			TNT1 A 0 A_SpawnItem("OrbiterTrail")
			SBS2 PP 1 Bright ACS_ExecuteAlways(970, 0, 2, 0, 40)
			TNT1 A 0 A_SpawnItem("OrbiterTrail")
			SBS2 AA 1 Bright ACS_ExecuteAlways(970, 0, 2, 0, 40)
			TNT1 A 0 A_SetUserVar("user_count", user_count + 1)
		Loop
		Death:
			SBS2 AAAAAAAAAAAAAAA 1 A_FadeOut(0.075)
		Stop
	}
}

Actor OrbiterCounterClockwise : OrbiterClockwise {
	//var int user_angle;
	//var int user_count;
	States {
		Spawn:
			SBS2 A 3 Bright
		Orbit:
			SBS2 A 2 Bright A_SetUserVar("user_angle", 0)
			SBS2 A 2 Bright A_SetUserVar("user_count", 0)
		OrbitLoop:
			TNT1 A 0 A_JumpIf(user_count > 15, "Death")
			TNT1 A 0 A_SpawnItem("OrbiterTrail")
			SBS2 BB 1 Bright ACS_ExecuteAlways(970, 0, 2, 1, 40)
			TNT1 A 0 A_SpawnItem("OrbiterTrail")
			SBS2 CC 1 Bright ACS_ExecuteAlways(970, 0, 2, 1, 40)
			TNT1 A 0 A_SpawnItem("OrbiterTrail")
			SBS2 DD 1 Bright ACS_ExecuteAlways(970, 0, 2, 1, 40)
			TNT1 A 0 A_SpawnItem("OrbiterTrail")
			SBS2 EE 1 Bright ACS_ExecuteAlways(970, 0, 2, 1, 40)
			TNT1 A 0 A_SpawnItem("OrbiterTrail")
			SBS2 FF 1 Bright ACS_ExecuteAlways(970, 0, 2, 1, 40)
			TNT1 A 0 A_SpawnItem("OrbiterTrail")
			SBS2 GG 1 Bright ACS_ExecuteAlways(970, 0, 2, 1, 40)
			TNT1 A 0 A_SpawnItem("OrbiterTrail")
			SBS2 HH 1 Bright ACS_ExecuteAlways(970, 0, 2, 1, 40)
			TNT1 A 0 A_SpawnItem("OrbiterTrail")
			SBS2 II 1 Bright ACS_ExecuteAlways(970, 0, 2, 1, 40)
			TNT1 A 0 A_SpawnItem("OrbiterTrail")
			SBS2 JJ 1 Bright ACS_ExecuteAlways(970, 0, 2, 1, 40)
			TNT1 A 0 A_SpawnItem("OrbiterTrail")
			SBS2 KK 1 Bright ACS_ExecuteAlways(970, 0, 2, 1, 40)
			TNT1 A 0 A_SpawnItem("OrbiterTrail")
			SBS2 LL 1 Bright ACS_ExecuteAlways(970, 0, 2, 1, 40)
			TNT1 A 0 A_SpawnItem("OrbiterTrail")
			SBS2 MM 1 Bright ACS_ExecuteAlways(970, 0, 2, 1, 40)
			TNT1 A 0 A_SpawnItem("OrbiterTrail")
			SBS2 NN 1 Bright ACS_ExecuteAlways(970, 0, 2, 1, 40)
			TNT1 A 0 A_SpawnItem("OrbiterTrail")
			SBS2 OO 1 Bright ACS_ExecuteAlways(970, 0, 2, 1, 40)
			TNT1 A 0 A_SpawnItem("OrbiterTrail")
			SBS2 PP 1 Bright ACS_ExecuteAlways(970, 0, 2, 1, 40)
			TNT1 A 0 A_SpawnItem("OrbiterTrail")
			SBS2 AA 1 Bright ACS_ExecuteAlways(970, 0, 2, 1, 40)
			TNT1 A 0 A_SetUserVar("user_count", user_count + 1)
		Loop
	}
}

Actor OrbiterTrail : OrbiterClockwise
{
	RenderStyle Add
	Alpha 0.4
	States {
		Spawn:
			SBS2 A 4
		Goto Death
	}
}