Actor EttinSpotz : RandomSpawner replaces Ettin
{
	Game Hexen
	SpawnID 4
	+TELESTOMP
	DropItem "NewEttin" 255 235
	DropItem "ChainmailEttin" 255 20
	DropItem "Bormereth" 255 1
}

Actor NewEttin : Ettin// Replaces Ettin
{
	Dropitem "ArtiEmptyFlask" 64
	Dropitem "ReagentRed" 64
	DropItem "Money" 64
	DropItem "Money" 64
	DropItem "Money" 64
	DropItem "Money" 64
	DropItem "Money" 64
	DropItem "Money1" 8
	DropItem "Money2" 4
	DropItem "Money3" 2
	DropItem "ChestKey" 2
	MeleeRange 68
	+TELESTOMP
	Speed 15
	Tag "Ettin"
	+USEKILLSCRIPTS
	AttackSound ""
	Species "Ettin"
	States
	{
	Spawn:
		ETTN A 0
		ETTN A 0 ACS_NamedExecuteAlways("WOC Monster Init",0,70,0)//increase health on higher difficulties
	Idle:
		ETTN AA 10 A_Look
		Loop
	Melee:
		ETTN E 5 A_FaceTarget
		ETTN F 0 A_PlayWeaponSound("EttinSwing")
		ETTN F 5 A_FaceTarget
		ETTN G 7 A_CustomMeleeAttack(ACS_NamedExecuteWithResult("WOC Monster Damage Scale",ACTIVATOR,FRandom(7,10)), "EttinAttack", "", "Physical")
		Goto See
	See:
		ETTN A 4 A_Chase
		ETTN B 5 A_Chase
		ETTN C 4 A_Chase
		ETTN D 5 A_Chase
		Loop
	Pain:
		ETTN H 7 A_Pain
		Goto See
	Pain.Morale:
		TNT1 A 0 A_Changeflag("Frightened", 1)
		Goto Pain
	XDeath:
		ETTB B 0 A_SpawnItemEx("GIBBER")
		ETTB B 4 A_Scream
		ETTB B 4 A_CustomMissile("EttinMace",2,0,-90,2)
		ETTB D 4 A_NoBlocking
		ETTB E 4 A_QueueCorpse
		ETTB FGHIJK 4
		ETTB L -1
		Stop
	Ice:
		"----" H 5 A_GenericFreezeDeath
		"----" H 1 A_FreezeDeathChunks
		Wait
	Raise:
		TNT1 A 0 ACS_NamedExecuteAlways("WOC Monster Init",0,70,0)
		ETTN QPONMLKJI 4
		goto See
	}
}

ACTOR NewEttinMash : NewEttin replaces EttinMash
{
	Game Hexen
	SpawnID 102
	+NOBLOOD
	+NOICEDEATH
	+GHOST
	+SHADOW
	RenderStyle Translucent
	Alpha 0.4
	DamageFactor "Arcane", 1.5
	DamageFactor "ArcanePlayer", 1.5
	DamageFactor "ArcaneTime", 1.5
	DamageFactor "PoisonTime", 0
	DamageFactor "Bleed", 0
}

Actor ChainmailEttin : NewEttin
{
	Health 400
	Mass 200
	Obituary "%o was smashed by an Ettin Commander."
	dropitem "ArtiEmptyFlask" 64
	dropitem "ReagentRed" 64
	DropItem "Armour1" 8
	DropItem "Money" 64
	DropItem "Money" 64
	DropItem "Money" 64
	DropItem "Money" 64
	DropItem "Money1" 64
	DropItem "Money1" 8
	DropItem "Money2" 4
	DropItem "Money3" 2
	DropItem "ChestKey" 2
	Tag "Ettin Commander"
	Species "Ettin"
	DamageFactor "Lightning", 1.5
	DamageFactor "LightningPlayer", 1.5
	DamageFactor "LightningTime", 1.5
	DamageFactor "Physical", 0.75
	DamageFactor "PhysicalPlayer", 0.75
	States
	{
	Spawn:
		CETN A 0
		CETN A 0 ACS_NamedExecuteAlways("WOC Monster Init",0,70,0)//increase health on higher difficulties
	Idle:
		CETN AA 10 A_Look
		Loop
	See:
		CETN A 0 A_RadiusGive("EttinCommanderBuff", 256, RGF_MONSTERS)//, 1, "", "Ettin")
		CETN A 4 A_Chase
		CETN B 5 A_Chase
		CETN C 4 A_Chase
		CETN D 5 A_Chase
		Loop
	Pain:
		CETN H 7 A_Pain
		Goto See
	Melee:
		CETN E 5 A_FaceTarget
		CETN F 0 A_PlayWeaponSound("EttinSwing")
		CETN F 5 A_FaceTarget
		CETN G 7 A_CustomMeleeAttack(ACS_NamedExecuteWithResult("WOC Monster Damage Scale",ACTIVATOR,FRandom(10,14)), "EttinAttack", "", "Physical")
		Goto See
	Missile:
		CETN EF 6 A_FaceTarget
		CETN G 0 A_PlaySound("FighterHammerMiss")
		CETN G 8 A_CustomMissile("ThrownMace",52,0,0)
		Goto See
	Death:
		CETN IJ 4
		CETN K 4 A_Scream
		CETN L 4 A_NoBlocking
		CETN M 4 A_QueueCorpse
		CETN NOP 4
		CETN Q -1 //A_BossDeath
		Stop
	XDeath:
		CETB A 4 A_SpawnItemEx("GIBBER")
		CETB B 4 A_NoBlocking
		CETB C 4 A_SpawnItemEx("EttinMace", 0,0,8.5, random[DropMace](-128,127) * 0.03125, random[DropMace](-128,127) * 0.03125, 10 + random[DropMace](0,255) * 0.015625, 0, SXF_ABSOLUTEMOMENTUM)
		CETB D 4 A_Scream
		CETB E 4 A_QueueCorpse
		CETB FGHIJK 4
		ETTB L -1 //A_BossDeath
		Stop
	Ice:
		"----" E 5 A_GenericFreezeDeath
		"----" E 1 A_FreezeDeathChunks
		Wait
	Raise:
		TNT1 A 0 ACS_NamedExecuteAlways("WOC Monster Init",0,70,0)
		CETN QPONMLKJI 4
		goto See
	}
}

ACTOR ThrownMace
{
    Speed 15
	FastSpeed 20
    Radius 6
    Height 8
    PROJECTILE
    +NOTELEPORT
    Damage (ACS_NamedExecuteWithResult("WOC Monster Damage Scale",WOCTARGET,FRandom(3,24)))
	/*+NODAMAGETHRUST*/
	+HEXENBOUNCE
	-NOGRAVITY
	+WINDTHRUST
	+THRUGHOST
    BounceCount 4
    BounceFactor 1
    WallBounceFactor 1
    DeathSound "Fireball"
	Damagetype "Physical"
    States
    {
    Spawn:
		AEMC ABCDEFG 3
		AEMC H 0 A_PlaySound("FighterHammerContinuous")
		AEMC H 3
		Loop
    Death:
		CFCF Q 0 Bright A_SetTranslucent(1,1)
		CFCF Q 1 Bright A_NoGravity
		CFCF QQQ 1 Bright A_SpawnItemEx("FlailPuffParticleFXSpawner")
		CFCF RRR 1 Bright A_SpawnItemEx("FlailPuffParticleFXSpawner")
		CFCF SSSS 1 Bright A_SpawnItemEx("FlailPuffParticleFXSpawner")
		CFCF T 3 Bright
		CFCF U 4 Bright
		CFCF W 3 Bright
		CFCF X 4 Bright
		CFCF Z 3 Bright
		Stop
    }
}

Actor EttinCommanderBuff : Custominventory
{
	Inventory.MaxAmount 0
	+Inventory.AUTOACTIVATE
	states
	{
	Use:
		TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("WOC ETTINCOMMANDER SCRIPT") == 1 && ACS_ExecuteWithResult(WOC_DECORATE,STATS,ISFRIENDLY,ACTIVATOR) == 0, "Buff")
		//TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(WOC_DECORATE,STATS,ISFRIENDLY,ACTIVATOR) == 0, "Buff")
		Stop
	Buff:
		TNT1 A 0 A_GiveInventory("EttinCommanderDefense", 1)
		TNT1 A 0 A_GiveInventory("EttinCommanderDamage", 1)
		Stop
	}
}

Actor EttinCommanderDamage : PowerupGiver
{
	Powerup.Type EttinCommanderDamage
	Powerup.Duration -5
	+INVENTORY.AUTOACTIVATE
	Inventory.MaxAmount 0
}

Actor PowerEttinCommanderDamage : PowerDamage
{
	Damagefactor "Normal", 1.25
	Powerup.Duration -5
}

Actor EttinCommanderDefense : PowerupGiver
{
	Powerup.Type EttinCommanderDefense
	Powerup.Duration -5
	+INVENTORY.AUTOACTIVATE
	Inventory.MaxAmount 0
}

Actor PowerEttinCommanderDefense : PowerProtection
{
	Damagefactor "Normal", 0.75
	Powerup.Duration -5
}

ACTOR Bormereth : NewEttin
{
    Health 1200
    PainChance 36
    Mass 2500
	Species "Ettin"
	DamageFactor "Deathblow", 0
	+NEVERRESPAWN
	+DONTMORPH
	+NOFEAR
	DropItem "NewArtiBoostMana" 128
	DropItem "NewArtiSuperHealth" 128
	DropItem "ArtiOrangeFlask" 128
	DropItem "ArtiRedFlask"
	DropItem "ArtiYellowFlask"
	DropItem "ArtiRedFlask"
	DropItem "ArtiYellowFlask"
	DropItem "AccessoryRandomSpawner" 32
	DropItem "Money2" 128
    DropItem "Money2" 128
    DropItem "Money2" 128
    DropItem "Money2" 128
    DropItem "Money3" 128
	DropItem "Money1" 8
	DropItem "Money2" 4
	DropItem "Money3" 2
	DropItem "ChestKey" 2
    SeeSound "DMage/Attack"
    PainSound "DMage/Pain"
    ActiveSound "DMage/idle"
    DeathSound "DMage/death"
	AttackSound ""
    Obituary "%o was incinerated by the rage of Bormereth."
    HitObituary "%o was smashed by Bormereth."
	Tag "Bormereth"
	Species "Ettin"
	+DONTHARMSPECIES
	DamageFactor "Fire", 0.5
	DamageFactor "FirePlayer", 0.5
	DamageFactor "FireTime", 0.5
	DamageFactor "Ice", 2.0
	DamageFactor "IcePlayer", 2.0
	DamageFactor "IceTime", 2.0
    States
    {
    Spawn:
		BRMN A 0
		BRMN A 0 ACS_NamedExecuteAlways("WOC Monster Init",0,70,WOC_STATUSIMMUNE)
	Idle:
		BRMN AA 10 A_Look
        Loop
    See:
        BRMN H 0 A_ChangeFlag("NOPAIN",0)
		BRMN A 0 A_UnSetInvulnerable
        BRMN A 4 A_Chase
		BRMN B 5 A_Chase
		BRMN C 4 A_Chase
		BRMN D 5 A_Chase
		Loop
    Missile:
		TNT1 A 0 A_Jump(60,"Missile2")

		TNT1 A 0 A_Jump(128,17)
		BRMN E 6 A_FaceTarget
		BRMN F 6 A_FaceTarget
		TNT1 A 0 A_PlaySoundEx("bormereth/missilesimple","SoundSlot5")
		BRMN G 6 Bright A_CustomMissile("WraithFX12",25,0,0)
		BRMN E 6 A_FaceTarget
		BRMN F 6 A_FaceTarget
		TNT1 A 0 A_PlaySoundEx("bormereth/missilesimple","SoundSlot5")
		BRMN G 6 Bright A_CustomMissile("WraithFX12",25,0,0)
		BRMN E 6 A_FaceTarget
		BRMN F 6 A_FaceTarget
		TNT1 A 0 A_PlaySoundEx("bormereth/missilesimple","SoundSlot5")
		BRMN G 6 Bright A_CustomMissile("WraithFX12",25,0,0)
		BRMN E 6 A_FaceTarget
		BRMN F 6 A_FaceTarget
		TNT1 A 0 A_PlaySoundEx("bormereth/missilesimple","SoundSlot5")
		BRMN G 6 Bright A_CustomMissile("WraithFX12",25,0,0)
		Goto see

		TNT1 A 0 A_Jump(128,9)
		BRMN E 6 A_FaceTarget
		BRMN F 3 A_FaceTarget
		TNT1 A 0 A_PlaySoundEx("bormereth/missilesimple","SoundSlot5")
		BRMN F 3 Bright A_CustomMissile("WraithFX12",31,10,0)
		TNT1 A 0 A_PlaySoundEx("bormereth/missilesimple","SoundSlot5")
		BRMN G 3 Bright A_CustomMissile("WraithFX12",28,5,0)
		TNT1 A 0 A_PlaySoundEx("bormereth/missilesimple","SoundSlot5")
		BRMN G 3 Bright A_CustomMissile("WraithFX12",25,0,0)
		Goto see

		BRMN E 6 A_FaceTarget
		BRMN F 6 A_FaceTarget
		TNT1 A 0 A_PlaySoundEx("bormereth/missilesimple","SoundSlot5")
		BRMN G 0 A_CustomMissile("WraithFX12",25,0,20)
		BRMN G 0 A_CustomMissile("WraithFX12",25,0,0)
		BRMN G 0 A_CustomMissile("WraithFX12",25,0,-20)
		BRMN G 6 Bright
		Goto see
    Missile2:
		BRMN F 5 A_FaceTarget
		TNT1 A 0 A_PlaySoundEx("bormereth/missile2prepare","SoundSlot5")
		TNT1 A 0 A_SpawnItemEx("PossBRMFakeFireBall",5,25,64,0,0,0,0,128)
		BRMN EEEEE 5 A_FaceTarget
		BRMN E 3 A_FaceTarget
		TNT1 A 0 A_CustomMissile("PossBRMFireBall",64,25,0)
		BRMN F 5 A_FaceTarget
		BRMN G 5 A_FaceTarget
		goto see
    Melee:
		BRMN E 5 A_FaceTarget
		BRMN F 0 A_PlayWeaponSound("EttinSwing")
		BRMN F 5 A_FaceTarget
		BRMN G 7 A_CustomMeleeAttack(ACS_NamedExecuteWithResult("WOC Monster Damage Scale",ACTIVATOR,FRandom(24,38)), "EttinAttack", "", "Physical")
		Goto See
    Pain:
		TNT1 A 0 A_CustomMissile("FirePillarStarter",32,0,0)
		TNT1 A 0 A_CustomMissile("FirePillarStarter",32,0,90)
		TNT1 A 0 A_CustomMissile("FirePillarStarter",32,0,180)
		TNT1 A 0 A_CustomMissile("FirePillarStarter",32,0,270)
		TNT1 A 0 A_CustomMissile("FirePillarStarter",32,0,45)
		TNT1 A 0 A_CustomMissile("FirePillarStarter",32,0,135)
		TNT1 A 0 A_CustomMissile("FirePillarStarter",32,0,-45)
		TNT1 A 0 A_CustomMissile("FirePillarStarter",32,0,-135)
		BRMN H 0 A_ChangeFlag("NOPAIN",1)
        BRMN H 2 A_SetInvulnerable
        BRMN H 2 A_Pain
        BRMN H 20
        BRMN H 2 A_UnSetInvulnerable
        Goto See
/*    Death:
        BRMN I 5
        BRMN J 5 A_Scream
        BRMN K 5 A_NoBlocking
        BRMN L 5 A_Fall
        BRMN MNOP 5
        BRMN Q -1
        Stop
*/
    Death:		//I just like this death too much! :P
	XDeath:
		TNT1 A 0 A_PlaySound("misc/gibbed")
		BRMB A 0 A_SpawnItemEx("GIBBER")
        BRMB A 4 A_Scream
        BRMB B 4 A_SpawnItemEx("DBigEttinMace", 0, 0, 32, 3, 0, 0, -90, 128)
        BRMB C 4 A_NoBlocking
        BRMB D 4
        BRMB EFGHIJK 4
        BRMB L -1 //A_BossDeath
        Stop
	Ice:
		"----" H 5 A_GenericFreezeDeath
		"----" H 1 A_FreezeDeathChunks
		Wait
	Raise:
		Stop
    }
}


actor DBigettinMace
{
    +DOOMBOUNCE
    Speed 3
    States
    {
    Spawn:
        BRMB MNOPQR 5
        BRMB S -1
        Stop
    }
}

Actor WraithFX12 : WraithFX1
{
	DeathSound "bormereth/missilesimpledeath"
	Scale 0.85
	FastSpeed 28
	Damage (ACS_NamedExecuteWithResult("WOC Monster Damage Scale",WOCTARGET,FRandom(15,30)))
	/*+NODAMAGETHRUST*/
	Renderstyle Add
	Decal DoomImpScorch
}

Actor PossBRMFakeFireBall : WraithFX1
{
	+NOCLIP
	Damage 0
	Speed 0
	Scale 1.1
	Renderstyle Add
	States
	{
	Spawn:
		TNT1 AA 0 A_SpawnItemEx("WraithFX22",0,0,0,random(-5,5),random(-5,5),random(-5,5),random(1,360))
		WRBL A 1 Bright A_Settranslucent(0.1,1)
		WRBL A 1 Bright A_Settranslucent(0.15,1)
		WRBL A 1 Bright A_Settranslucent(0.2,1)
		TNT1 AAA 0 A_SpawnItemEx("WraithFX22",0,0,0,random(-5,5),random(-5,5),random(-5,5),random(1,360))
		WRBL B 1 Bright A_Settranslucent(0.25,1)
		WRBL B 1 Bright A_Settranslucent(0.3,1)
		WRBL B 1 Bright A_Settranslucent(0.35,1)
		TNT1 AAAA 0 A_SpawnItemEx("WraithFX22",0,0,0,random(-5,5),random(-5,5),random(-5,5),random(1,360))
		WRBL C 1 Bright A_Settranslucent(0.4,1)
		WRBL C 1 Bright A_Settranslucent(0.45,1)
		WRBL C 1 Bright A_Settranslucent(0.5,1)
		TNT1 AAAAA 0 A_SpawnItemEx("WraithFX22",0,0,0,random(-5,5),random(-5,5),random(-5,5),random(1,360))
		WRBL A 1 Bright A_Settranslucent(0.55,1)
		WRBL A 1 Bright A_Settranslucent(0.6,1)
		WRBL A 1 Bright A_Settranslucent(0.65,1)
		TNT1 AAAAAA 0 A_SpawnItemEx("WraithFX22",0,0,0,random(-5,5),random(-5,5),random(-5,5),random(1,360))
		WRBL B 1 Bright A_Settranslucent(0.7,1)
		WRBL B 1 Bright A_Settranslucent(0.75,1)
		WRBL B 1 Bright A_Settranslucent(0.8,1)
		TNT1 AAAAAAA 0 A_SpawnItemEx("WraithFX22",0,0,0,random(-5,5),random(-5,5),random(-5,5),random(1,360))
		WRBL C 1 Bright A_Settranslucent(0.85,1)
		WRBL C 1 Bright A_Settranslucent(0.9,1)
		WRBL C 1 Bright A_Settranslucent(0.95,1)
		TNT1 AAAAAAAA 0 A_SpawnItemEx("WraithFX22",0,0,0,random(-5,5),random(-5,5),random(-5,5),random(1,360))
		WRBL A 3 Bright
		TNT1 AAAAAAAA 0 A_SpawnItemEx("WraithFX22",0,0,0,random(-5,5),random(-5,5),random(-5,5),random(1,360))
		WRBL B 3 Bright
		TNT1 AAAAAAAA 0 A_SpawnItemEx("WraithFX22",0,0,0,random(-5,5),random(-5,5),random(-5,5),random(1,360))
		WRBL C 3 Bright
		Stop
	}
}


Actor PossBRMFireBall: WraithFX1
{
	Damage (ACS_NamedExecuteWithResult("WOC Monster Damage Scale",WOCTARGET,FRandom(35,55)))
	/*+NODAMAGETHRUST*/
	Scale 1.1
	Speed 20
	FastSpeed 40
	+SEEKERMISSILE
	Renderstyle Add
	SeeSound "bormereth/missile2fired"
	DeathSound "bormereth/missile2death"
	Decal DoomImpScorch
	States
	{
	Spawn:
		TNT1 AAAAAAAA 0 A_SpawnItemEx("WraithFX22",0,0,0,random(-5,5),random(-5,5),random(-5,5),random(1,360),128)
		WRBL A 1 Bright A_SeekerMissile(5,5,SMF_PRECISE)
		TNT1 A 0 A_SpawnItemEx("PEFBTrail",0,0,0,0,0,0,0,128)
		WRBL A 1 Bright A_SeekerMissile(5,5,SMF_PRECISE)
		TNT1 A 0 A_SpawnItemEx("PEFBTrail",0,0,0,0,0,0,0,128)
		WRBL A 1 Bright A_SeekerMissile(5,5)
		TNT1 A 0 A_SpawnItemEx("PEFBTrail",0,0,0,0,0,0,0,128)
		TNT1 AAAAAAAA 0 A_SpawnItemEx("WraithFX22",0,0,0,random(-5,5),random(-5,5),random(-5,5),random(1,360),128)
		WRBL B 1 Bright A_SeekerMissile(5,5,SMF_PRECISE)
		TNT1 A 0 A_SpawnItemEx("PEFBTrail",0,0,0,0,0,0,0,128)
		WRBL B 1 Bright A_SeekerMissile(5,5,SMF_PRECISE)
		TNT1 A 0 A_SpawnItemEx("PEFBTrail",0,0,0,0,0,0,0,128)
		WRBL B 1 Bright A_SeekerMissile(5,5,SMF_PRECISE)
		TNT1 A 0 A_SpawnItemEx("PEFBTrail",0,0,0,0,0,0,0,128)
		TNT1 AAAAAAAA 0 A_SpawnItemEx("WraithFX22",0,0,0,random(-5,5),random(-5,5),random(-5,5),random(1,360),128)
		WRBL C 1 Bright A_SeekerMissile(5,5,SMF_PRECISE)
		TNT1 A 0 A_SpawnItemEx("PEFBTrail",0,0,0,0,0,0,0,128)
		WRBL C 1 Bright A_SeekerMissile(5,5,SMF_PRECISE)
		TNT1 A 0 A_SpawnItemEx("PEFBTrail",0,0,0,0,0,0,0,128)
		WRBL C 1 Bright A_SeekerMissile(5,5,SMF_PRECISE)
		TNT1 A 0 A_SpawnItemEx("PEFBTrail",0,0,0,0,0,0,0,128)
		Loop
	Death:
		TNT1 A 0 A_CustomMissile("PEFBExplo",0,0,0)
		TNT1 A 0 A_Explode(ACS_NamedExecuteWithResult("WOC Monster Damage Scale",WOCTARGET,80),80,0)
		TNT1 AAAAAAAAAAAAAAA 0 A_SpawnItemEx("WraithFX23",0,0,0,random(-5,5),random(-5,5),random(-5,5),random(1,360),128)
		TNT1 AAAAAAAAAAAAAAA 0 A_SpawnItemEx("WraithFX22",0,0,0,random(-5,5),random(-5,5),random(-5,5),random(1,360),128)
		WRBL DEF 3 Bright
		WRBL GHI 3
		Stop
}
}

Actor WraithFX22
{
	Projectile
	Damage 0
	+RIPPER
	+BLOODLESSIMPACT
	Speed 0
	Radius 1
	Height 1
	Scale 0.75
	States
	{
	Spawn:
		WRBL KLKL 2 Bright
		TNT1 A 0 A_Jump(128,1)
		Loop
		WRBL MNOP 2 Bright
		WRBL P 1 Bright A_FadeOut
		Wait
	Death:
		TNT1 A 1
		Stop
	}
}

Actor WraithFX23
{
	Projectile
	Damage 0
	+RIPPER
	+BLOODLESSIMPACT
	Speed 0
	Radius 1
	Height 1
	States
	{
	Spawn:
		WRBL KLKL 2 Bright
		TNT1 A 0 A_Jump(128,1)
		Loop
		WRBL MNOP 2 Bright
		WRBL P 1 Bright A_FadeOut
		Wait
	Death:
		TNT1 A 1
		Stop
	}
}

Actor PEFBExplo
{
	Projectile
	Speed 0
	Damage 0
	+NOCLIP
	Renderstyle Add
	RenderStyle Add
	Alpha 0.6
	States
	{
	Spawn:
		FX58 ABCDEFGHIJKLMNOPQ 1 Bright
		Stop
	}
}

Actor PEFBTrail
{
	Projectile
	Speed 0
	Damage 0
	+NOCLIP
	Renderstyle Add
	RenderStyle Add
	Scale 0.4
	Alpha 0.45
	States
	{
	Spawn:
		FX50 ABCDEFG 1
		FX50 HIJKLMNOPQR 1
		Stop
	}
}


//-------------------------------------------------------
Actor FirePillarStarter
{
	Projectile
	+RIPPER
	Speed 28
	Damage 0
	+NOTARGET
	+RIPPER
	+BLOODLESSIMPACT
	RenderStyle None
	States
	{
	Spawn:
		TNT1 A 3
		Goto Death
	Death:
		TNT1 A 3 A_CustomMissile("FirePillarBase",-20,0,0,4)
		Stop
	}
}

Actor FirePillarBase
{
	Projectile
	Speed 0
	+NOCLIP
	Damage 0
	RenderStyle None
	States
	{
	Spawn:
		TNT1 A 2 A_CustomMissile("FirePillarShot",5,0,0,4)
		TNT1 A 2 A_CustomMissile("FirePillarShot2",5,0,0,4)
		TNT1 A 2 A_CustomMissile("FirePillarShot",5,0,0,4)
		TNT1 A 2 A_CustomMissile("FirePillarShot2",5,0,0,4)
		TNT1 A 2 A_CustomMissile("FirePillarShot",5,0,0,4)
		TNT1 A 2 A_CustomMissile("FirePillarShot2",5,0,0,4)
		TNT1 A 2 A_CustomMissile("FirePillarShot",5,0,0,4)
		TNT1 A 2 A_CustomMissile("FirePillarShot2",5,0,0,4)
		TNT1 A 2 A_CustomMissile("FirePillarShot",5,0,0,4)
		TNT1 A 2 A_CustomMissile("FirePillarShot2",5,0,0,4)
		TNT1 A 2 A_CustomMissile("FirePillarShot",5,0,0,4)
		Stop
	}
}

Actor FirePillarShot
{
	Projectile
	Speed 0
	Radius 4
	Height 3
	Damage (ACS_NamedExecuteWithResult("WOC Monster Damage Scale",WOCTARGET,FRandom(1,8)))
	/*+NODAMAGETHRUST*/
	+BLOODLESSIMPACT
	DamageType Fire
	Scale 0.5
	RenderStyle Add
	Alpha 0.6
	States
	{
	Spawn:
		TNT1 AAAA 0
		INFE ABCD 1 Bright ThrustThingZ(0,7,0,1)
		INFE EFGHIJKLMNOPQRST 1 Bright
		Stop
	}
}

Actor FirePillarShot2 : FirePillarShot	//this one wont have light definition
{
	Alpha 0.59
}


//////////////////////////////////////////////////////Afrits
Actor AfritSpotZ : RandomSpawner replaces FireDemon
{
	Game Hexen
	SpawnID 5
	+TELESTOMP
	DropItem "NewFireDemon" 255 210
	DropItem "FireDemonLeader" 255 30
	DropItem "FireDemonCommander" 255 15
	DropItem "FireDemonQueen" 255 1
}

Actor NewFireDemon : FireDemon
{
	Height 56
	PainChance 1
	Speed 8
	Species "Afrit"
	MinMissileChance 400
	Tag "Afrit"
	Dropitem "ReagentRed" 32
	DamageFactor "Fire", 0.5
	DamageFactor "FirePlayer", 0.5
	DamageFactor "FireTime", 0.5
	DamageFactor "Ice", 2.0
	DamageFactor "IcePlayer", 2.0
	DamageFactor "IceTime", 2.0
	+AVOIDMELEE
	+USEKILLSCRIPTS
	+LOOKALLAROUND
	States
	{
	See:
		FDMN E 8 Bright
		FDMN F 6 Bright
		FDMN G 5 Bright
		FDMN F 8 Bright
		FDMN E 6 Bright
		FDMN G 7 Bright A_FiredRocks
		FDMN HI 5 Bright
		FDMN J 5 Bright A_UnSetInvulnerable
	Chase:
		FDMN A 0 Bright A_UnsetInvulnerable
		FDMN AABBCC 3 Bright A_FireDChase
		Loop
	Missile:
		FDMN K 3 Bright A_FaceTarget
		FDMN KKK 5 Bright A_FiredAttack
		Goto Chase
	Pain:
		FDMN D 3 Bright A_UnsetInvulnerable
		FDMN D 3 Bright A_Pain
		Goto Chase
	Spawn:
		FDMN X 0 Bright
		FDMN X 0 ACS_NamedExecuteAlways("WOC Monster Init",0,56,0)//increase health on higher difficulties//A_JumpIf(ACS_ExecuteWithResult(522,0,0,0)==1,"Mutate")
		FDMN X 5 Bright
		FDMN EFG 10 Bright A_Look
		Goto Spawn+3
	Idle:
		FDMN AB 10 Bright A_LookEx(0, 0, 0, 0, 0, "Chase")
		Loop
	Ice:
		"----" D 5 A_GenericFreezeDeath
		"----" D 1 A_FreezeDeathChunks
		Wait
	}
}

Actor NewFireDemonMissile : FireDemonMissile replaces FireDemonMissile
{
	Speed 15
	FastSpeed 20
	Damage (ACS_NamedExecuteWithResult("WOC Monster Damage Scale",WOCTARGET,FRandom(1,8)))
	/*+NODAMAGETHRUST*/
	States
	{
	Spawn:
      FDMB A 1 Bright A_CustomMissile("FireDemonTrail1",0,0,Random(-200,200),50,Random(-200,200))
	  FDMB A 1 Bright A_CustomMissile("FireDemonTrail2",0,0,0,0)
      Loop
	}
}

ACTOR FireDemonTrail1
{   
   Radius 2
   Height 2
   Speed 1
   ReactionTime 60
   PROJECTILE
   RENDERSTYLE ADD
   Alpha 0.75
   +CLIENTSIDEONLY +DONTBLAST
   +NOGRAVITY
   +DOOMBOUNCE
   +EXPLODEONWATER
   -CANBOUNCEWATER
   -SOLID
   +DONTSPLASH
   +NOINTERACTION
   States
   {
   Spawn:
      FDSP AB 3 BRIGHT A_FadeOut(0.1)
      loop
   Death:
      FDSP CDE 3 BRIGHT
      Stop 
   }
}

ACTOR FireDemonTrail2
{   
   Radius 2
   Height 2
   Speed 0
   Scale 1.0
   PROJECTILE
   RENDERSTYLE ADD
   +CLIENTSIDEONLY +DONTBLAST
   +NOINTERACTION
   ALPHA 0.67
   States
   {
   Spawn:
      NULL A 3 Bright
      FDFX ABCDE 3 BRIGHT
      Stop 
   }
}

Actor FireDemonLeader : NewFireDemon
{
	Health 100
	Obituary "%o tasted an Afrit Leader's fire."
	Tag "Afrit Leader"
	Species "Afrit"
	States
	{
	Spawn:
		FDNL X 0 Bright
		FDNL X 0 ACS_NamedExecuteAlways("WOC Monster Init",0,56,0)//increase health on higher difficulties//A_JumpIf(ACS_ExecuteWithResult(522,0,0,0)==1,"Mutate")
		FDNL X 5 Bright
		FDNL EFG 10 Bright A_Look
		Goto Spawn+3
	Idle:
		FDNL AB 10 Bright A_LookEx(0, 0, 0, 0, 0, "Chase")
		Loop
	See:
		FDNL E 8 Bright
		FDNL F 6 Bright
		FDNL G 5 Bright
		FDNL F 8 Bright
		FDNL E 6 Bright
		FDNL G 7 Bright A_FiredRocks
		FDNL HI 5 Bright
		FDNL J 5 Bright A_UnSetInvulnerable
	Chase:
		FDNL A 0 Bright A_UnsetInvulnerable
		FDNL AABBCC 3 Bright A_FireDChase
		Loop
	Pain:
		FDNL D 3 bright A_UnsetInvulnerable
		FDNL D 3 Bright A_Pain
		Goto Chase
	Missile:
		FDNL K 3 Bright A_FaceTarget
		TNT1 A 0 A_FaceTarget
		TNT1 A 0 A_PlaySound("FireDemonAttack")
		FDNL K 5 Bright A_CustomMissile("FireDemonLeaderMissile",32)
		TNT1 A 0 A_FaceTarget
		TNT1 A 0 A_PlaySound("FireDemonAttack")
		FDNL K 5 Bright A_CustomMissile("FireDemonLeaderMissile",32)
		TNT1 A 0 A_FaceTarget
		TNT1 A 0 A_PlaySound("FireDemonAttack")
		FDNL K 5 Bright A_CustomMissile("FireDemonLeaderMissile",32)
		TNT1 A 0 A_FaceTarget
		TNT1 A 0 A_PlaySound("FireDemonAttack")
		FDNL K 5 Bright A_CustomMissile("FireDemonLeaderMissile",32)
		TNT1 A 0 A_FaceTarget
		TNT1 A 0 A_PlaySound("FireDemonAttack")
		FDNL K 5 Bright A_CustomMissile("FireDemonLeaderMissile",32)
		Goto Chase
	Crash:
		FDNL M 5 A_FaceTarget
		FDNL N 5 A_NoBlocking
		TNT1 A 0 A_SpawnItemEx("FireDemonLeaderSplotch1",0,0,0,Random(1,2),Random(1,2),Random(3,5),Random(1,360))
		FDNL O 0 A_SpawnItemEx("FireDemonLeaderSplotch2",0,0,0,Random(1,2),Random(1,2),Random(3,5),Random(1,360))
		FDNL O 5 //A_BossDeath
		Stop
	XDeath:
		FDNL M 5 A_FaceTarget
		FDNL N 5 A_NoBlocking
		TNT1 A 0 A_SpawnItemEx("FireDemonLeaderSplotch1",0,0,0,Random(1,2),Random(1,2),Random(3,5),Random(1,360))
		FDNL O 0 A_SpawnItemEx("FireDemonLeaderSplotch2",0,0,0,Random(1,2),Random(1,2),Random(3,5),Random(1,360))
		FDNL O 5 //A_BossDeath
		Stop
	Death:
		FDNL D 4 Bright A_FaceTarget
		FDNL L 4 Bright A_Scream
		FDNL L 4 Bright A_NoBlocking
		FDNL L 200 Bright //A_BossDeath
		Stop
	Ice:
		"----" D 5 A_GenericFreezeDeath
		"----" D 1 A_FreezeDeathChunks
		Wait
	}
}

Actor FireDemonLeaderMissile
{
  Health 1000
  ReactionTime 8
  Speed 15
  FastSpeed 20
  Radius 10
  Height 6
  Mass 5
  Damage (ACS_NamedExecuteWithResult("WOC Monster Damage Scale",WOCTARGET,FRandom(1,8)))
  /*+NODAMAGETHRUST*/
  DamageType "Fire"
  Projectile
  +FLOORCLIP
  +SEEKERMISSILE
  RenderStyle Add
  DeathSound "FireDemonMissileHit"
  States
  {
  Spawn:
    FDLB A 1 Bright A_CustomMissile("FireDemonLeaderTrail1",0,0,Random(-200,200),50,Random(-200,200))
	FDLB A 1 Bright A_CustomMissile("FireDemonLeaderTrail2",0,0,0,0)
      Loop
  Death:
    FDLB BCDE 5 Bright
    Stop
  }
}

ACTOR FireDemonLeaderTrail1
{   
   Radius 2
   Height 2
   Speed 1
   ReactionTime 60
   PROJECTILE
   RENDERSTYLE ADD
   Alpha 0.75
   +CLIENTSIDEONLY +DONTBLAST
   +NOGRAVITY
   +DOOMBOUNCE
   +EXPLODEONWATER
   -CANBOUNCEWATER
   -SOLID
   +DONTSPLASH
   +NOINTERACTION
   States
   {
   Spawn:
      FLSP AB 3 BRIGHT A_FadeOut(0.1)
      loop
   Death:
      FLSP CDE 3 BRIGHT
      Stop 
   }
}

ACTOR FireDemonLeaderTrail2
{   
   Radius 2
   Height 2
   Speed 0
   Scale 1.0
   PROJECTILE
   RENDERSTYLE ADD
   +CLIENTSIDEONLY +DONTBLAST
   +NOINTERACTION
   ALPHA 0.67
   States
   {
   Spawn:
      NULL A 3 Bright
      FLFX ABCDE 3 BRIGHT
      Stop 
   }
}

Actor FireDemonLeaderSplotch1
{
   Health 1000
   ReactionTime 8
   Radius 3
   Height 16
   Mass 100
   +DROPOFF
   +CORPSE
   +NOTELEPORT
   +FLOORCLIP
   States
   {
   Spawn:
       FDNL P 3
       FDNL P 6 A_QueueCorpse
       FDNL Y -1
       Stop
   }
}

Actor FireDemonLeaderSplotch2 : FireDemonLeaderSplotch1
{
	States
	{
	Spawn:
		FDNL Q 3
		FDNL Q 6 A_QueueCorpse
		FDNL Z -1
		Stop
	}
}

Actor FireDemonCommander : NewFireDemon
{
	Health 150
	Obituary "%o tasted an Afrit Commander's fire."
	Tag "Afrit Commander"
	Species "Afrit"
	States
	{
	Spawn:
		FDNC X 0 Bright
		FDNC X 0 ACS_NamedExecuteAlways("WOC Monster Init",0,56,0)//increase health on higher difficulties//A_JumpIf(ACS_ExecuteWithResult(522,0,0,0)==1,"Mutate")
		FDNC X 5 Bright
		FDNC EFG 10 Bright A_Look
		Goto Spawn+3
	Idle:
		FDNC AB 10 Bright A_LookEx(0, 0, 0, 0, 0, "Chase")
		Loop
	See:
		FDNC E 8 Bright
		FDNC F 6 Bright
		FDNC G 5 Bright
		FDNC F 8 Bright
		FDNC E 6 Bright
		FDNC G 7 Bright A_FiredRocks
		FDNC HI 5 Bright
		FDNC J 5 Bright A_UnSetInvulnerable
	Chase:
		FDNC A 0 Bright A_UnsetInvulnerable
		FDNC AABBCC 3 Bright A_FireDChase
		Loop
	Pain:
		FDNC D 3 Bright A_UnsetInvulnerable
		FDNC D 3 Bright A_Pain
		Goto Chase
	Missile:
		FDNC K 3 Bright A_FaceTarget
		TNT1 A 0 A_FaceTarget
		TNT1 A 0 A_PlaySound("FireDemonAttack")
		FDNC K 5 Bright A_CustomMissile("FireDemonCommanderMissile",32)
		TNT1 A 0 A_FaceTarget
		TNT1 A 0 A_PlaySound("FireDemonAttack")
		FDNC K 5 Bright A_CustomMissile("FireDemonCommanderMissile",32)
		TNT1 A 0 A_FaceTarget
		TNT1 A 0 A_PlaySound("FireDemonAttack")
		FDNC K 5 Bright A_CustomMissile("FireDemonCommanderMissile",32)
		TNT1 A 0 A_FaceTarget
		TNT1 A 0 A_PlaySound("FireDemonAttack")
		FDNC K 5 Bright A_CustomMissile("FireDemonCommanderMissile",32)
		TNT1 A 0 A_FaceTarget
		TNT1 A 0 A_PlaySound("FireDemonAttack")
		FDNC K 5 Bright A_CustomMissile("FireDemonCommanderMissile",32)
		TNT1 A 0 A_FaceTarget
		TNT1 A 0 A_PlaySound("FireDemonAttack")
		FDNC K 5 Bright A_CustomMissile("FireDemonCommanderMissile",32)
		TNT1 A 0 A_FaceTarget
		TNT1 A 0 A_PlaySound("FireDemonAttack")
		FDNC K 5 Bright A_CustomMissile("FireDemonCommanderMissile",32)
		Goto Chase
	Crash:
		FDNC M 5 A_FaceTarget
		FDNC N 5 A_NoBlocking
		TNT1 A 0 A_SpawnItemEx("FireDemonCommanderSplotch1",0,0,0,Random(1,2),Random(1,2),Random(3,5),Random(1,360))
		FDNC O 0 A_SpawnItemEx("FireDemonCommanderSplotch2",0,0,0,Random(1,2),Random(1,2),Random(3,5),Random(1,360))
		FDNC O 5 //A_BossDeath
		Stop
	XDeath:
		FDNC M 5 A_FaceTarget
		FDNC N 5 A_NoBlocking
		TNT1 A 0 A_SpawnItemEx("FireDemonCommanderSplotch1",0,0,0,Random(1,2),Random(1,2),Random(3,5),Random(1,360))
		FDNC O 0 A_SpawnItemEx("FireDemonCommanderSplotch2",0,0,0,Random(1,2),Random(1,2),Random(3,5),Random(1,360))
		FDNC O 5 //A_BossDeath
		Stop
	Death:
		FDNC D 4 Bright A_FaceTarget
		FDNC L 4 Bright A_Scream
		FDNC L 4 Bright A_NoBlocking
		FDNC L 200 Bright //A_BossDeath
		Stop
	Ice:
		"----" D 5 A_GenericFreezeDeath
		"----" D 1 A_FreezeDeathChunks
		Wait
	}
}

Actor FireDemonCommanderMissile
{
  Health 1000
  ReactionTime 8
  Speed 15
  FastSpeed 20
  Radius 10
  Height 6
  Mass 5
  Damage (ACS_NamedExecuteWithResult("WOC Monster Damage Scale",WOCTARGET,FRandom(1,8)))
  /*+NODAMAGETHRUST*/
  DamageType "Fire"
  Projectile
  +FLOORCLIP
  RenderStyle Add
  DeathSound "FireDemonMissileHit"
  States
  {
  Spawn:
    FDCB A 1 Bright A_CustomMissile("FireDemonCommanderTrail1",0,0,Random(-200,200),50,Random(-200,200))
	FDCB A 1 Bright A_CustomMissile("FireDemonCommanderTrail2",0,0,0,0)
      Loop
  Death:
    FDCB BCDE 5 Bright
    Stop
  }
}

ACTOR FireDemonCommanderTrail1
{   
   Radius 2
   Height 2
   Speed 1
   ReactionTime 60
   PROJECTILE
   RENDERSTYLE ADD
   Alpha 0.75
   +CLIENTSIDEONLY +DONTBLAST
   +NOGRAVITY
   +DOOMBOUNCE
   +EXPLODEONWATER
   -CANBOUNCEWATER
   -SOLID
   +DONTSPLASH
   +NOINTERACTION
   States
   {
   Spawn:
      FCSP AB 3 BRIGHT A_FadeOut(0.1)
      loop
   Death:
      FCSP CDE 3 BRIGHT
      Stop 
   }
}

ACTOR FireDemonCommanderTrail2
{   
   Radius 2
   Height 2
   Speed 0
   Scale 1.0
   PROJECTILE
   RENDERSTYLE ADD
   +CLIENTSIDEONLY +DONTBLAST
   +NOINTERACTION
   ALPHA 0.67
   States
   {
   Spawn:
      NULL A 3 Bright
      FCFX ABCDE 3 BRIGHT
      Stop 
   }
}

Actor FireDemonCommanderSplotch1
{
   Health 1000
   ReactionTime 8
   Radius 3
   Height 16
   Mass 100
   +DROPOFF
   +CORPSE
   +NOTELEPORT
   +FLOORCLIP
   States
   {
   Spawn:
       FDNC P 3
       FDNC P 6 A_QueueCorpse
       FDNC Y -1
       Stop
   }
}

Actor FireDemonCommanderSplotch2 : FireDemonCommanderSplotch1
{
   States
   {
   Spawn:
       FDNC Q 3
       FDNC Q 6 A_QueueCorpse
       FDNC Z -1
       Stop
   }
}

Actor FireDemonQueen : NewFireDemon
{
	Health 1000
	+NEVERRESPAWN
	+DONTMORPH
	+NOFEAR
	+NOPAIN
	dropitem "ArtiPurpleFlask" 128
	dropitem "ArtiRedFlask" 128
	dropitem "ArtiAquaFlask" 128
	dropItem "ArtiBlackFlask" 128
	DropItem "ArtiWhiteFlask" 128
	DropItem "ArtiYellowFlask" 128
	Dropitem "ArtiOrangeFlask" 128
	DropItem "ArtiTanFlask" 128
	DropItem "ArtiBlueFlask" 128
	dropitem "ArtiPurpleFlask" 128
	dropitem "ArtiRedFlask" 128
	dropitem "ArtiAquaFlask" 128
	dropItem "ArtiBlackFlask" 128
	DropItem "ArtiWhiteFlask" 128
	DropItem "ArtiYellowFlask" 128
	Dropitem "ArtiOrangeFlask" 128
	DropItem "ArtiTanFlask" 128
	DropItem "ArtiBlueFlask" 128
	Dropitem "newArtiBoostMana" 128
	DropItem "ForceCube" 128
	DropItem "AccessoryRandomSpawner" 32
	Obituary "%o tasted an Afrit Queen's fire."
	DamageFactor "Deathblow", 0
	Tag "Afrit Queen"
	Species "Afrit"
	DamageFactor "Fire", 1.0
	DamageFactor "FirePlayer", 1.0
	DamageFactor "FireTime", 1.0
	DamageFactor "Ice", 1.0
	DamageFactor "IcePlayer", 1.0
	DamageFactor "IceTime", 1.0
	DamageFactor "Arcane", 0.5
	DamageFactor "ArcanePlayer", 0.5
	DamageFactor "ArcaneTime", 0.5
	DamageFactor "Physical", 2.0
	DamageFactor "PhysicalPlayer", 2.0
	DamageFactor "Bleed", 2.0
	States
	{
	Spawn:
		FDNQ X 0 Bright
		FDNQ X 0 ACS_NamedExecuteAlways("WOC Monster Init",0,56,WOC_STATUSIMMUNE)//increase health on higher difficulties//A_JumpIf(ACS_ExecuteWithResult(522,0,0,0)==1,"Mutate")
		FDNQ X 5 Bright
		FDNQ EFG 10 Bright A_Look
		Goto Spawn+3
	Idle:
		FDNQ AB 10 Bright A_LookEx(0, 0, 0, 0, 0, "Chase")
		Loop
	See:
		FDNQ E 8 Bright
		FDNQ F 6 Bright
		FDNQ G 5 Bright
		FDNQ F 8 Bright
		FDNQ E 6 Bright
		FDNQ G 7 Bright A_FiredRocks
		FDNQ HI 5 Bright
		FDNQ J 5 Bright A_UnSetInvulnerable
	Chase:
		FDNQ A 0 Bright A_UnsetInvulnerable
		FDNQ AABBCC 3 Bright A_FireDChase
		Loop
	Pain:
		FDNQ D 3 Bright A_UnsetInvulnerable
		FDNQ D 3 Bright A_Pain
		Goto Chase
	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",32)
		TNT1 A 0 A_FaceTarget
		TNT1 A 0 A_PlaySound("FireDemonAttack")
		FDNQ K 4 Bright A_CustomMissile("FireDemonQueenMissile",32)
		TNT1 A 0 A_FaceTarget
		TNT1 A 0 A_PlaySound("FireDemonAttack")
		FDNQ K 4 Bright A_CustomMissile("FireDemonQueenMissile",32)
		TNT1 A 0 A_FaceTarget
		TNT1 A 0 A_PlaySound("FireDemonAttack")
		FDNQ K 4 Bright A_CustomMissile("FireDemonQueenMissile",32)
		TNT1 A 0 A_FaceTarget
		TNT1 A 0 A_PlaySound("FireDemonAttack")
		FDNQ K 4 Bright A_CustomMissile("FireDemonQueenMissile",32)
		TNT1 A 0 A_FaceTarget
		TNT1 A 0 A_PlaySound("FireDemonAttack")
		FDNQ K 4 Bright A_CustomMissile("FireDemonQueenMissile",32)
		TNT1 A 0 A_FaceTarget
		TNT1 A 0 A_PlaySound("FireDemonAttack")
		FDNQ K 4 Bright A_CustomMissile("FireDemonQueenMissile",32)
		TNT1 A 0 A_FaceTarget
		TNT1 A 0 A_PlaySound("FireDemonAttack")
		FDNQ K 4 Bright A_CustomMissile("FireDemonQueenMissile",32)
		TNT1 A 0 A_FaceTarget
		TNT1 A 0 A_PlaySound("FireDemonAttack")
		FDNQ K 4 Bright A_CustomMissile("FireDemonQueenMissile",32)
		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
	Crash:
		FDNQ M 5 A_FaceTarget
		FDNQ N 5// A_NoBlocking
		TNT1 A 0 A_SpawnItemEx("FireDemonQueenSplotch1",0,0,0,Random(1,2),Random(1,2),Random(3,5),Random(1,360))
		FDNQ O 0 A_SpawnItemEx("FireDemonQueenSplotch2",0,0,0,Random(1,2),Random(1,2),Random(3,5),Random(1,360))
		FDNQ O 5 //A_BossDeath
		Stop
	XDeath:
		TNT1 A 0 A_KillChildren
		FDNQ D 0 Bright A_NoBlocking
		FDNQ M 5 A_FaceTarget
		FDNQ N 5
		TNT1 A 0 A_SpawnItemEx("FireDemonQueenSplotch1",0,0,0,Random(1,2),Random(1,2),Random(3,5),Random(1,360))
		FDNQ O 0 A_SpawnItemEx("FireDemonQueenSplotch2",0,0,0,Random(1,2),Random(1,2),Random(3,5),Random(1,360))
		FDNQ O 5 //A_BossDeath
		Stop
	Death:
		TNT1 A 0 A_KillChildren
		FDNQ D 0 Bright A_NoBlocking
		FDNQ D 4 Bright A_FaceTarget
		FDNQ L 4 Bright A_Scream
		FDNQ L 4 Bright
		FDNQ L 200 Bright //A_BossDeath
		Stop
	Ice:
		"----" A 0 A_KillChildren
		"----" A 5 A_GenericFreezeDeath
		"----" A 1 A_FreezeDeathChunks
		Wait
	}
}

actor FireDemonQueenClone : FireDemonQueen
{
	Health 1
	+NOBLOOD
	-COUNTKILL
	-TELESTOMP
	-INVULNERABLE
	+GHOST
	RenderStyle Translucent
	Alpha 0.0
	Tag "Afrit Queen Clone"
	+USEKILLSCRIPTS
	Species "Afrit"
	DamageFactor "Arcane", 1.5
	DamageFactor "ArcanePlayer", 1.5
	DamageFactor "ArcaneTime", 1.5
	DamageFactor "PoisonTime", 0
	DamageFactor "Bleed", 0
	States
	{
	Spawn:
		FNDQ A 0
		FNDQ A 0 ACS_NamedExecuteAlways("WOC Monster Init",0,56,WOC_STATUSIMMUNE|WOC_NOEXPERIENCE)
		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",32)
		TNT1 A 0 A_FaceTarget
		TNT1 A 0 A_PlaySound("FireDemonAttack")
		FDNQ K 4 Bright A_CustomMissile("FireDemonQueenMissile",32)
		TNT1 A 0 A_FaceTarget
		TNT1 A 0 A_PlaySound("FireDemonAttack")
		FDNQ K 4 Bright A_CustomMissile("FireDemonQueenMissile",32)
		Goto Chase
	Crash:
	XDeath:
	Death:
		FDNQ A 1 Bright A_FadeOut(0.10)
		Loop
	}
}

Actor FireDemonQueenMissile
{
  Health 1000
  ReactionTime 8
  Speed 15
  FastSpeed 20
  Radius 10
  Height 6
  Mass 5
  Damage (ACS_NamedExecuteWithResult("WOC Monster Damage Scale",WOCTARGET,FRandom(1,8)))
  /*+NODAMAGETHRUST*/
  DamageType "Fire"
  Projectile
  +FLOORCLIP
  +SEEKERMISSILE
  RenderStyle Add
  DeathSound "FireDemonMissileHit"
  States
  {
  Spawn:
    FDQB A 1 Bright A_CustomMissile("FireDemonQueenTrail1",0,0,Random(-200,200),50,Random(-200,200))
	FDQB A 1 Bright A_CustomMissile("FireDemonQueenTrail2",0,0,0,0)
	FDQB A 1 Bright A_CustomMissile("FireDemonQueenTrail1",0,0,Random(-200,200),50,Random(-200,200))
	FDQB A 1 Bright A_CustomMissile("FireDemonQueenTrail2",0,0,0,0)
	FDQB A 0 Bright A_SeekerMissile(14,14,SMF_PRECISE)
      Loop
  Death:
    FDQB BCDE 5 Bright
    Stop
  }
}

ACTOR FireDemonQueenTrail1
{   
   Radius 2
   Height 2
   Speed 1
   ReactionTime 60
   PROJECTILE
   RENDERSTYLE ADD
   Alpha 0.75
   +CLIENTSIDEONLY +DONTBLAST
   +NOGRAVITY
   +DOOMBOUNCE
   +EXPLODEONWATER
   -CANBOUNCEWATER
   -SOLID
   +DONTSPLASH
   +NOINTERACTION
   States
   {
   Spawn:
      FQSP AB 3 BRIGHT A_FadeOut(0.1)
      loop
   Death:
      FQSP CDE 3 BRIGHT
      Stop 
   }
}

ACTOR FireDemonQueenTrail2
{   
   Radius 2
   Height 2
   Speed 0
   Scale 1.0
   PROJECTILE
   RENDERSTYLE ADD
   +CLIENTSIDEONLY +DONTBLAST
   +NOINTERACTION
   ALPHA 0.67
   States
   {
   Spawn:
      NULL A 3 Bright
      FQFX ABCDE 3 BRIGHT
      Stop 
   }
}

Actor FireDemonQueenSplotch1
{
   Health 1000
   ReactionTime 8
   Radius 3
   Height 16
   Mass 100
   +DROPOFF
   +CORPSE
   +NOTELEPORT
   +FLOORCLIP
   States
   {
   Spawn:
       FDNQ P 3
       FDNQ P 6 A_QueueCorpse
       FDMN Y -1
       Stop
   }
}

Actor FireDemonQueenSplotch2 : FireDemonQueenSplotch1
{
   States
   {
   Spawn:
       FDNQ Q 3
       FDNQ Q 6 A_QueueCorpse
       FDMN Z -1
       Stop
   }
}

Actor Demon1SpotZ : RandomSpawner replaces Demon1
{
	Game Hexen
	SpawnID 3
	+TELESTOMP
	DropItem "NewDemon1" 255 235
	DropItem "Demon3" 255 20
	DropItem "Demon5" 255 1
}

Actor Demon2SpotZ : RandomSpawner replaces Demon2
{
	+TELESTOMP
	DropItem "NewDemon2" 255 235
	DropItem "Demon4" 255 20
	DropItem "Demon5" 255 1
}

Actor NewDemon1 : Demon1
{
	Speed 13
	Meleerange 82
	Tag "Chaos Serpent"
	Species "ChaosSerpent"
	Dropitem "ReagentTan" 32
	DamageFactor "Ice", 1.25
	DamageFactor "IcePlayer", 1.25
	DamageFactor "IceTime", 1.25
	DamageFactor "Fire", 0.75
	DamageFactor "FirePlayer", 0.75
	DamageFactor "FireTime", 0.75
	+USEKILLSCRIPTS
	States
	{
	Spawn:
		DEMN A 0
   	 	DEMN A 0 ACS_NamedExecuteAlways("WOC Monster Init",0,96,0)
	Idle:
		DEMN AA 10 A_Look
    	Loop
	See:
		DEMN A 4 A_Chase
		DEMN B 3 A_Chase
		DEMN C 4 A_Chase
		DEMN D 3 A_Chase
		Loop
	Pain:
		DEMN E 4
		DEMN E 4 A_Pain
		Goto See
	Missile:
		DEMN E 5 A_FaceTarget
		DEMN F 6 A_FaceTarget
		DEMN G 5 A_CustomMissile("Demon1FX1", 70, 0)
		Goto See
	Melee:
		DEMN E 5 A_FaceTarget
		DEMN F 6 A_FaceTarget
		DEMN G 5 A_CustomMeleeAttack(ACS_NamedExecuteWithResult("WOC Monster Damage Scale",ACTIVATOR,FRandom(16, 18)), "", "", "Physical")
		Goto See
	Death:
		DEMN H 0 A_SpawnItemEx("GIBBER")
		DEMN HI 6
		DEMN J 6 A_Scream
		DEMN K 6 A_NoBlocking
		DEMN L 6 A_QueueCorpse
		DEMN MNO 6
		DEMN P -1 //A_BossDeath
		Stop
	XDeath:
		DEMN H 6 A_SpawnItemEx("GIBBER")
		DEMN I 0 A_SpawnItemEx("Demon1Chunk1", 0,0,45, 1+(random[DemonChunks](0,255)*0.015625),
                           1+(random[DemonChunks](0,255)*0.015625), ChunkFlags, 90)
		DEMN I 0 A_SpawnItemEx("Demon1Chunk2", 0,0,45, 1+(random[DemonChunks](0,255)*0.015625),
							   1+(random[DemonChunks](0,255)*0.015625), ChunkFlags, 270)
		DEMN I 0 A_SpawnItemEx("Demon1Chunk3", 0,0,45, 1+(random[DemonChunks](0,255)*0.015625),
							   1+(random[DemonChunks](0,255)*0.015625), ChunkFlags, 270)
		DEMN I 0 A_SpawnItemEx("Demon1Chunk4", 0,0,45, 1+(random[DemonChunks](0,255)*0.015625),
							   1+(random[DemonChunks](0,255)*0.015625), ChunkFlags, 270)
		DEMN I 6 A_SpawnItemEx("Demon1Chunk5", 0,0,45, 1+(random[DemonChunks](0,255)*0.015625),
							   1+(random[DemonChunks](0,255)*0.015625), ChunkFlags, 270)
		Goto Death+3

	Ice:
		"----" E 5 A_GenericFreezeDeath
		"----" E 1 A_FreezeDeathChunks
		Wait
	Raise:
		DEMN A 0 ACS_NamedExecuteAlways("WOC Monster Init",0,96,0)
		DEMN PONMLKJIH 6
		Goto See
	}
}

ACTOR NewDemon1Mash : NewDemon1 replaces Demon1Mash
{
	Game Hexen
	SpawnID 100
	+NOBLOOD
	+NOICEDEATH
	+GHOST
	+SHADOW
	RenderStyle Translucent
	Alpha 0.4
	DamageFactor "Fire", 1.0
	DamageFactor "FirePlayer", 1.0
	DamageFactor "FireTime", 1.0
	DamageFactor "Ice", 1.0
	DamageFactor "IcePlayer", 1.0
	DamageFactor "IceTime", 1.0
	DamageFactor "Arcane", 1.5
	DamageFactor "ArcanePlayer", 1.5
	DamageFactor "ArcaneTime", 1.5
	DamageFactor "PoisonTime", 0
	DamageFactor "Bleed", 0
}

Actor NewDemon1FX1 : Demon1FX1 replaces Demon1FX1
{
	Damage (ACS_NamedExecuteWithResult("WOC Monster Damage Scale",WOCTARGET,FRandom(15,30)))
	Speed 19
	FastSpeed 25
	/*+NODAMAGETHRUST*/
	-SPAWNSOUNDSOURCE
	States
	{
	Spawn:
		DMFX AABBCC 2 Bright A_spawnitemEx("Demon1FX1Trail")
		Loop
	}
}

ACTOR Demon1FX1Trail
{
    Radius 1
    Height 1
	Gravity 0
	Speed 1
	Scale 0.3
    +NOBLOCKMAP
    +NOTELEPORT
    +DONTSPLASH
	+MISSILE
	+CLIENTSIDEONLY +DONTBLAST
	+FORCEXYBILLBOARD
	Renderstyle Add
    States
    {
    Spawn:
        DMFX DEFGH 2 bright
        Stop
    }
}

Actor Demon3 : NewDemon1
{
	Health 500
	Dropitem "ReagentRed" 32
	Species "ChaosSerpent"
	BloodColor "Orange"
	Obituary "%o was blasted by a Magma Serpent."
	HitObituary "%o was swallowed by a Magma Serpent."
	Tag "Magma Serpent"
	DamageFactor "Fire", 0.5
	DamageFactor "FirePlayer", 0.5
	DamageFactor "FireTime", 0.5
	DamageFactor "Ice", 2.0
	DamageFactor "IcePlayer", 2.0
	DamageFactor "IceTime", 2.0
	States
	{
	Spawn:
		RDMN A 0
		RDMN A 0 ACS_NamedExecuteAlways("WOC Monster Init",0,96,0)//increase health on higher difficulties//A_JumpIf(ACS_ExecuteWithResult(535,0,0,0)==1,"Mutate")
		Goto Idle
	Idle:
		RDMN AA 10 A_Look
		Loop
	See:
		RDMN ABCD 4 A_Chase
		Loop
	Pain:
		RDMN E 4
		RDMN E 4 A_Pain
		Goto See
	Melee:
		RDMN E 5 A_FaceTarget
		RDMN F 6 A_FaceTarget
		RDMN G 5 A_CustomMeleeAttack(ACS_NamedExecuteWithResult("WOC Monster Damage Scale",ACTIVATOR,FRandom(20,24)), "", "", "Physical")
		Goto See
	Missile:
		RDMN E 0 A_Jump(128,"Breath")
		RDMN E 5 A_FaceTarget
		RDMN F 6 A_FaceTarget
		RDMN G 5 A_CustomMissile("Demon3FX",70,0,0,0)
		Goto See
	Breath:
		RDMN G 0 A_JumpIfCloser(300, 1)
		Goto Missile+1
		RDMN G 5 A_FaceTarget
		RDMN G 0 A_FaceTarget
		RDMN G 2 A_CustomMissile("Demon3Jet", 70, 0, FRandom(-5,5))
		RDMN G 0 A_FaceTarget
		RDMN G 2 A_CustomMissile("Demon3Jet", 70, 0, FRandom(-5,5))
		RDMN G 0 A_FaceTarget
		RDMN G 2 A_CustomMissile("Demon3Jet", 70, 0, FRandom(-5,5))
		RDMN G 0 A_FaceTarget
		RDMN G 2 A_CustomMissile("Demon3Jet", 70, 0, FRandom(-5,5))
		RDMN G 0 A_FaceTarget
		RDMN G 2 A_CustomMissile("Demon3Jet", 70, 0, FRandom(-5,5))
		RDMN G 0 A_FaceTarget
		RDMN G 2 A_CustomMissile("Demon3Jet", 70, 0, FRandom(-5,5))
		RDMN G 0 A_FaceTarget
		RDMN G 2 A_CustomMissile("Demon3Jet", 70, 0, FRandom(-5,5))
		RDMN G 0 A_FaceTarget
		RDMN G 2 A_CustomMissile("Demon3Jet", 70, 0, FRandom(-5,5))
		RDMN G 0 A_FaceTarget
		RDMN G 2 A_CustomMissile("Demon3Jet", 70, 0, FRandom(-5,5))
		RDMN G 0 A_FaceTarget
		RDMN G 2 A_CustomMissile("Demon3Jet", 70, 0, FRandom(-5,5))
		Goto See
	Death:
		RDMN H 6 A_SpawnItemEx("GIBBER", 0, 0, 0, 0, 0, 0, 0, SXF_USEBLOODCOLOR)
		RDMN I 6
		RDMN J 6 A_Scream
		RDMN K 6 A_NoBlocking
		RDMN L 6  A_QueueCorpse
		RDMN MNO 6
		RDMN P -1 //A_BossDeath
		Stop
	XDeath:
		RDMN H 6 A_SpawnItemEx("GIBBER", 0, 0, 0, 0, 0, 0, 0, SXF_USEBLOODCOLOR)
		TNT1 A 0 A_SpawnItemEx("Demon3Chunk1", 0,0,45, 1+(random[DemonChunks](0,255)*0.015625),1+(random[DemonChunks](0,255)*0.015625), ChunkFlags, 90)
		TNT1 A 0 A_SpawnItemEx("Demon3Chunk2", 0,0,45, 1+(random[DemonChunks](0,255)*0.015625),1+(random[DemonChunks](0,255)*0.015625), ChunkFlags, 270)
		TNT1 A 0 A_SpawnItemEx("Demon3Chunk3", 0,0,45, 1+(random[DemonChunks](0,255)*0.015625),1+(random[DemonChunks](0,255)*0.015625), ChunkFlags, 270)
		TNT1 A 0 A_SpawnItemEx("Demon3Chunk4", 0,0,45, 1+(random[DemonChunks](0,255)*0.015625),1+(random[DemonChunks](0,255)*0.015625), ChunkFlags, 270)
		RDMN I 6 A_SpawnItemEx("Demon3Chunk5", 0,0,45, 1+(random[DemonChunks](0,255)*0.015625),1+(random[DemonChunks](0,255)*0.015625), ChunkFlags, 270)
		Goto Death+2
	Ice:
		"----" E 5 A_GenericFreezeDeath
		"----" E 1 A_FreezeDeathChunks
		Wait
	Raise:
		RDMN A 0 ACS_NamedExecuteAlways("WOC Monster Init",0,96,0)
		RDMN PONMLKJIH 6
		Goto See
	}
}

Actor Demon5 : NewDemon1
{
	Health 1400
	Painchance 10
	Mass 500
	+NOBLOOD
	+NOICEDEATH
	+GHOST
	+DONTMORPH
	+USEKILLSCRIPTS
	+NOFEAR
	+NEVERRESPAWN
	Dropitem "newartidarkservant" 128
	Dropitem "NewArtiTorch" 128
	Dropitem "NewArtiSpeedBoots" 128
	DropItem "NewArtiHealingRadius" 128
	DropItem "NewArtiPork" 128
	DropItem "NewArtiTeleport" 128
	Dropitem "NewArtiSuperHealth" 128
	Dropitem "newArtiBoostMana" 128
	DropItem "ForceCube" 128
	DropItem "AccessoryRandomSpawner" 32
	Renderstyle Add
	Species "ChaosSerpent"
	Obituary "%o was blasted by a Spectral Chaos Serpent."
	Tag "Spectral Chaos Serpent"
	DamageFactor "Fire", 1.0
	DamageFactor "FirePlayer", 1.0
	DamageFactor "FireTime", 1.0
	DamageFactor "Ice", 1.0
	DamageFactor "IcePlayer", 1.0
	DamageFactor "IceTime", 1.0
	DamageFactor "Arcane", 1.5
	DamageFactor "ArcanePlayer", 1.5
	DamageFactor "ArcaneTime", 1.5
	DamageFactor "PoisonTime", 0
	DamageFactor "Bleed", 0
	States
	{
	Spawn:
		DEM5 A 0
		DEM5 A 0 ACS_NamedExecuteAlways("WOC Monster Init",0,96,WOC_STATUSIMMUNE)//increase health on higher difficulties//A_JumpIf(ACS_ExecuteWithResult(535,0,0,0)==1,"Mutate")
	Idle:
		DEM5 AA 10 A_Look
		Loop
	See:
		DEM5 ABCD 4 A_Chase
		Loop
	Pain:
		DEM5 E 4
		DEM5 E 4 A_Pain
		Goto See
	Melee:
		DEM5 E 5 A_FaceTarget
		DEM5 F 6 A_FaceTarget
		DEM5 G 5 A_CustomMeleeAttack(ACS_NamedExecuteWithResult("WOC Monster Damage Scale",ACTIVATOR,FRandom(26,46)), "", "", "Holy")
		Goto See
	Missile:
		DEM5 E 5 A_FaceTarget
		DEM5 F 6 A_FaceTarget
		DEM5 G 0 A_Jump(128,6)
		DEM5 G 0 A_CustomMissile ("Demon5FX1", 70, 0, -10)
		DEM5 G 0 A_CustomMissile ("Demon5FX1", 70, 0, 0)
		DEM5 G 0 A_CustomMissile ("Demon5FX1", 70, 0, -20)
		DEM5 G 0 A_CustomMissile ("Demon5FX1", 70, 0, 20)
		DEM5 G 5 A_CustomMissile ("Demon5FX1", 70, 0, 10)
		Goto See
		DEM5 G 2 A_CustomMissile("Demon5Jet", 70, 0)
		DEM5 G 2 A_CustomMissile("Demon5Jet", 70, 0)
		DEM5 G 2 A_CustomMissile("Demon5Jet", 70, 0)
		DEM5 G 2 A_CustomMissile("Demon5Jet", 70, 0)
		DEM5 G 2 A_CustomMissile("Demon5Jet", 70, 0)
		DEM5 G 2 A_CustomMissile("Demon5Jet", 70, 0)
		DEM5 G 2 A_CustomMissile("Demon5Jet", 70, 0)
		DEM5 G 2 A_CustomMissile("Demon5Jet", 70, 0)
		DEM5 G 2 A_CustomMissile("Demon5Jet", 70, 0)
		DEM5 G 2 A_CustomMissile("Demon5Jet", 70, 0)
		Goto See
	Death:
		"----" H 0 A_NoBlocking
		"----" H 2 A_FadeOut
		Wait
	XDeath:
		Stop
	Ice:
		Stop
	}
}

ACTOR Demon5FX1
{
	Speed 19
	FastSpeed 25
	Radius 10
	Height 6
	Damage (ACS_NamedExecuteWithResult("WOC Monster Damage Scale",WOCTARGET,FRandom(15,30)))
	/*+NODAMAGETHRUST*/
	DamageType "Holy"
	Projectile
	+SPAWNSOUNDSOURCE
	+HITTRACER
	RenderStyle Add
	SeeSound "DemonMissileFire"
	DeathSound "DemonMissileExplode"
	States
	{
	Spawn:
		D5FX ABCDEF 4 Bright
		Loop
	Death:
		D5FX G 0 Bright A_TakeInventory("Mana1", ACS_NamedExecuteWithResult("WOC Monster Damage Scale", WOCTARGET, 5), 0, AAPTR_TRACER)
		D5FX G 0 Bright A_TakeInventory("Mana2", ACS_NamedExecuteWithResult("WOC Monster Damage Scale", WOCTARGET, 5), 0, AAPTR_TRACER)
		D5FX GHIJ 4 Bright
		D5FX KL 3 Bright
		Stop
	}
}

ACTOR Demon5Jet
{
	Radius 14
	Height 12
	Speed 16
	Damage (ACS_NamedExecuteWithResult("WOC Monster Damage Scale",WOCTARGET,FRandom(4,6)))
	PROJECTILE
	+HITTRACER
	Renderstyle Add
	Alpha 0.5
	SeeSound "DemonMissileFire"
	DeathSound "FireBall"
	DamageType "Holy"
	States
	{
	Spawn:
		D5JT ABC 4 BRIGHT
		Loop
	Death:
		D5JT D 0 Bright A_TakeInventory("Mana1", ACS_NamedExecuteWithResult("WOC Monster Damage Scale",WOCTARGET,2), 0, AAPTR_TRACER)
		D5JT D 0 Bright A_TakeInventory("Mana2", ACS_NamedExecuteWithResult("WOC Monster Damage Scale",WOCTARGET,2), 0, AAPTR_TRACER)
		D5JT DEFG 4 BRIGHT
		Stop
	}
}

Actor Demon3Chunk1 : DemonChunk
{
  States
  {
  Spawn:
    RDMA A 4
    RDMA A 10 A_QueueCorpse
    RDMA A 20
    Wait
  Death:
    RDMA A -1
    Stop
  }
}

Actor Demon3Chunk2 : DemonChunk
{
  States
  {
  Spawn:
    RDMB A 4
    RDMB A 10 A_QueueCorpse
    RDMB A 20
    Wait
  Death:
    RDMB A -1
    Stop
  }
}

Actor Demon3Chunk3 : DemonChunk
{
  States
  {
  Spawn:
    RDMC A 4
    RDMC A 10 A_QueueCorpse
    RDMC A 20
    Wait
  Death:
    RDMC A -1
    Stop
  }
}

Actor Demon3Chunk4 : DemonChunk
{
  States
  {
  Spawn:
    RDMD A 4
    RDMD A 10 A_QueueCorpse
    RDMD A 20
    Wait
  Death:
    RDMD A -1
    Stop
  }
}

Actor Demon3Chunk5 : DemonChunk
{
  States
  {
  Spawn:
    RDME A 4
    RDME A 10 A_QueueCorpse
    RDME A 20
    Wait
  Death:
    RDME A -1
    Stop
  }
}

Actor Demon3FX
{
	Speed 19
	FastSpeed 25
	Radius 10
	Height 6
	Damage (ACS_NamedExecuteWithResult("WOC Monster Damage Scale",WOCTARGET,FRandom(17,37)))
	/*+NODAMAGETHRUST*/
	DamageType Fire
	Projectile
	RenderStyle Add
	SeeSound "DemonMissileFire"
	DeathSound "DemonMissileExplode"
	States
	{
	Spawn:
		RDFX AABBCC 2 Bright A_spawnitemEx("Demon3FX1Trail")
		Loop
	Death:
		TNT1 AAA 0 A_CustomMissile("HrVolcanoTBlast",0,0,random(0,359),CMF_TRACKOWNER,random(0,60))
		TNT1 AAA 0 A_CustomMissile("HrVolcanoTBlast",0,0,random(0,359),CMF_TRACKOWNER,random(0,60))
		TNT1 AA 0 A_CustomMissile("HrVolcanoTBlast",0,0,random(0,359),CMF_TRACKOWNER,random(0,60))
		XPL1 A 4 BRIGHT A_CustomMissile("HrVolcanoTBlast",0,0,random(0,359),CMF_TRACKOWNER,random(0,60))
		XPL1 B 4 BRIGHT
		XPL1 CDEF 4 BRIGHT
		Stop
	}
}

ACTOR Demon3Jet
{
	Radius 14
	Height 12
	Speed 16
	Damage (ACS_NamedExecuteWithResult("WOC Monster Damage Scale",WOCTARGET,FRandom(4,6)))
	DamageType "Fire"
	PROJECTILE
	RenderStyle Add
	SeeSound "DemonMissileFire"
	DeathSound "FireBall"
	States
	{
	Spawn:
		FX06 ABC 2 BRIGHT A_FadeOut
		Loop
	Death:
		FX06 DEFG 4 BRIGHT
		Stop
	}
}

ACTOR Demon3FX1Trail
{
    Radius 1
    Height 1
	Gravity 0
	Speed 1
	Scale 1.1
    +NOBLOCKMAP
    +NOTELEPORT
    +DONTSPLASH
	+MISSILE
	+CLIENTSIDEONLY +DONTBLAST
	+FORCEXYBILLBOARD
	+NOINTERACTION
	Renderstyle Add
    States
    {
    Spawn:
        FBL1 CDEFG 4
        Stop
    }
}

ACTOR HrVolcanoTBlast
{
	Radius 8
	Height 6
	Speed 20
	Damage (ACS_NamedExecuteWithResult("WOC Monster Damage Scale",WOCTARGET,FRandom(1,8)))
	/*+NODAMAGETHRUST*/
	Gravity 0.825
	+NOBLOCKMAP
	+MISSILE
	+DROPOFF
	+NOTELEPORT
	Damagetype "Fire"
	Renderstyle Add
	States
	{
	Spawn:
		VTFB AB 4 BRIGHT
		Loop
	Death:
		SFFI CBABCDE 4 BRIGHT
		Stop
	}
}

Actor NewDemon2 : Demon2
{	
	Speed 13
	Meleerange 82
	Tag "Chaos Serpent"
	Species "ChaosSerpent"
	Dropitem "ReagentTan" 32
	+USEKILLSCRIPTS
	DamageFactor "Ice", 1.25
	DamageFactor "IcePlayer", 1.25
	DamageFactor "IceTime", 1.25
	DamageFactor "Poison", 0.75
	DamageFactor "PoisonPlayer", 0.75
	DamageFactor "PoisonTime", 0.75
	States
	{
	Spawn:
		DEM2 A 0
   	 	DEM2 A 0 ACS_NamedExecuteAlways("WOC Monster Init",0,96,0)//increase health on higher difficulties//A_JumpIf(ACS_ExecuteWithResult(536,0,0,0)==1,"Mutate")
	Idle:
		DEM2 AA 10 A_Look
    	Loop
	See:
		DEM2 A 4 A_Chase
		DEM2 B 3 A_Chase
		DEM2 C 4 A_Chase
		DEM2 D 3 A_Chase
		Loop
	Pain:
		DEM2 E 4
		DEM2 E 4 A_Pain
		Goto See
	Missile:
		DEM2 E 5 A_FaceTarget
		DEM2 F 6 A_FaceTarget
		DEM2 G 5 A_CustomMissile("Demon2FX1", 70, 0)
		Goto See
	Melee:
		DEM2 E 5 A_FaceTarget
		DEM2 F 6 A_FaceTarget
		DEM2 G 5 A_CustomMeleeAttack(ACS_NamedExecuteWithResult("WOC Monster Damage Scale",ACTIVATOR,FRandom(16, 18)), "", "", "Physical")
		Goto See
	Death:
		DEM2 H 0 A_SpawnItemEx("GIBBER")
		DEM2 HI 6
		DEM2 J 6 A_Scream
		DEM2 K 6 A_NoBlocking
		DEM2 L 6 A_QueueCorpse
		DEM2 MNO 6
		DEM2 P -1 //A_BossDeath
		Stop
	XDeath:
		DEM2 H 6 A_SpawnItemEx("GIBBER")
		DEM2 I 0 A_SpawnItemEx("Demon2Chunk1", 0,0,45, 1+(random[DemonChunks](0,255)*0.015625),
							   1+(random[DemonChunks](0,255)*0.015625), ChunkFlags, 90)
		DEM2 I 0 A_SpawnItemEx("Demon2Chunk2", 0,0,45, 1+(random[DemonChunks](0,255)*0.015625),
							   1+(random[DemonChunks](0,255)*0.015625), ChunkFlags, 270)
		DEM2 I 0 A_SpawnItemEx("Demon2Chunk3", 0,0,45, 1+(random[DemonChunks](0,255)*0.015625),
							   1+(random[DemonChunks](0,255)*0.015625), ChunkFlags, 270)
		DEM2 I 0 A_SpawnItemEx("Demon2Chunk4", 0,0,45, 1+(random[DemonChunks](0,255)*0.015625),
							   1+(random[DemonChunks](0,255)*0.015625), ChunkFlags, 270)
		DEM2 I 6 A_SpawnItemEx("Demon2Chunk5", 0,0,45, 1+(random[DemonChunks](0,255)*0.015625),
							   1+(random[DemonChunks](0,255)*0.015625), ChunkFlags, 270)
		Goto Death+3
	Ice:
		"----" E 5 A_GenericFreezeDeath
		"----" E 1 A_FreezeDeathChunks
		Wait
	Raise:
		DEM2 A 0 ACS_NamedExecuteAlways("WOC Monster Init",0,96,0)
		DEM2 PONMLKJIH 6
		Goto See
	}
}

ACTOR NewDemon2Mash : NewDemon2 replaces Demon2Mash
{
	Game Hexen
	SpawnID 101
	+NOBLOOD
	+NOICEDEATH
	+GHOST
	+SHADOW
	RenderStyle Translucent
	Alpha 0.4
	DamageFactor "Fire", 1.0
	DamageFactor "FirePlayer", 1.0
	DamageFactor "FireTime", 1.0
	DamageFactor "Ice", 1.0
	DamageFactor "IcePlayer", 1.0
	DamageFactor "IceTime", 1.0
	DamageFactor "Arcane", 1.5
	DamageFactor "ArcanePlayer", 1.5
	DamageFactor "ArcaneTime", 1.5
	DamageFactor "PoisonTime", 0
	DamageFactor "Bleed", 0
}

Actor Demon4 : NewDemon2
{
	Health 500
	BloodColor 00 80 00
	dropitem "ReagentGreen" 32
	Species "ChaosSerpent"
	Obituary "%o was envenomed by a Black Serpent."
	Damagetype "Physical"
	Tag "Black Serpent"
	+USEKILLSCRIPTS
	DamageFactor "Poison", 0.5
	DamageFactor "PoisonPlayer", 0.5
	DamageFactor "PoisonTime", 0.5
	States
	{
	Spawn:
		DEM4 A 0
		DEM4 A 0 ACS_NamedExecuteAlways("WOC Monster Init",0,96,0)//increase health on higher difficulties//A_JumpIf(ACS_ExecuteWithResult(535,0,0,0)==1,"Mutate")
	Idle:
		DEM4 AA 10 A_Look
		Loop
	See:
		DEM4 A 4 A_Chase
		DEM4 B 3 A_Chase
		DEM4 C 4 A_Chase
		DEM4 D 3 A_Chase
		Loop
	Pain:
		DEM4 E 4
		DEM4 E 4 A_Pain
		Goto See
	Melee:
		DEM4 E 5 A_FaceTarget
		DEM4 F 6 A_FaceTarget
		DEM4 G 5 A_CustomMeleeAttack(ACS_NamedExecuteWithResult("WOC Monster Damage Scale",ACTIVATOR,FRandom(20,24)), "", "", "Physical")
		Goto See
	Missile:
		DEM4 E 0 A_Jump(128,"Breath")
		DEM4 E 5 A_FaceTarget
		DEM4 F 6 A_FaceTarget
		DEM4 G 5 A_CustomMissile("Demon4FX", 70, 0)
		Goto See
	Breath:
		DEM4 G 0 A_JumpIfCloser(300, 1)
		Goto Missile+1
		DEM4 G 5 A_FaceTarget
		DEM4 G 0 A_FaceTarget
		DEM4 G 2 A_CustomMissile("Demon4Jet", 70, 0, FRandom(-5,5))
		DEM4 G 0 A_FaceTarget
		DEM4 G 2 A_CustomMissile("Demon4Jet", 70, 0, FRandom(-5,5))
		DEM4 G 0 A_FaceTarget
		DEM4 G 2 A_CustomMissile("Demon4Jet", 70, 0, FRandom(-5,5))
		DEM4 G 0 A_FaceTarget
		DEM4 G 2 A_CustomMissile("Demon4Jet", 70, 0, FRandom(-5,5))
		DEM4 G 0 A_FaceTarget
		DEM4 G 2 A_CustomMissile("Demon4Jet", 70, 0, FRandom(-5,5))
		DEM4 G 0 A_FaceTarget
		DEM4 G 2 A_CustomMissile("Demon4Jet", 70, 0, FRandom(-5,5))
		DEM4 G 0 A_FaceTarget
		DEM4 G 2 A_CustomMissile("Demon4Jet", 70, 0, FRandom(-5,5))
		DEM4 G 0 A_FaceTarget
		DEM4 G 2 A_CustomMissile("Demon4Jet", 70, 0, FRandom(-5,5))
		DEM4 G 0 A_FaceTarget
		DEM4 G 2 A_CustomMissile("Demon4Jet", 70, 0, FRandom(-5,5))
		DEM4 G 0 A_FaceTarget
		DEM4 G 2 A_CustomMissile("Demon4Jet", 70, 0, FRandom(-5,5))
		Goto See
	Death:
		DEM4 H 0 A_SpawnItemEx("GIBBER", 0, 0, 0, 0, 0, 0, 0, SXF_USEBLOODCOLOR)
		DEM4 HI 6
		DEM4 J 6 A_Scream
		DEM4 K 6 A_NoBlocking
		DEM4 L 6 A_QueueCorpse
		DEM4 MNO 6
		DEM4 P -1 //A_BossDeath
		Stop
	XDeath:
		DEM4 H 6 A_SpawnItemEx("GIBBER", 0, 0, 0, 0, 0, 0, 0, SXF_USEBLOODCOLOR)
		TNT1 A 0 A_SpawnItemEx("Demon4Chunk1", 0,0,45, 1+(random[DemonChunks](0,255)*0.015625), 1+(random[DemonChunks](0,255)*0.015625), ChunkFlags, 90)
		TNT1 A 0 A_SpawnItemEx("Demon4Chunk2", 0,0,45, 1+(random[DemonChunks](0,255)*0.015625), 1+(random[DemonChunks](0,255)*0.015625), ChunkFlags, 270)
		TNT1 A 0 A_SpawnItemEx("Demon4Chunk3", 0,0,45, 1+(random[DemonChunks](0,255)*0.015625), 1+(random[DemonChunks](0,255)*0.015625), ChunkFlags, 270)
		TNT1 A 0 A_SpawnItemEx("Demon4Chunk4", 0,0,45, 1+(random[DemonChunks](0,255)*0.015625), 1+(random[DemonChunks](0,255)*0.015625), ChunkFlags, 270)
		DEM4 I 6 A_SpawnItemEx("Demon4Chunk5", 0,0,45, 1+(random[DemonChunks](0,255)*0.015625), 1+(random[DemonChunks](0,255)*0.015625), ChunkFlags, 270)
		Goto Death+3
	Ice:
		"----" E 5 A_GenericFreezeDeath
		"----" E 1 A_FreezeDeathChunks
		Wait
	Raise:
		DEM4 A 0 ACS_NamedExecuteAlways("WOC Monster Init",0,96,0)
		DEM4 PONMLKJIH 6
		Goto See
	}
}

Actor Demon4Chunk1 : DemonChunk
{
  States
  {
  Spawn:
    BDMA A 4
    BDMA A 10 A_QueueCorpse
    BDMA A 20
    Wait
  Death:
    BDMA A -1
    Stop
  }
}

Actor Demon4Chunk2 : DemonChunk
{
  States
  {
  Spawn:
    BDMB A 4
    BDMB A 10 A_QueueCorpse
    BDMB A 20
    Wait
  Death:
    BDMB A -1
    Stop
  }
}

Actor Demon4Chunk3 : DemonChunk
{
  States
  {
  Spawn:
    BDMC A 4
    BDMC A 10 A_QueueCorpse
    BDMC A 20
    Wait
  Death:
    BDMC A -1
    Stop
  }
}

Actor Demon4Chunk4 : DemonChunk
{
  States
  {
  Spawn:
    BDMD A 4
    BDMD A 10 A_QueueCorpse
    BDMD A 20
    Wait
  Death:
    BDMD A -1
    Stop
  }
}

Actor Demon4Chunk5 : DemonChunk
{
  States
  {
  Spawn:
    BDME A 4
    BDME A 10 A_QueueCorpse
    BDME A 20
    Wait
  Death:
    BDME A -1
    Stop
  }
}

Actor Demon4FX
{
	Speed 19
	FastSpeed 25
	Radius 10
	Height 6
	Damage (ACS_NamedExecuteWithResult("WOC Monster Damage Scale",WOCTARGET,FRandom(6,12)))
	DamageType "Poison"
	Projectile
	+SPAWNSOUNDSOURCE
	+HITTRACER
	RenderStyle Add
	Alpha 0.99
	SeeSound "DemonMissileFire"
	DeathSound "DemonMissileExplode"
	States
	{
	Spawn:
		D4FX AABB 2 Bright A_SpawnItemEx("BlackDemonTrail", 0, 0,
									0, 0, 0, 0, 0, 0)
		Loop
	Death:
		TNT1 A 0 Bright ACS_NamedExecuteWithResult("WOC DAMAGE OVER TIME", ACS_ExecuteWithResult(WOC_DECORATE,STATS,WOCTID,WOCTRACER), ACS_NamedExecuteWithResult("WOC Monster Damage Scale",WOCTARGET,FRandom(11,24)), 5, POISONDOT)
		TNT1 AAA 0 A_CustomMissile("PoisonVolcanoTBlast",0,0,random(0,359),CMF_TRACKOWNER,random(0,60))
		TNT1 AAA 0 A_CustomMissile("PoisonVolcanoTBlast",0,0,random(0,359),CMF_TRACKOWNER,random(0,60))
		TNT1 AA 0 A_CustomMissile("PoisonVolcanoTBlast",0,0,random(0,359),CMF_TRACKOWNER,random(0,60))
		D4FX C 4 BRIGHT A_CustomMissile("PoisonVolcanoTBlast",0,0,random(0,359),CMF_TRACKOWNER,random(0,60))
		D4FX DEFGH 4 BRIGHT
		Stop
	}
}

ACTOR Demon4Jet
{
	Radius 14
	Height 12
	Speed 16
	Damage (ACS_NamedExecuteWithResult("WOC Monster Damage Scale",WOCTARGET,FRandom(1,2)))
	DamageType "Poison"
	PROJECTILE
	+HITTRACER
	RenderStyle Add
	SeeSound "DemonMissileFire"
	DeathSound "FireBall"
	States
	{
	Spawn:
		BJET ABC 2 BRIGHT A_FadeOut
		Loop
	Death:
		BJET D 0 Bright ACS_NamedExecuteWithResult("WOC DAMAGE OVER TIME", ACS_ExecuteWithResult(WOC_DECORATE,STATS,WOCTID,WOCTRACER), ACS_NamedExecuteWithResult("WOC Monster Damage Scale",WOCTARGET,FRandom(3,4)), 3, POISONDOT)
		BJET DEFG 4 BRIGHT
		Stop
	}
}

ACTOR BlackDemonTrail
{
  Radius 6
  Height 8
  Speed 10
  +NOBLOCKMAP
  +NOGRAVITY
  +MISSILE
  +NOTELEPORT
  +DONTSPLASH
  +CLIENTSIDEONLY +DONTBLAST
  +NOINTERACTION
  RenderStyle Add
  States
  {
  Spawn:
    D4TR DEFGH 4
    Stop
  }
}

Actor PoisonVolcanoTBlast
{
	Radius 8
	Height 6
	Speed 20
	Damage (ACS_NamedExecuteWithResult("WOC Monster Damage Scale",WOCTARGET,FRandom(1,3)))
	/*+NODAMAGETHRUST*/
	Gravity 0.825
	DamageType "Poison"
	Obituary "%o was envenomed by a Serpent."
	+NOBLOCKMAP
	+MISSILE
	+DROPOFF
	+NOTELEPORT
	+HITTRACER
	Renderstyle Add
	States
	{
	Spawn:
		BPBL AB 4 BRIGHT
		Loop
	Death:
		BPBL E 0 Bright ACS_NamedExecuteWithResult("WOC DAMAGE OVER TIME", ACS_ExecuteWithResult(WOC_DECORATE,STATS,WOCTID,WOCTRACER), ACS_NamedExecuteWithResult("WOC Monster Damage Scale",WOCTARGET,FRandom(1,5)), 5, POISONDOT)
		BPBL EDCDEFG 4 BRIGHT
		Stop
	}
}

Actor NewDemon2FX1 : Demon2FX1 replaces Demon2FX1
{
	Damagetype "Poison"
	Damage (ACS_NamedExecuteWithResult("WOC Monster Damage Scale",WOCTARGET,FRandom(5,10)))
	+HITTRACER
	Speed 19
	FastSpeed 25
	States
	{
	Death:
		D2FX G 0 Bright ACS_NamedExecuteWithResult("WOC DAMAGE OVER TIME", ACS_ExecuteWithResult(WOC_DECORATE,STATS,WOCTID,WOCTRACER), ACS_NamedExecuteWithResult("WOC Monster Damage Scale",WOCTARGET,FRandom(10,20)), 5, POISONDOT)
		D2FX GHIJ 4 Bright
		D2FX KL 3 Bright
		Stop
	}
}

Actor NewIceGuy : IceGuy Replaces IceGuy
{
	PainChance "Convert", 255
	+NOPAIN
	+TELESTOMP
	+FLOORCLIP
	dropitem "ReagentBlue" 64
	Tag "Wendigo"
	+USEKILLSCRIPTS
	DamageFactor "Fire", 2.0
	DamageFactor "FirePlayer", 2.0
	DamageFactor "FireTime", 2.0
	DamageFactor "Ice", 0.5
	DamageFactor "IcePlayer", 0.5
	DamageFactor "IceTime", 0.5
	DamageFactor "Bleed", 0
	States
	{
	Spawn:
		ICEY A 0
		ICEY A 0 ACS_NamedExecuteAlways("WOC Monster Init",0,75,0)
	Idle:
		ICEY A 0 A_SpawnItemEx("IceGuyWisp1", frandom(-radius,radius), frandom(-radius,radius), 60, 0, 0, 0, 0, SXF_ABSOLUTEVELOCITY, 192)
		ICEY A 0 A_SpawnItemEx("IceGuyWisp2", frandom(-radius,radius), frandom(-radius,radius), 60, 0, 0, 0, 0, SXF_ABSOLUTEVELOCITY, 192)
		ICEY A 10 A_Look
		Loop
	See:
		ICEY A 4 A_Chase
		ICEY A 0 A_SpawnItemEx("IceGuyWisp1", frandom(-radius,radius), frandom(-radius,radius), 60, velx, vely, velz, 0, SXF_ABSOLUTEVELOCITY, 128)
		ICEY A 0 A_SpawnItemEx("IceGuyWisp2", frandom(-radius,radius), frandom(-radius,radius), 60, velx, vely, velz, 0, SXF_ABSOLUTEVELOCITY, 128)
		ICEY B 4 A_Chase
		ICEY CD 4 A_Chase
		Loop
	Missile:
		ICEY EF 3 A_FaceTarget
		ICEY G 0 A_PlaySound("IceGuyAttack")
		ICEY G 0 Bright A_CustomMissile("IceGuyFX", 40, -radius/2, 0, CMF_AIMOFFSET)
		ICEY G 8 Bright A_CustomMissile("IceGuyFX", 40, radius/2, 0, CMF_AIMOFFSET)
		ICEY F 4 A_FaceTarget
		Goto See
	Pain.Convert:
		TNT1 A 0 A_JumpIfInTargetInventory("Visions",Random(0,6),"ConvertMe")
		goto See
	ConvertMe:
		TNT1 A 0 ACS_ExecuteAlways(WOC_VISIONSSCRIPT,0,0,0,0)
		goto See
	/*Death:
		TNT1 A 0 A_NoBlocking
		TNT1 A 15 A_SpawnItemEx("IceGuyCorpseExplode")
		TNT1 A -1 A_BossDeath
		Stop*/
	Inactive:
		ICEY A 0
		ICEY A 0 ACS_NamedExecuteAlways("WOC Monster Init",0,75,0)
		ICEY A -1
		Goto See
	}
}

Actor IceGuyCorpseExplode
{
	Radius 22
	Height 75
	Health 1
	+SHOOTABLE
	-SOLID
	+NOBLOCKMAP
	States 
	{
	Spawn:
		ICEY G 0
		ICEY G 0 A_Die("Ice")
		ICEY G 1 A_IceGuyDie
		ICEY G 5
		Stop
	Ice:
		ICEY G 5 A_IceGuyDie
		ICEY G 5
		Stop
	}
}

Actor NewIceGuyFX : IceGuyFX replaces IceGuyFX
{
	Damage (ACS_NamedExecuteWithResult("WOC Monster Damage Scale",WOCTARGET,FRandom(1,8)))
	Speed 16
	FastSpeed 20
	/*+NODAMAGETHRUST*/
	+THRUGHOST
	+WINDTHRUST
	States
	{
	Death:
		ICPR D 4 Bright A_SetTranslucent(1, 1)
		ICPR E 0 Bright A_CustomMissile("IceGuyFX2", 0, 0, 360, 6, 3)
		ICPR E 0 Bright A_CustomMissile("IceGuyFX2", 0, 0, 315, 6, 3)
		ICPR E 0 Bright A_CustomMissile("IceGuyFX2", 0, 0, 270, 6, 3)
		ICPR E 0 Bright A_CustomMissile("IceGuyFX2", 0, 0, 235, 6, 3)
		ICPR E 0 Bright A_CustomMissile("IceGuyFX2", 0, 0, 180, 6, 3)
		ICPR E 0 Bright A_CustomMissile("IceGuyFX2", 0, 0, 135, 6, 3)
		ICPR E 0 Bright A_CustomMissile("IceGuyFX2", 0, 0, 90, 6, 3)
		ICPR E 0 Bright A_CustomMissile("IceGuyFX2", 0, 0, 45, 6, 3)
		ICPR E 4 Bright A_CustomMissile("IceGuyFX2", 0, 0, 0, 6, 3)
		ICPR FG 4 Bright
		ICPR H 3 Bright
		Stop
	}
}

Actor NewIceGuyFX2 : IceGuyFX2 replaces IceGuyFX2
{
	Damage (ACS_NamedExecuteWithResult("WOC Monster Damage Scale",WOCTARGET,FRandom(1,8)))
	Speed 16
	FastSpeed 20
	/*+NODAMAGETHRUST*/
	+THRUGHOST
	+WINDTHRUST
	-STRIFEDAMAGE
}

ACTOR MinoPuff : PhoenixPuff
{
	+NOBLOCKMAP
	+NOGRAVITY
	+NOTELEPORT
	+CANNOTPUSH
	RenderStyle Translucent
	Alpha 0.4
	SeeSound ""
	DeathSound ""
	States
	{
	Spawn:
		FX04 BCDEF 4
		Stop
	}
}

ACTOR HammerCheck : Inventory
{
inventory.maxamount 1
}

Actor CentaurSpotZ : RandomSpawner replaces Centaur
{
	Game Hexen
	SpawnID 1
	+TELESTOMP
	DropItem "NewCentaur"
	DropItem "ImpWarrior"
	DropItem "NewClink"
}

Actor NewCentaur : Centaur// Replaces Centaur
{
	Speed 15
	PainChance "Convert", 255
	Species "Centaur"
	dropitem "ArtiEmptyFlask" 64
	dropitem "ArtiMaroonFlask" 16
	dropitem "ReagentRed" 64
	Dropitem "Armour2" 8
	meleerange 60
	AttackSound ""
	Tag "Centaur"
	+USEKILLSCRIPTS
	-DEFLECT
	Damagefactor "Electric", 1
	DamageFactor "Lightning", 1.5
	DamageFactor "LightningPlayer", 1.5
	DamageFactor "LightningTime", 1.5
	DamageFactor "Physical", 0.75
	DamageFactor "PhysicalPlayer", 0.75
	States
	{
	Spawn:
		CENT A 0
		CENT A 0 ACS_NamedExecuteAlways("WOC Monster Init",0,75,WOC_STAT)//increase health on higher difficulties
	Idle:
		CENT AB 10 A_Look
		Loop
	Melee:
		CENT H 5 A_FaceTarget
		CENT I 0 A_PlayWeaponSound("CentaurSwing")
		CENT I 4 A_FaceTarget
		CENT J 7 A_CustomMeleeAttack(ACS_NamedExecuteWithResult("WOC Monster Damage Scale",ACTIVATOR,FRandom(12,16)), "CentaurAttack", "", "Physical")
		Goto See
	Pain:
		CENT G 12 A_Pain
		CENT G 0 A_SetReflectiveInvulnerable
		CENT EEEEEEEEEEEEEEE 5 A_CentaurDefend
		CENT E 1 A_UnsetReflectiveInvulnerable
		Goto See
	XDeath:
		CTXD A 4 A_SpawnItemEx("GIBBER")
		CTXD B 4 A_NoBlocking
		CTXD C 0 A_SpawnItemEx("CentaurSword", 0, 0, 45, 1 + random[CentaurDrop](-128,127)*0.03125,
							   1 + random[CentaurDrop](-128,127)*0.03125, 8 + random[CentaurDrop](0,255)*0.015625, 270)
		CTXD C 4 A_SpawnItemEx("CentaurShield", 0, 0, 45, 1 + random[CentaurDrop](-128,127)*0.03125,
							   1 + random[CentaurDrop](-128,127)*0.03125, 8 + random[CentaurDrop](0,255)*0.015625, 90)

		CTXD D 3 A_Scream
		CTXD E 4 A_QueueCorpse
		CTXD F 3
		CTXD G 4
		CTXD H 3
		CTXD I 4
		CTXD J 3
		CTXD K -1 //A_BossDeath
		Stop
	Ice:
		"----" G 5 A_GenericFreezeDeath
		"----" G 1 A_FreezeDeathChunks
		Wait
	Raise:
		TNT1 A 0 ACS_NamedExecuteAlways("WOC Monster Init",0,75,WOC_STAT)
		CENT SRQPONMLK 4
		goto See
	}
}

ACTOR NewCentaurMash : NewCentaur replaces CentaurMash
{
	Game Hexen
	SpawnID 103
	+NOBLOOD
	+NOICEDEATH
	+GHOST
	+SHADOW
	RenderStyle Translucent
	Alpha 0.4
	Damagefactor "Electric", 1.0
	DamageFactor "Lightning", 1.0
	DamageFactor "LightningPlayer", 1.0
	DamageFactor "LightningTime", 1.0
	DamageFactor "Physical", 1.0
	DamageFactor "PhysicalPlayer", 1.0
	DamageFactor "Arcane", 1.5
	DamageFactor "ArcanePlayer", 1.5
	DamageFactor "ArcaneTime", 1.5
	DamageFactor "PoisonTime", 0
	DamageFactor "Bleed", 0
}

Actor ImpWarrior
{
    Health 150
    Radius 16
    Height 64
	Scale 1.14
    Speed 10
    PainChance 128
    MONSTER
    +FLOORCLIP
	+TELESTOMP
	+NEVERFAST
	Meleerange 52
	PainChance "Convert", 255
	Species "Centaur"
    SeeSound "orc/sight"
    PainSound "orc/pain"
    DeathSound "orc/death"
    ActiveSound "orc/active"
	AttackSound ""
	dropitem "ArtiEmptyFlask" 64
	dropitem "ArtiBlackFlask" 8
	dropitem "ReagentRed" 64
	DropItem "Armour3" 8
	DropItem "Money" 64
    DropItem "Money" 64
    DropItem "Money" 64
    DropItem "Money" 64
	DropItem "Money1" 8
	DropItem "Money2" 4
	DropItem "Money3" 2
	DropItem "ChestKey" 2
    Obituary "%o couldn't run from the imp warrior's fireball."
    HitObituary "%o was beaten to death by an imp warrior."
	Tag "Imp Warrior"
	+USEKILLSCRIPTS
    States
    {
    Spawn:
		WARI A 0
		WARI A 0 ACS_NamedExecuteAlways("WOC Monster Init",0,64,0)//increase health on higher difficulties
	Idle:
		WARI A 0 A_UnSetInvulnerable
		WARI AB 10 A_Look
        Loop
    See:
		WARI A 0 A_UnSetInvulnerable
        WARI AABBCCDD 3 A_Chase
        Loop
    Melee:
        WARI E 6 A_FaceTarget
        TNT1 A 0 A_PlaySound("ImpWarlordSwing")
        WARI F 4 A_FaceTarget
        WARI G 5 A_CustomMeleeAttack(ACS_NamedExecuteWithResult("WOC Monster Damage Scale",ACTIVATOR,FRandom(5,12)), "ImpWarlordAttack", "", "Physical")
        Goto See
    Missile:
		WARI G 0 A_Jump(38, 1)
		Goto See
        WARI GF 8 A_FaceTarget
        TNT1 A 0 A_Jump(128,2)
        WARI E 8 A_CustomMissile("FamiliarSpawner", 36, 0, -30)
        Goto See
        WARI E 8 A_CustomMissile("FamiliarSpawner", 36, 0, 30)
        Goto See
    Pain:
        WARI H 8 A_Pain
	    WARI I 1
        TNT1 A 0 A_SetInvulnerable
	    WARI IIIIII 4 A_CentaurDefend
        WARI IIII 4 A_CentaurDefend
        TNT1 A 0 A_UnSetInvulnerable
		Goto See
    Death:
        TNT1 A 0 A_SpawnItemEx("WarlordMace", 0, 0, 32, 4, 0, 0, -90, 128)
        WARI R 8 A_SpawnItemEx("WarlordShield", 0, 0, 32, 5, 0, 0, 90, 128)
        WARI S 8 A_Scream
        WARI T 6
	    WARI U 6 A_NoBlocking
        WARI V -1 //A_BossDeath
        Stop
	Ice:
		"----" H 5 A_GenericFreezeDeath
		"----" H 1 A_FreezeDeathChunks
		Wait
	Raise:
		WARI A 0 ACS_NamedExecuteAlways("WOC Monster Init",0,64,0)
		WARI VUTSR 6
		Goto See
    }
}

Actor NewClink : NewClinkHeretic
{
	Species "Centaur"
}

Actor CentaurLeaderSpotZ : RandomSpawner replaces CentaurLeader
{
	Game Hexen
	SpawnID 2
	+TELESTOMP
	DropItem "NewCentaurLeader"
	DropItem "ImpWarlord"
	Dropitem "Razreblade"
}

Actor ImpWarlord : ImpWarrior
{
    Health 200
	dropitem "ArtiEmptyFlask" 64
	dropitem "ArtiBlackFlask" 8
	dropitem "ReagentRed" 64
	Dropitem "ReagentGreen" 64
	DropItem "Armour3" 8
	DropItem "Money" 64
    DropItem "Money" 64
    DropItem "Money" 64
    DropItem "Money" 64
	DropItem "Money1" 8
	DropItem "Money2" 4
	DropItem "Money3" 2
	DropItem "ChestKey" 2
    Obituary "%o couldn't run from the imp warlord's fireball."
    HitObituary "%o was beaten to death by an imp warlord."
	Tag "Imp Warlord"
	Species "Centaur"
	DamageFactor "Holy", 0.75
	DamageFactor "HolyPlayer", 0.75
	DamageFactor "HolyTime", 0.75
	DamageFactor "Shadow", 0.75
	DamageFactor "ShadowPlayer", 0.75
	DamageFactor "ShadowTime", 0.75
    States
    {
    Missile:
		TNT1 A 0 A_Jump(38,23)  //20% chance: jump to familiar drop
		TNT1 A 0 A_Jump(77,2)   //30% chance: jump to heat seekers
		TNT1 A 0 A_Jump(128,11) //50% chance: jump to green fireballs
		Goto Missile+28         //Otherwise : jump to red fireball
		TNT1 A 0 A_SetInvulnerable
		WARI I 6 A_FaceTarget
		TNT1 A 0 A_PlaySound("implord/shieldshot")
		WARI J 6 bright A_FaceTarget
		TNT1 A 0 A_Jump(128,4)
		TNT1 A 0 A_CustomMissile("YellowSkullSeeker", 36, 0, -45)
		WARI K 6 bright A_CustomMissile("YellowSkullSeeker", 36, 0, 45)
		TNT1 A 0 A_UnSetInvulnerable
		Goto See
		WARI K 6 bright A_CustomMissile("YellowSkullSeeker", 36, 0, 0)
		TNT1 A 0 A_UnSetInvulnerable
		Goto See
		WARI L 7 A_FaceTarget
		TNT1 A 0 A_PlaySound("ImpWarlordSwing")
		WARI M 4 A_FaceTarget
		TNT1 A 0 A_PlaySound("implord/poisonballfire")
		TNT1 A 0 A_Jump(128,3)
		TNT1 A 0 A_CustomMissile("GreenPoisonBall", 44, 0, -8, 1)
		TNT1 A 0 A_CustomMissile("GreenPoisonBall", 28, 0, 8, 1)
		TNT1 A 0 A_CustomMissile("GreenPoisonBall", 36, 0, 0, 1)
		TNT1 A 0 A_CustomMissile("GreenPoisonBall", 40, 0, -4, 1)
		WARI N 6 A_CustomMissile("GreenPoisonBall", 32, 0, 4, 1)
		Goto See
		WARI GF 8 A_FaceTarget
		TNT1 A 0 A_Jump(128,2)
		WARI E 8 A_CustomMissile("FamiliarSpawner", 36, 0, -30)
		Goto See
		WARI E 8 A_CustomMissile("FamiliarSpawner", 36, 0, 30)
		Goto See
		TNT1 A 0 A_Jump(128,5)
		WARI O 7 A_FaceTarget
		TNT1 A 0 A_PlaySound("ImpWarlordSwing")
		WARI P 4 A_FaceTarget
		WARI Q 6 A_CustomMissile("RedSkullBall", 36, 0, 0)
		WARI O 7 A_FaceTarget
		TNT1 A 0 A_PlaySound("ImpWarlordSwing")
		WARI P 4 A_FaceTarget
		WARI Q 6 A_CustomMissile("RedSkullBall", 36, 0, 0)
		Goto See
    }
}

Actor YellowSkullSeeker
{
    Radius 8
    Height 6
    Speed 9
	FastSpeed 18
    Damage (ACS_NamedExecuteWithResult("WOC Monster Damage Scale",WOCTARGET,FRandom(2,16)))
    +SEEKERMISSILE
    PROJECTILE
    RenderStyle Add
    Scale 0.67
    Alpha 0.67
    DeathSound "implord/shieldshothit"
    Decal RevenantScorch
	Damagetype "Holy"
    States
    {
    Spawn:
        WLP2 ABCD 3 Bright A_SeekerMissile (5,10,SMF_PRECISE)
        Loop
    Death:
        WLP2 EFG 4 Bright
        Stop
    }
}

Actor GreenPoisonBall
{
    Radius 6
    Height 4
    Speed 10
	FastSpeed 20
    Damage (ACS_NamedExecuteWithResult("WOC Monster Damage Scale",WOCTARGET,FRandom(1,2)))
    PROJECTILE
	+HITTRACER
    RenderStyle Add
	Damagetype "Poison"
    Alpha 0.67
    DeathSound "implord/poison"
    States
    {
    Spawn:
        WLP1 ABCD 3 Bright
        Loop
    Death:
		WLP1 E 0 Bright ACS_NamedExecuteWithResult("WOC DAMAGE OVER TIME", ACS_ExecuteWithResult(WOC_DECORATE,STATS,WOCTID,WOCTRACER), ACS_NamedExecuteWithResult("WOC Monster Damage Scale",WOCTARGET,FRandom(1,6)), 5, POISONDOT)
        WLP1 EFGH 4 Bright
        Stop
    }
}

Actor FamiliarSpawner
{
	+MISSILE
	+DOOMBOUNCE
	+BOUNCEONACTORS
	+BLOODLESSIMPACT
	+PAINLESS
	Speed 8
	DeathSound "implord/familiarspawn"
	States
	{
	Spawn:
		WLP3 ABCD 4
		Loop
	Death:
		WLP3 E 4
		WLP3 F 6
		TNT1 A 0 A_Jump(85,3)
		WLP3 G 8 A_SpawnItemEx("SummonedBatFamiliar",0,0,32,0,0,0,0,SXF_SETMASTER)
		WLP3 H 350
	Stop
		WLP3 G 8 A_SpawnItemEx("DragonFamiliar",0,0,32,0,0,0,0,SXF_SETMASTER)
		WLP3 H 350
		Stop
	}
}

Actor RedSkullBall
{
    Radius 8
    Height 6
    Speed 15
	FastSpeed 20
	Scale 0.35
    Damage (ACS_NamedExecuteWithResult("WOC Monster Damage Scale",WOCTARGET,FRandom(8,28)))
	/*+NODAMAGETHRUST*/
    PROJECTILE
    RenderStyle Add
    SeeSound "whiteballbsee"
    DeathSound "whiteballbdeth"
    Decal PlasmaScorchLower
	Damagetype "Shadow"
    States
    {
    Spawn:
		RSMM AAABBBCCCDDDEEEFFF 1 Bright A_CustomMissile("RSLM2Trail",0,0,0)
		Goto Spawn+9
    Death:
		RSMM GGHHIIJJKKLLMM 2 Bright A_FadeOut(0.05)
		Stop
    }
}

ACTOR RSLM2Trail
{
    PROJECTILE
    +NOCLIP
	+CLIENTSIDEONLY +DONTBLAST
	+NOINTERACTION
    Damage 0
    RenderStyle Add
    Alpha 0.45
    Scale 0.9
    States
    {
    Spawn:
		//TNT1 A 2
		BSP4 CDFHJLNPRTVXZ 1 BRIGHT A_FadeOut(0.02)
		BSP5 B 1 BRIGHT
		Stop
    }
}

Actor WarlordMace
{
    +DOOMBOUNCE
    Speed 4
    States
    {
    Spawn:
        WLI2 ABCDEF 5
        WLI2 G -1
        Stop
    }
}

Actor WarlordShield
{
    +DOOMBOUNCE
    Speed 5
    States
    {
    Spawn:
        WLI1 ABCDEF 5
        WLI1 G -1
        Stop
    }
}

Actor SummonedBatFamiliar
{
    Health 10
    Radius 12
    Height 24
    Speed 14
    PainChance 200
    MONSTER
	/*+NODAMAGETHRUST*/
    +NOGRAVITY
    +FLOAT
    +NEVERRESPAWN
    SeeSound "batfam/idle"
    PainSound "batfam/pain"
    DeathSound "batfam/death"
    ActiveSound "batfam/idle"
    HitObituary "%o was scratched by a bat familiar"
	Damagetype "Physical"
	Tag "Bat Familiar"
	+USEKILLSCRIPTS
    States
    {
	Pain.Morale:
	TNT1 A 0 A_Changeflag("Frightened", 1)
	Goto Pain
    Spawn:
		BFAM A 0
		BFAM A 0 ACS_NamedExecuteAlways("WOC Monster Init",0,24,0)
	Idle:
		BFAM ABCB 3 A_Look
        Loop
    See:
        BFAM ABCB 3 A_Chase
        Loop
    Melee:
        BFAM A 3 A_FaceTarget
        BFAM B 3 A_CustomMeleeAttack(ACS_NamedExecuteWithResult("WOC Monster Damage Scale",ACTIVATOR,FRandom(1,8)),"batfam/idle","","Physical")
        BFAM CB 3 A_FaceTarget
        Goto See
    Pain:
        BFAM A 2
        BFAM A 2 A_Pain
        Goto See
    Death:
        TNT1 A 0 A_Die
        TNT1 A 0 A_NoBlocking
        BFAM D 5 A_Scream
        BFAM E 5
        BFAM FDEF 5
        Goto Death+5
    Crash:
        TNT1 A 0 A_SetFloorClip
        BFAM G 6 A_PlaySound("batfam/crash")
        BFAM H 7
        BFAM I 8
        BFAM J -1
        Stop
    }
}

Actor DragonFamiliar
{
    Health 25
    Radius 16
    Height 32
    Speed 10
    PainChance 200
    MaxTargetRange 78
    MONSTER
	/*+NODAMAGETHRUST*/
    +NOGRAVITY
    +FLOAT
    +STRIFEDAMAGE
    +NEVERRESPAWN
    SeeSound "dragonfam/see"
    PainSound "dragonfam/pain"
    DeathSound "dragonfam/death"
    ActiveSound "dragonfam/idle"
    Obituary "%o was cooked by a dragon familiar."
	Tag "Dragon Familiar"
	+USEKILLSCRIPTS
    States
    {
	Pain.Morale:
	TNT1 A 0 A_Changeflag("Frightened", 1)
	Goto Pain
    Spawn:
		DFAM A 0
		DFAM A 0 ACS_NamedExecuteAlways("WOC Monster Init",0,32,0)
	Idle:
		DFAM ABCD 10 A_Look
        Loop
    See:
        DFAM AABBCCDD 3 A_Chase
        Loop
    Missile:
        TNT1 A 0 A_JumpIfCloser(270,2)
	    Goto See
		TNT1 A 0 A_Jump(48,"See")
	    Goto Missile+3
	    TNT1 A 0 A_PlaySound("dragonfam/attack")
	    TNT1 A 0 A_JumpIfCloser(270,1)
	    Goto See
        DFAM E 2 Bright A_CPosRefire
        TNT1 A 0 A_CustomMissile("MiniFirePuffNoDamage", 12, 0, 0)
	    TNT1 A 0 A_JumpIfCloser(270,1)
	    Goto See
        DFAM E 2 Bright A_CPosRefire
        TNT1 A 0 A_CustomMissile("MiniFirePuff", 12, 0, Random(1,2))
	    TNT1 A 0 A_JumpIfCloser(270,1)
	    Goto See
        DFAM E 2 Bright A_CPosRefire
        TNT1 A 0 A_CustomMissile("MiniFirePuff", 12, 0, Random(-1,-2))
        Goto Missile+1
    Pain:
        DFAM F 2
        DFAM F 2 A_Pain
        Goto See
    Death:
        TNT1 A 0 A_Die
        DFAM G 8 A_NoBlocking
        DFAM H 8 A_Scream
        DFAM I 6 A_SetFloorClip
        DFAM JKL 6
        DFAM M -1
        Stop
    }
}

Actor MiniFirePuff
{
    Radius 6
    Height 10
    Speed 7
    Damage (ACS_NamedExecuteWithResult("WOC Monster Damage Scale",WOCTARGET,FRandom(1,4)))
	/*+NODAMAGETHRUST*/
    PROJECTILE
	Damagetype Fire
    RenderStyle Add
    Alpha 0.67
    States
    {
    Spawn:
        DFFP ABCDEFGH 2 Bright
    Death:
        DFFP IJKLMNOPQR 2 Bright
        Stop
    }
}

Actor MiniFirePuffNoDamage : MiniFirePuff
{
    Damage 0
}

Actor NewCentaurLeader : CentaurLeader
{
	Meleerange 74
	Dropitem "ArtiEmptyFlask" 32
	Dropitem "ArtiBlueFlask" 32  
	Dropitem "ReagentRed" 64
	DropItem "Armour2" 8
	Damagefactor "Electric", 1
	AttackSound ""
	Damagetype "Physical"
	Speed 15
	Tag "Slaughtaur"
	Species "Centaur"
	+USEKILLSCRIPTS
	DamageFactor "Electric", 1
	DamageFactor "Lightning", 1.25
	DamageFactor "LightningPlayer", 1.25
	DamageFactor "LightningTime", 1.25
	DamageFactor "Physical", 0.75
	DamageFactor "PhysicalPlayer", 0.75
	DamageFactor "Arcane", 0.75
	DamageFactor "ArcanePlayer", 0.75
	DamageFactor "ArcaneTime", 0.75
	States
	{
	Spawn:
		SLGH A 0
		SLGH A 0 ACS_NamedExecuteAlways("WOC Monster Init",0,75,WOC_STAT)
	Idle:
		SLGH AB 10 A_Look
		Loop
	See:
		SLGH ABCD 4 A_Chase
		Loop
	Pain:
		SLGH G 12 A_Pain
		SLGH G 0 A_SetReflectiveInvulnerable
		SLGH G 0 A_Jump(128,5)
		SLGH E 10 A_FaceTarget
		SLGH F 8 Bright A_CustomMissile("CentaurFX", 45, 0, 0, CMF_AIMOFFSET)
		SLGH E 6 A_FaceTarget
		SLGH E 0 A_Jump(256,16)
		SLGH EEEEEEEEEEEEEEE 5 A_CentaurDefend
		SLGH E 1 A_UnsetReflectiveInvulnerable
		Goto See
	Melee:
		SLGH H 5 A_FaceTarget
		SLGH I 0 A_PlayWeaponSound("CentaurSwing")
		SLGH I 4 A_FaceTarget
		SLGH J 7 A_CustomMeleeAttack(ACS_NamedExecuteWithResult("WOC Monster Damage Scale",ACTIVATOR,FRandom(14,18)), "CentaurAttack", "", "Physical")
		Goto See
	Missile:
		SLGH E 0 A_SetReflectiveInvulnerable
		SLGH E 10 A_FaceTarget
		SLGH F 8 Bright A_CustomMissile("CentaurFX", 45, 0, 0, CMF_AIMOFFSET)
		SLGH E 10 A_FaceTarget
		SLGH F 8 Bright A_CustomMissile("CentaurFX", 45, 0, 0, CMF_AIMOFFSET)
		SLGH F 0 A_FaceTarget
		SLGH A 5 A_UnsetReflectiveInvulnerable
		Goto See+1
	Death:
		SLGH K 4
		SLGH L 4 A_Scream
		SLGH MN 4
		SLGH O 4 A_NoBlocking
		SLGH PQ 4
		SLGH R 4 A_QueueCorpse
		SLGH S 4
		SLGH T -1
		Stop
	XDeath:
		STXD A 4 A_SpawnItemEx("GIBBER")
		STXD B 4 A_NoBlocking
		STXD C 0 A_SpawnItemEx("SlaughtaurSword", 0, 0, 45, 1 + random[CentaurDrop](-128,127)*0.03125,
						   1 + random[CentaurDrop](-128,127)*0.03125, 8 + random[CentaurDrop](0,255)*0.015625, 270, SXF_TRANSFERTRANSLATION|SXF_TRANSFERSCALE)
		STXD C 4 A_SpawnItemEx("SlaughtaurShield", 0, 0, 45, 1 + random[CentaurDrop](-128,127)*0.03125,
						   1 + random[CentaurDrop](-128,127)*0.03125, 8 + random[CentaurDrop](0,255)*0.015625, 90, SXF_TRANSFERTRANSLATION|SXF_TRANSFERSCALE)
		STXD D 3 A_Scream
		STXD E 4 A_QueueCorpse
		STXD F 3
		STXD G 4
		STXD H 3
		STXD I 4
		STXD J 3
		STXD K -1 //A_BossDeath
		Stop
	Ice:
		"----" G 5 A_GenericFreezeDeath
		"----" G 1 A_FreezeDeathChunks
		Wait
	Raise:
		TNT1 A 0 ACS_NamedExecuteAlways("WOC Monster Init",0,75,WOC_STAT)
		SLGH SRQPONMLK 4
		goto See
	}
}

ACTOR SlaughtaurSword
{
	+DROPOFF
	+CORPSE
	+NOTELEPORT
	States
	{
	Spawn:
		STDP KLMNOPQ 3
		Goto Spawn+2
	Crash:
		STDP R 4
		STDP S 4 A_QueueCorpse
		STDP T -1
		Stop
	}
}

ACTOR SlaughtaurShield
{
	+DROPOFF
	+CORPSE
	+NOTELEPORT
	States
	{
	Spawn:
		STDP ABCDEF 3
		Goto Spawn+2
	Crash:
		STDP G 4
		STDP H 4 A_QueueCorpse
		STDP I 4
		STDP J -1
		Stop
	}
}

Actor NewCentaurFX : CentaurFX replaces CentaurFX
{
	Radius 6
	Damage (ACS_NamedExecuteWithResult("WOC Monster Damage Scale",WOCTARGET,FRandom(8,28)))
	Damagetype "Arcane"
	FastSpeed 25
	/*+NODAMAGETHRUST*/
	Height 8
	States
	{
	Spawn:
		CTFX A 1 Bright A_SpawnItemEx("CentaurTrailFX",  -(MomX/1.2), -(MomY/1.2), (MomZ/1.2*-1), (MomX/1.2), (MomY/1.2), (MomZ/1.2), 0, 138)
		Loop
	}
}

Actor CentaurTrailFX
{
	Radius 6
	Height 8
	Projectile
	RenderStyle Add
	Alpha 0.5
	Scale 0.75
	+PAINLESS
	+CLIENTSIDEONLY +DONTBLAST
	States
	{
	Spawn:
	CTFX A 0 Bright
	CTFX A 1 Bright A_FadeOut(0.05)
	Loop
	}
}

Actor RazreBlade : NewClink
{
	Health 200
	Species "Centaur"
	Obituary "%o was slashed by a razreblade."
	HitObituary "%o was slashed by a razreblade."
	Tag "Razreblade"
	States
	{
	Melee:
		CLNK E 0 A_UnSetInvulnerable
		CLNK E 5 A_FaceTarget
		CLNK F 0 A_PlayWeaponSound("ClinkSwing")
		CLNK F 4 A_FaceTarget
		CLNK G 7 A_CustomMeleeAttack(ACS_NamedExecuteWithResult("WOC Monster Damage Scale",ACTIVATOR,FRandom(8,15)), "ClinkAttack", "none", "physical", 1)
		Goto See
	Missile:
		CLNK A 0 A_UnSetInvulnerable
		CLNK A 0 A_JumpIfCloser(200,1)
		Goto AxeMissile
		CLNK A 0 A_Jump(128, "AxeMissile")
		CLNK P 6 A_FaceTarget
		CLNK P 0 A_FaceTarget
		CLNK Q 1 ThrustThingZ(0,40,0,1)
		CLNK Q 0 A_SpawnItemEx("SabreclawGhostTrail",0,0,0,0,0,0,0,128,0)
		CLNK E 0 A_FaceTarget
		CLNK Q 0 A_Recoil (-10)
		CLNK QQQQ 1 A_JumpIfCloser(71, "MeleeStrike")
		CLNK Q 0 A_SpawnItemEx("SabreclawGhostTrail",0,0,0,0,0,0,0,128,0)
		CLNK QQQQ 1 A_JumpIfCloser(71, "MeleeStrike")
		CLNK Q 0 A_SpawnItemEx("SabreclawGhostTrail",0,0,0,0,0,0,0,128,0)
		CLNK QQQQ 1 A_JumpIfCloser(71, "MeleeStrike")
		CLNK Q 0 A_SpawnItemEx("SabreclawGhostTrail",0,0,0,0,0,0,0,128,0)
		CLNK QQQP 1 A_JumpIfCloser(71, "MeleeStrike")
		CLNK P 0 A_SpawnItemEx("SabreclawGhostTrail2",0,0,0,0,0,0,0,128,0)
		CLNK PPPP 1 A_JumpIfCloser(71, "MeleeStrike")
		CLNK P 0 A_SpawnItemEx("SabreclawGhostTrail2",0,0,0,0,0,0,0,128,0)
		CLNK P 1 A_JumpIfCloser(71, "MeleeStrike")
		Goto See
	MeleeStrike:
		CLNK G 0 A_FaceTarget
		CLNK G 7 A_CustomMeleeAttack(ACS_NamedExecuteWithResult("WOC Monster Damage Scale",ACTIVATOR,FRandom(8,15)), "ClinkAttack", "none", "physical", 1)
		Goto See
	AxeMissile:
		CLNK E 5 A_FaceTarget
		CLNK F 5 A_FaceTarget
		CLNK G 5 A_CustomMissile("ClinkAxe",30,0,0)
		Goto See
	}
}

ACTOR ClinkAxe
{
	Radius 10
	Height 8
	Speed 25
	FastSpeed 30
	Damage (ACS_NamedExecuteWithResult("WOC Monster Damage Scale",WOCTARGET,FRandom(2,16)))
	Damagetype "Physical"
	Projectile
	/*+NODAMAGETHRUST*/
	-ACTIVATEIMPACT
	-ACTIVATEPCROSS
	+THRUGHOST
	+WINDTHRUST
	Renderstyle Add
	Scale 0.6
	DeathSound "hknight/hit"
	States
	{
	Spawn:
		CLAX A 3 Bright A_PlaySound("hknight/axewhoosh")
		CLAX BC 3 Bright
		Loop
	Death:
		CLAX DEF 6 Bright
		Stop
	}
}

Actor SerpentSpotZ : RandomSpawner replaces Serpent
{
	Game Hexen
	SpawnID 6
	+TELESTOMP
	DropItem "NewSerpent" 255 210
	DropItem "IceStalker" 255 46
}

Actor NewSerpent : Serpent
{
	-NOBLOOD
	Dropitem "ReagentGreen" 64
	Tag "Swamp Stalker"
	+USEKILLSCRIPTS
	Species "Serpent"
	DamageFactor "Poison", 0.5
	DamageFactor "PoisonPlayer", 0.5
	DamageFactor "PoisonTime", 0.5
	DamageFactor "Ice", 1.25
	DamageFactor "IcePlayer", 1.25
	DamageFactor "IceTime", 1.25
	States
	{
	Spawn:
		SSPT H 0
		SSPT H 0 ACS_NamedExecuteAlways("WOC Monster Init",0,70,0)
	Idle:
		SSPT H 10 A_Look
		Loop
	See:
		SSPT HH 1 A_Chase("Melee", "None", CHF_NIGHTMAREFAST|CHF_NOPLAYACTIVE)
		SSPT H 2 A_SerpentHumpDecide
		Loop
	Pain:
		SSPT L 5
		SSPT L 5 A_Pain
	Dive:
		SSDV ABC 4
		SSDV D 4 
		SSDV E 3 A_PlaySoundEx("SerpentActive", "Body")
		SSDV F 3 A_UnSetShootable
		SSDV GH 4
		SSDV I 3
		SSDV J 3 A_SerpentHide
		Goto See
	Melee:
		SSPT A 1 A_UnHideThing
		SSPT A 1 A_PlaySoundEx("SerpentBirth", "Voice")
		SSPT B 3 A_SetShootable
		SSPT C 3
		SSPT D 4 A_SerpentCheckForAttack
		Goto Dive
	Walk:
		SSPT IJI 5 A_Chase("Attack", "None", CHF_NIGHTMAREFAST)
		SSPT J 5 A_SerpentCheckForAttack
		Goto Dive
	Hump:
		SSPT H 3 A_SerpentUnHide
		SSPT EFGEF 3 A_SerpentRaiseHump
		SSPT GEF 3
		SSPT GEFGE 3 A_SerpentLowerHump
		SSPT F 3 A_SerpentHide
		Goto See
	Attack:
		SSPT K 6 A_FaceTarget
		SSPT L 5 A_SerpentChooseAttack
		Goto MeleeAttack
	MeleeAttack:
		SSPT N 5 A_CustomMeleeAttack(ACS_NamedExecuteWithResult("WOC Monster Damage Scale",ACTIVATOR,FRandom(15,30)), "", "", "Physical")
		Goto Dive
	Ice:
		"----" L 5 A_GenericFreezeDeath
		"----" L 1 A_FreezeDeathChunks
		Wait
	}
}

ACTOR IceStalker : NewSerpent
{
	Health 150
	Speed 10
	+NOICEDEATH
	+NOBLOOD
	Dropitem "ReagentBlue" 64
	Obituary "%o caught a chill from an ice stalker."
	HitObituary "%o caught a chill from an ice stalker."
	Tag "Ice Stalker"
	Species "Serpent"
	DamageFactor "Fire", 2.0
	DamageFactor "FirePlayer", 2.0
	DamageFactor "FireTime", 2.0
	DamageFactor "Ice", 0.5
	DamageFactor "IcePlayer", 0.5
	DamageFactor "IceTime", 0.5
	DamageFactor "Poison", 1.0
	DamageFactor "PoisonPlayer", 1.0
	DamageFactor "PoisonTime", 1.0
	States
	{
	Spawn:
		ISPT H 0
		ISPT H 0 ACS_NamedExecuteAlways("WOC Monster Init",0,70,0)
	Idle:
		ISPT H 10 A_Look
		Loop
	See:
		ISPT HH 1 A_Chase("Melee", "None", CHF_NIGHTMAREFAST|CHF_NOPLAYACTIVE)
		ISPT H 2 A_SerpentHumpDecide
		Loop
	Pain:
		ISPT L 5
		ISPT L 5 A_Pain
	Dive:
		ISDV ABC 4
		ISDV D 4
		ISDV E 3 A_PlaySoundEx("SerpentActive", "Body")
		ISDV F 3 A_UnSetShootable
		ISDV GH 4
		ISDV I 3
		ISDV J 3 A_SerpentHide
		Goto See
	Melee:
		ISPT A 1 A_UnHideThing
		ISPT A 1 A_PlaySoundEx("SerpentBirth", "Voice")
		ISPT B 3 A_SetShootable
		ISPT C 3
		ISPT D 4 A_SerpentCheckForAttack
		Goto Dive
	Death:
		ISPT [ 1 A_IceGuyDie
		Stop
	XDeath:
		ISPT [ 1 A_IceGuyDie
		Stop
	Ice:
		STOP
	Walk:
		ISPT IJI 5 A_Chase("Attack", "None", CHF_NIGHTMAREFAST)
		ISPT J 5 A_SerpentCheckForAttack
		Goto Dive
	Hump:
		ISPT H 3 A_SerpentUnHide
		ISPT EFGEF 3 A_SerpentRaiseHump
		ISPT GEF 3
		ISPT GEFGE 3 A_SerpentLowerHump
		ISPT F 3 A_SerpentHide
		Goto See
	Attack:
		ISPT K 6 A_FaceTarget
		ISPT L 5 A_SerpentChooseAttack
		Goto MeleeAttack
	MeleeAttack:
		ISPT N 5 A_CustomMeleeAttack(ACS_NamedExecuteWithResult("WOC Monster Damage Scale",ACTIVATOR,FRandom(15,30)), "", "", "Ice")
		Goto Dive
	}
}

Actor SerpentLeaderSpotZ : RandomSpawner replaces SerpentLeader
{
	Game Hexen
	SpawnID 7
	+TELESTOMP
	DropItem "NewSerpentLeader" 255 210
	DropItem "IceStalkerLeader" 255 46
}

Actor NewSerpentLeader : NewSerpent
{
	Species "Serpent"
	Obituary "$OB_SERPENT" // "%o was melted by a Stalker."
	States
	{
	Missile:
		SSPT N 5 A_CustomMissile("NewSerpentFX", 32, 0)
		Goto Dive
	}
}

//Ice Stalker created by Ben2k9/Virtue

ACTOR IceStalkerLeader : IceStalker
{
	Species "Serpent"
	Obituary "%o caught a chill from an ice stalker."
	HitObituary "%o caught a chill from an ice stalker."
	States
	{
	Missile:
	    ISPT N 0 A_PlaySound("IceGuyAttack", CHAN_WEAPON)
		ISPT N 5 A_CustomMissile("IceGuyFX", 32, 0)
		Goto Dive
	}
}

Actor NewSerpentFX : SerpentFX replaces SerpentFX
{
	FastSpeed 20
	Damagetype "Poison"
	Damage (ACS_NamedExecuteWithResult("WOC Monster Damage Scale",WOCTARGET,FRandom(3,9)))
	+HITTRACER
	States
	{
	Spawn:
		SSFX A 0
		SSFX A 0 Bright A_PlaySoundEx("SerpentFXContinuous", "Body", 1)
		SSFX AAABBBAAABBB 1 Bright A_SpawnItemEx("CStaffTrail",0,0,0,0,0,0,0,8)
		Goto Spawn+1
	Death:
		SSFX C 0 Bright ACS_NamedExecuteWithResult("WOC DAMAGE OVER TIME", ACS_ExecuteWithResult(WOC_DECORATE,STATS,WOCTID,WOCTRACER), ACS_NamedExecuteWithResult("WOC Monster Damage Scale",WOCTARGET,FRandom(5,18)), 5, POISONDOT)
		SSFX C 4 Bright A_StopSoundEx("Body")
		SSFX DEFGH 4 Bright
		Stop
	}
}

Actor NewHeresiarch : Heresiarch Replaces Heresiarch
{
	Health 30000
	+TELESTOMP
	+NEVERRESPAWN
	+NOPAIN
	+NOFEAR
	-NOBLOOD
	+LOOKALLAROUND
	Damagefactor "PoisonCloud", 0.25
	DamageFactor "Deathblow", 0
	DropItem "NewArtiBoostMana"
	DropItem "NewArtiSuperHealth"
	DropItem "AccessoryRandomSpawner" 32
	Speed 20
	Bloodtype "EtherealBloodPurple"
	Tag "Heresiarch"
	+USEKILLSCRIPTS
	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:
		SORC A 0
		SORC A 0 ACS_NamedExecuteAlways("WOC Monster Init",0,110,WOC_BOSS|WOC_STAT)
		SORC A 5 A_SorcSpinBalls
	Idle:
		SORC A 10 A_Look
		Wait
	See:
		SORC A 4 A_Chase
		SORC B 5 A_Chase
		SORC C 4 A_Chase
		SORC D 5 A_Chase
		Loop
	Missile:
		SORC F 6 Bright A_FaceTarget
		SORC F 6 Bright A_SpeedBalls
		SORC F 6 Bright A_FaceTarget
		Wait
	Attack1:
		SORC E 6 Bright
		SORC E 6 Bright A_SpawnFizzle
		SORC E 5 Bright A_FaceTarget
		Goto Attack1+1
	Attack2:
		SORC E 2 Bright
		SORC E 2 Bright A_SorcBossAttack
		Goto See
	Death:
		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
		Stop
	}
}

ACTOR NewClericBoss : ClericBoss Replaces ClericBoss
{
	Health 8000
	/*+NODAMAGETHRUST*/
	+BOSS
	+TELESTOMP
	+NEVERRESPAWN
	+NOTELEOTHER
	+NOTARGET
	+NOPAIN
	DropItem "Armour2"
	DropItem "NewArtiSuperHealth"
	DamageFactor "Deathblow", 0
	Damagefactor "PoisonCloud", 0.25
	DropItem "AccessoryRandomSpawner" 32
	Tag "Traductus"
	+USEKILLSCRIPTS
  States
  {
	Spawn:
    CLER A 0
	CLER A 0 A_GiveInventory("PowerTraductusDamage")
    CLER A 3 ACS_NamedExecuteAlways("WOC Monster Init",0,64,WOC_BOSS|WOC_STAT)
  Idle:
    CLER A 5 A_Look
    Loop
  XDeath:
	CLER R 0 A_SpawnItemEx("GIBBER")
    CLER R 5 A_Scream
    CLER S 5
    CLER T 5 A_NoBlocking
    CLER UVWXYZ 5
    CLER "[" -1
    Stop
  Ice:
	"----" "\" 5 A_GenericFreezeDeath
    "----" "\" 1 A_FreezeDeathChunks
    Wait
  }
}

Actor PowerTraductusDamage : PowerDamage
{
	Damagefactor "Normal", 2
	Powerup.Duration -500000000
}

ACTOR NewFighterBoss : FighterBoss Replaces FighterBoss
{
	Health 8000
	+TELESTOMP
	+NOPAIN
	DropItem "Armour1"
	DropItem "Armour3"
	DropItem "Armour5"
	/*+NODAMAGETHRUST*/
	+BOSS
	+NEVERRESPAWN
	+NOTELEOTHER
	+NOTARGET
	DamageFactor "Deathblow", 0
	Damagefactor "PoisonCloud", 0.25
	DropItem "AccessoryRandomSpawner" 32
	Tag "Zedek"
	+USEKILLSCRIPTS
	States
	{
	Spawn:
		PLAY A 0
		PLAY A 3 ACS_NamedExecuteAlways("WOC Monster Init",0,64,WOC_BOSS)
	Idle:
		PLAY A 5 A_Look
		Loop
	Melee:
	Missile:
		PLAY E 8 A_FaceTarget
		PLAY F 0 A_PlaySound("FighterSwordFire")
		PLAY F 0 A_CustomMissile("BossFSwordMissile", 32, 0, 11.25)
		PLAY F 0 A_CustomMissile("BossFSwordMissile", 32, 0, 5.625)
		PLAY F 0 A_CustomMissile("BossFSwordMissile", 32, 0, -11.25)
		PLAY F 0 A_CustomMissile("BossFSwordMissile", 32, 0, -5.625)
		PLAY F 8 A_CustomMissile("BossFSwordMissile", 32, 0)
		Goto See
	XDeath:
		PLAY O 0 A_SpawnItemEx("GIBBER")
		PLAY O 5 A_Scream
		PLAY P 5 A_SkullPop
		PLAY R 5 A_NoBlocking
		PLAY STUV 5
		PLAY W -1
		Stop
	Ice:
		"----" X 5 A_GenericFreezeDeath
		"----" X 1 A_FreezeDeathChunks
		Wait
	}
}

Actor BossFSwordMissile : FSwordMissile
{
	Damage (ACS_NamedExecuteWithResult("WOC Monster Damage Scale",WOCTARGET,FRandom(26,46)))
	Damagetype "Arcane"
	/*+NODAMAGETHRUST*/
	States
	{
	Spawn:
		FSFX ABC 3 Bright A_CustomMissile("FSwordFireTrail",0,0,0,6)
		Loop
	Death:
		FSFX D 3 Bright
		FSFX E 2 Bright A_FSwordFlames
		FSFX F 3 Bright A_Explode(ACS_NamedExecuteWithResult("WOC Monster Damage Scale",WOCTARGET,64), 128, 0)
		FSFX G 2 Bright
		FSFX H 3 Bright
		FSFX I 2 Bright
		FSFX J 3 Bright
		FSFX KLM 2 Bright
		Stop
	}
}

ACTOR NewMageBoss : MageBoss replaces MageBoss
{
	Health 8000
	+TELESTOMP
	/*+NODAMAGETHRUST*/
	+BOSS
	+NOPAIN
	DropItem "Armour4"
	DropItem "NewArtiBoostMana"
	DropItem "AccessoryRandomSpawner" 32
	+NEVERRESPAWN
	DamageFactor "Deathblow", 0
	+NOTELEOTHER
	+NOTARGET
	Damagefactor "PoisonCloud", 0.25
	Tag "Menelkir"
	+USEKILLSCRIPTS
	States
	{
	Spawn:
		MAGE A 0
		MAGE A 3 ACS_NamedExecuteAlways("WOC Monster Init",0,64,WOC_BOSS)
	Idle:
		MAGE A 5 A_Look
		Loop
	Melee:
	Missile:
		MAGE E 8 A_FaceTarget
		MAGE F 0 A_CustomMissile("BossMageStaffFX2", 40, 0, -5)
		MAGE F 0 A_CustomMissile("BossMageStaffFX2", 40, 0, 5)
		MAGE F 8 Bright A_CustomMissile("BossMageStaffFX2", 40, 0)
		Goto See
	XDeath:
		MAGE O 0 A_SpawnItemEx("GIBBER")
		MAGE O 5 A_Scream
		MAGE P 5
		MAGE R 5 A_NoBlocking
		MAGE S 5
		MAGE T 5
		MAGE U 5
		MAGE V 5
		MAGE W 5
		MAGE X -1
		Stop
	Ice:
		"----" Y 5 A_GenericFreezeDeath
		"----" Y 1 A_FreezeDeathChunks
		Wait
	}
}

Actor BossMageStaffFX2 : MageStaffFX2
{
	Damage (ACS_NamedExecuteWithResult("WOC Monster Damage Scale",WOCTARGET,FRandom(8,28)))
	/*+NODAMAGETHRUST*/
	States
	{
	Spawn:
		MSP2 A 0 Bright A_CustomMissile("BloodscourgeFXSpawner",0,0,0,4)
		MSP2 A 1 Bright A_MStaffTrack
		MSP2 A 0 Bright A_CustomMissile("BloodscourgeFXSpawner",0,0,0,4)
		MSP2 A 1 Bright
		MSP2 B 0 Bright A_CustomMissile("BloodscourgeFXSpawner",0,0,0,4)
		MSP2 B 1 Bright A_MStaffTrack
		MSP2 B 0 Bright A_CustomMissile("BloodscourgeFXSpawner",0,0,0,4)
		MSP2 B 1 Bright
		MSP2 C 0 Bright A_CustomMissile("BloodscourgeFXSpawner",0,0,0,4)
		MSP2 C 1 Bright A_MStaffTrack
		MSP2 C 0 Bright A_CustomMissile("BloodscourgeFXSpawner",0,0,0,4)
		MSP2 C 1 Bright
		MSP2 D 0 Bright A_CustomMissile("BloodscourgeFXSpawner",0,0,0,4)
		MSP2 D 1 Bright A_MStaffTrack
		MSP2 D 0 Bright A_CustomMissile("BloodscourgeFXSpawner",0,0,0,4)
		MSP2 D 1 Bright
		Loop
	Death:
		MSP2 E 0 Bright A_ChangeFlag("NODAMAGETHRUST", 1)
		MSP2 E 4 Bright A_SetTranslucent(1,1)
		MSP2 F 5 Bright A_Explode(ACS_NamedExecuteWithResult("WOC Monster Damage Scale",WOCTARGET,80), 192, 0)
		MSP2 GH 5 Bright
		MSP2 I 4 Bright
		Stop
	}
}

Actor WraithSpotZ : RandomSpawner replaces Wraith
{
	Game Hexen
	SpawnID 8
	+TELESTOMP
	DropItem "NewWraith" 255 210
	DropItem "Ghostie" 255 25
	DropItem "PoisonWraith" 255 30
}

Actor WraithBuredSpotZ : RandomSpawner replaces WraithBuried
{
	Game Hexen
	SpawnID 9
	+TELESTOMP
	DropItem "NewWraithBuried" 255 210
	DropItem "GhostieBuried" 255 25
	DropItem "PoisonWraithBuried" 255 30
}

Actor NewWraithFX1 : WraithFX1 replaces WraithFX1
{
	Renderstyle Add
	Damage (ACS_NamedExecuteWithResult("WOC Monster Damage Scale",WOCTARGET,FRandom(15,30)))
	/*+NODAMAGETHRUST*/
	Speed 16
	FastSpeed 20
}

Actor NewWraith : WraithBuried
{
	Height 55
	+SHOOTABLE
	+SOLID
	-DONTMORPH
	-DONTBLAST
	-SPECIALFLOORCLIP
	-STAYMORPHED
	-INVISIBLE
	+NOBLOOD
	PainChance 55
	Dropitem "ArtiGreenFlask" 32
	Dropitem "ReagentGreen" 64
	Dropitem "ArtiWhiteFlask" 8
	Dropitem "ArtiBlackFlask" 8
	Dropitem "Armour1" 16
	DropItem "Money" 64
	DropItem "Money" 64
	DropItem "Money" 64
	DropItem "Money" 64
	DropItem "Money1" 64
	DropItem "Money1" 8
	DropItem "Money2" 4
	DropItem "Money3" 2
	DropItem "ChestKey" 2
	Species "Wraith"
	HitObituary "%o had %p life stolen by a Reiver."
	Obituary "%o was charred by a Reiver."
	Tag "Reiver"
	DamageFactor "PoisonTime", 0
	DamageFactor "Bleed", 0
	DamageFactor "Holy", 1.5
	DamageFactor "HolyPlayer", 1.5
	DamageFactor "HolyTime", 1.5
	+USEKILLSCRIPTS
	States
	{
	Spawn:
		WRTH A 0
		WRTH A 10 ACS_NamedExecuteAlways("WOC Monster Init",0,55,0)
		WRTH B 5 A_WraithInit
		Goto Look
	Look:
		WRTH AB 15 A_Look
		Loop
	Idle:
		WRTH AB 15 A_Look
		Loop
	See:
		WRTH ABCD 4 A_WraithChase
		Loop
	Chase:
		WRTH ABCD 4 A_WraithChase
		Loop
	Pain:
		WRTH A 2
		WRTH H 6 A_Pain
		Goto Chase
	Melee:
		WRTH E 6 A_FaceTarget
		WRTH F 6 A_WraithFX3
		WRTH G 6 A_CustomMeleeAttack(ACS_NamedExecuteWithResult("WOC Monster Damage Scale",ACTIVATOR,FRandom(2,16)), "", "", "Physical")
		Goto Chase
	Missile:
		WRTH E 6 A_FaceTarget
		WRTH F 6
		WRTH G 6 A_CustomMissile("NewWraithFX1", 32, 0)
		Goto Chase
	Ice:
		"----" H 5 A_GenericFreezeDeath
		"----" H 1 A_FreezeDeathChunks
		Wait
	Raise:
		WRTH R 0 ACS_NamedExecuteAlways("WOC Monster Init",0,55,0)
		WRTH RQPONMLKJI 5
		Goto Chase
	}
}

Actor NewWraithBuried : NewWraith
{
	-SHOOTABLE
	-SOLID
	+DONTMORPH
	+DONTBLAST
	+SPECIALFLOORCLIP
	+STAYMORPHED
	+INVISIBLE
	PainChance 0
	Species "Wraith"
	States
	{
	See:
		WRTH A 2 A_WraithRaiseInit
		WRTH A 2 A_WraithRaise
		WRTH A 2 A_FaceTarget
		WRTH BB 2 A_WraithRaise
		Goto See+1
	}
}

Actor PoisonWraith : NewWraith
{
	Health 175
	Species "Wraith"
	dropitem "ArtiGreenFlask" 32
	Dropitem "ReagentGreen" 64
	DropItem "Money" 64
	DropItem "Money" 64
	DropItem "Money" 64
	DropItem "Money" 64
	DropItem "Money1" 64
	DropItem "Money1" 8
	DropItem "Money2" 4
	DropItem "Money3" 2
	DropItem "ChestKey" 2
	HitObituary "%o had %p life stolen by a Poison Reiver."
	Obituary "%o was poisoned by a Poison Reiver."
	Tag "Poison Reiver"
	DamageFactor "Poison", 0.5
	DamageFactor "PoisonPlayer", 0.5
	States
	{
	Spawn:
		PWTH A 0
		PWTH A 10 ACS_NamedExecuteAlways("WOC Monster Init",0,55,0)
		PWTH B 5 A_WraithInit
		Goto Look
	Idle:
		PWTH AB 15 A_Look
		Loop
	Look:
		PWTH AB 15 A_Look
		Loop
	See:
		PWTH ABCD 4 A_WraithChase
		Loop
	Chase:
		PWTH ABCD 4 A_WraithChase
		Loop
	Pain:
		PWTH A 2
		PWTH H 6 A_Pain
		Goto Chase
	Melee:
		PWTH E 6 A_FaceTarget
		TNT1 A 0 A_Jump(256,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15)
		TNT1 AAAAAAAAAAAAAA 0 A_SpawnItemEx("PoisonWraithFX3",Random(-4,4),Random(-4,4),1,0,0,0,0)
		PWTH F 6
		PWTH G 6 A_CustomMeleeAttack(ACS_NamedExecuteWithResult("WOC Monster Damage Scale",ACTIVATOR,FRandom(2,16)), "", "", "Poison")
		Goto Chase
	Missile:
		PWTH E 6 A_FaceTarget
		PWTH F 6
		PWTH G 6 A_CustomMissile("PoisonWraithFX1", 32, 0)
		Goto Chase
	Death:
		PWTH I 4
		PWTH J 4 A_Scream
		PWTH KL 4
		PWTH M 4 A_NoBlocking
		PWTH N 4 A_QueueCorpse
		PWTH O 4
		PWTH PQ 5
		PWTH R -1 //A_BossDeath
		Stop
	XDeath:
		PWT2 A 5
		PWT2 B 5 A_Scream
		PWT2 CD 5
		PWT2 E 5 A_NoBlocking
		PWT2 F 5 A_QueueCorpse
		PWT2 G 5
		PWT2 H -1 //A_BossDeath
		Stop
	Raise:
		PWTH R 0 ACS_NamedExecuteAlways("WOC Monster Init",0,55,0)
		PWTH RQPONMLKJI 5
		goto See
	}
}

Actor PoisonWraithBuried : PoisonWraith
{
	-SHOOTABLE
	-SOLID
	+DONTMORPH
	+DONTBLAST
	+SPECIALFLOORCLIP
	+STAYMORPHED
	+INVISIBLE
	PainChance 0
	Species "Wraith"
	States
	{
	See:
		PWTH A 2 A_WraithRaiseInit
		PWTH A 2 A_WraithRaise
		PWTH A 2 A_FaceTarget
		PWTH BB 2 A_WraithRaise
		Goto See+1
	}
}

Actor PoisonWraithFX1
{
	Speed 16
	FastSpeed 20
	Radius 10
	Height 6
	Mass 5
	Damagetype "Poison"
	Damage (ACS_NamedExecuteWithResult("WOC Monster Damage Scale",WOCTARGET,FRandom(5,10)))
	Projectile
	+FLOORCLIP
	+HITTRACER
	SeeSound "WraithMissileFire"
	DeathSound "WraithMissileExplode"
	Renderstyle Add
	States
	{
	Spawn:
		PWRB A 3 Bright
		TNT1 A 0 A_SpawnItemEx("PoisonWraithFX2",0,0,1,FRandom(1.0,1.5),FRandom(1.0,1.5),0,FRandom(0,90))
		PWRB B 3 Bright A_SpawnItemEx("PoisonWraithFX2",0,0,1,FRandom(1.0,1.5),FRandom(1.0,1.5),0,FRandom(270,0))
		PWRB C 3 Bright
		Loop
	Death:
		PWRB D 4 Bright ACS_NamedExecuteWithResult("WOC DAMAGE OVER TIME", ACS_ExecuteWithResult(WOC_DECORATE,STATS,WOCTID,WOCTRACER), ACS_NamedExecuteWithResult("WOC Monster Damage Scale",WOCTARGET,FRandom(10,20)), 5, POISONDOT)
		TNT1 A 0 A_SpawnItemEx("PoisonWraithFX2",0,0,1,FRandom(1.0,1.5),FRandom(1.0,1.5),0,FRandom(0,90))
		PWRB E 4 Bright A_SpawnItemEx("PoisonWraithFX2",0,0,1,FRandom(1.0,1.5),FRandom(1.0,1.5),0,FRandom(270,0))
		PWRB F 4 Bright
		TNT1 A 0 A_SpawnItemEx("PoisonWraithFX2",0,0,1,FRandom(1.0,1.5),FRandom(1.0,1.5),0,FRandom(0,90))
		WRBL G 3 Bright A_SpawnItemEx("PoisonWraithFX2",0,0,1,FRandom(1.0,1.5),FRandom(1.0,1.5),0,FRandom(270,0))
		TNT1 A 0 A_SpawnItemEx("PoisonWraithFX2",0,0,1,FRandom(1.0,1.5),FRandom(1.0,1.5),0,FRandom(0,90))
		WRBL H 3 Bright A_SpawnItemEx("PoisonWraithFX2",0,0,1,FRandom(1.0,1.5),FRandom(1.0,1.5),0,FRandom(270,0))
		WRBL I 3 Bright
		Stop
	}
}

Actor PoisonWraithFX2
{
  Radius 2
  Height 5
  Mass 5
  +NOBLOCKMAP
  +DROPOFF
  +FLOORCLIP
  +NOTELEPORT
  States
  {
  Spawn:
    PWRB JKLMNOP 4 Bright
    Stop
  }
}

Actor PoisonWraithFX3
{
  Radius 2
  Height 5
  Mass 5
  +NOBLOCKMAP
  +DROPOFF
  +MISSILE
  +FLOORCLIP
  +NOTELEPORT
  DeathSound "Drip"
  States
  {
  Spawn:
    PWRB QRS 4 Bright
    Loop
  Death:
    PWRB S 4 Bright
    Stop
  }
}

Actor Ghostie : NewWraith
{
	Health 300
	+GHOST
	+SHADOW
	Species "Wraith"
	Renderstyle Add
	DropItem "ArtiWhiteFlask" 16
	DropItem "Money" 64
	DropItem "Money" 64
	DropItem "Money" 64
	DropItem "Money" 64
	DropItem "Money1" 64
	DropItem "Money1" 8
	DropItem "Money2" 4
	DropItem "Money3" 2
	DropItem "ChestKey" 2
	HitObituary "%o had %p life stolen by a Wraith."
	Obituary "%o was drained by a Wraith."
	Tag "Wraith"
	DamageFactor "Arcane", 1.5
	DamageFactor "ArcanePlayer", 1.5
	DamageFactor "ArcaneTime", 1.5
	DamageFactor "Holy", 1.0
	DamageFactor "HolyPlayer", 1.0
	DamageFactor "HolyTime", 1.0
	States
	{
	Spawn:
		GOST A 0
		GOST A 10 ACS_NamedExecuteAlways("WOC Monster Init",0,55,0)
		GOST B 5 A_WraithInit
		Goto Look
	Idle:
		GOST AB 15 A_Look
		Loop
	Look:
		GOST AB 15 A_Look
		Loop
	See:
		GOST ABCD 4 A_WraithChase
		Loop
	Chase:
		GOST ABCD 4 A_WraithChase
		Loop
	Pain:
		GOST A 2
		GOST H 6 A_Pain
		Goto Chase
	Melee:
	Stop
	Missile:
		GOST E 6 A_FaceTarget
		GOST F 6
		GOST G 0 A_CustomMissile("WVSpell1", 32, 0)
		GOST G 0 A_CustomMissile("WVSpell2", 32, 0)
		GOST G 0 A_CustomMissile("WVSpell3", 32, 0)
		GOST G 6 A_CustomMissile("WVSpell4", 32, 0)
		Goto Chase
	Death:
		GOST I 4
		GOST J 4 A_Scream
		GOST KL 4
		GOST M 4 A_NoBlocking
		GOST N 4 A_QueueCorpse
		GOST O 4
		GOST PQ 5
		GOST R -1 //A_BossDeath
		Stop
	XDeath:
		GOS2 A 5
		GOS2 B 5 A_Scream
		GOS2 CD 5
		GOS2 E 5 A_NoBlocking
		GOS2 F 5 A_QueueCorpse
		GOS2 G 5
		GOS2 H -1 //A_BossDeath
		Stop
	Raise:
		GOST R 0 ACS_NamedExecuteAlways("WOC Monster Init",0,55,0)
		GOST RQPONMLKJI 5
		goto See
	}
}

Actor GhostieBuried : Ghostie
{
	-SHOOTABLE
	-SOLID
	+DONTMORPH
	+DONTBLAST
	+SPECIALFLOORCLIP
	+STAYMORPHED
	+INVISIBLE
	PainChance 0
	Species "Wraith"
	States
	{
	See:
		GOST A 2 A_WraithRaiseInit
		GOST A 2 A_WraithRaise
		GOST A 2 A_FaceTarget
		GOST BB 2 A_WraithRaise
		Goto See+1
	}
}

ACTOR WVSpell1
{
    Speed 20
	FastSpeed 25
    Damagetype "Holy"
	Damage (ACS_NamedExecuteWithResult("WOC Monster Damage Scale",WOCTARGET,FRandom(1,8)))
    Scale 0.35
    Radius 6
    Height 12
    RenderStyle Add
    Alpha 0.75
    PROJECTILE
    //+SEEKERMISSILE
	/*+NODAMAGETHRUST*/
    +EXTREMEDEATH
    +DONTREFLECT
	+HITTRACER
    SeeSound "whiteballbsee"
    DeathSound "whiteballbdeth"
    States
    {
    Spawn:
		PSMM A 1 Bright A_SeekerMissile(25,10)
		TNT1 A 0 Bright A_BishopMissileWeave
		TNT1 A 0 A_CustomMissile("SLM2Trail",0,0,0)
		PSMM A 1 Bright A_SeekerMissile(25,10)
		TNT1 A 0 Bright A_BishopMissileWeave
		TNT1 A 0 A_CustomMissile("SLM2Trail",0,0,0)
		PSMM A 1 Bright A_SeekerMissile(25,10)
		TNT1 A 0 Bright A_BishopMissileWeave
		TNT1 A 0 A_CustomMissile("SLM2Trail",0,0,0)
		PSMM A 1 Bright A_SeekerMissile(25,10)
		TNT1 A 0 Bright A_BishopMissileWeave
		TNT1 A 0 A_CustomMissile("SLM2Trail",0,0,0)
		PSMM B 1 Bright A_SeekerMissile(25,10)
		TNT1 A 0 Bright A_BishopMissileWeave
		TNT1 A 0 A_CustomMissile("SLM2Trail",0,0,0)
		PSMM B 1 Bright A_SeekerMissile(25,10)
		TNT1 A 0 Bright A_BishopMissileWeave
		TNT1 A 0 A_CustomMissile("SLM2Trail",0,0,0)
		PSMM B 1 Bright A_SeekerMissile(25,10)
		TNT1 A 0 Bright A_BishopMissileWeave
		TNT1 A 0 A_CustomMissile("SLM2Trail",0,0,0)
		PSMM B 1 Bright A_SeekerMissile(25,10)
		TNT1 A 0 Bright A_BishopMissileWeave
		TNT1 A 0 A_CustomMissile("SLM2Trail",0,0,0)
		PSMM C 1 Bright A_SeekerMissile(25,10)
		TNT1 A 0 Bright A_BishopMissileWeave
		TNT1 A 0 A_CustomMissile("SLM2Trail",0,0,0)
		PSMM C 1 Bright A_SeekerMissile(25,10)
		TNT1 A 0 Bright A_BishopMissileWeave
		TNT1 A 0 A_CustomMissile("SLM2Trail",0,0,0)
		PSMM C 1 Bright A_SeekerMissile(25,10)
		TNT1 A 0 Bright A_BishopMissileWeave
		TNT1 A 0 A_CustomMissile("SLM2Trail",0,0,0)
		PSMM D 1 Bright A_SeekerMissile(25,10)
		TNT1 A 0 Bright A_BishopMissileWeave
		TNT1 A 0 A_CustomMissile("SLM2Trail",0,0,0)
		PSMM D 1 Bright A_SeekerMissile(25,10)
		TNT1 A 0 Bright A_BishopMissileWeave
		TNT1 A 0 A_CustomMissile("SLM2Trail",0,0,0)
		PSMM E 1 Bright A_SeekerMissile(25,10)
		TNT1 A 0 Bright A_BishopMissileWeave
		TNT1 A 0 A_CustomMissile("SLM2Trail",0,0,0)
		PSMM E 1 Bright A_SeekerMissile(25,10)
		TNT1 A 0 Bright A_BishopMissileWeave
		TNT1 A 0 A_CustomMissile("SLM2Trail",0,0,0)
		PSMM F 1 Bright A_SeekerMissile(25,10)
		TNT1 A 0 Bright A_BishopMissileWeave
		TNT1 A 0 A_CustomMissile("SLM2Trail",0,0,0)
		PSMM F 1 Bright A_SeekerMissile(25,10)
		TNT1 A 0 Bright A_BishopMissileWeave
		TNT1 A 0 A_CustomMissile("SLM2Trail",0,0,0)
		Goto Spawn+33
    Death:
		PSMM G 0 Bright A_TakeInventory("Mana1", ACS_NamedExecuteWithResult("WOC Monster Damage Scale",WOCTARGET,5), 0, AAPTR_TRACER)
		PSMM G 0 Bright A_TakeInventory("Mana2", ACS_NamedExecuteWithResult("WOC Monster Damage Scale",WOCTARGET,5), 0, AAPTR_TRACER)
		PSMM GGHHIIJJKKLLMM 2 Bright A_FadeOut(0.05)
		Stop
    }
}

ACTOR WVSpell2 : WVSpell1
{
    States
    {
    Spawn:
	TNT1 A 0 A_SeekerMissile(25,10)
	PSMM A 1 Bright
	TNT1 A 0 A_CustomMissile("SLM2Trail",0,0,0)
	TNT1 A 0 A_SeekerMissile(25,10)
	PSMM A 1 Bright
	TNT1 A 0 A_CustomMissile("SLM2Trail",0,0,0)
	TNT1 A 0 A_SeekerMissile(25,10)
	PSMM A 1 Bright
	TNT1 A 0 A_CustomMissile("SLM2Trail",0,0,0)
	TNT1 A 0 A_SeekerMissile(25,10)
	PSMM A 1 Bright
	TNT1 A 0 A_CustomMissile("SLM2Trail",0,0,0)
	TNT1 A 0 A_SeekerMissile(25,10)
	PSMM B 1 Bright
	TNT1 A 0 A_CustomMissile("SLM2Trail",0,0,0)
	TNT1 A 0 A_SeekerMissile(25,10)
	PSMM B 1 Bright
	TNT1 A 0 A_CustomMissile("SLM2Trail",0,0,0)
	TNT1 A 0 A_SeekerMissile(25,10)
	PSMM B 1 Bright
	TNT1 A 0 A_CustomMissile("SLM2Trail",0,0,0)
	TNT1 A 0 A_SeekerMissile(25,10)
	PSMM B 1 Bright
	TNT1 A 0 A_CustomMissile("SLM2Trail",0,0,0)
	TNT1 A 0 A_SeekerMissile(25,10)
	PSMM C 1 Bright
	TNT1 A 0 A_CustomMissile("SLM2Trail",0,0,0)
	TNT1 A 0 A_SeekerMissile(25,10)
	PSMM C 1 Bright
	TNT1 A 0 A_CustomMissile("SLM2Trail",0,0,0)
	TNT1 A 0 A_SeekerMissile(25,10)
	PSMM C 1 Bright
	TNT1 A 0 A_CustomMissile("SLM2Trail",0,0,0)
	TNT1 A 0 A_SeekerMissile(25,10)
	PSMM C 1 Bright
	TNT1 A 0 A_CustomMissile("SLM2Trail",0,0,0)
	TNT1 A 0 A_SeekerMissile(25,10)
	PSMM D 1 Bright
	TNT1 A 0 A_CustomMissile("SLM2Trail",0,0,0)
	TNT1 A 0 A_SeekerMissile(25,10)
	PSMM D 1 Bright
	TNT1 A 0 A_CustomMissile("SLM2Trail",0,0,0)
	TNT1 A 0 A_SeekerMissile(25,10)
	PSMM E 1 Bright
	TNT1 A 0 A_CustomMissile("SLM2Trail",0,0,0)
	TNT1 A 0 A_SeekerMissile(25,10)
	PSMM E 1 Bright
	TNT1 A 0 A_CustomMissile("SLM2Trail",0,0,0)
	TNT1 A 0 A_SeekerMissile(25,10)
	PSMM F 1 Bright A_BishopMissileWeave
	TNT1 A 0 A_CustomMissile("SLM2Trail",0,0,0)
	TNT1 A 0 A_SeekerMissile(25,10)
	PSMM F 1 Bright A_BishopMissileWeave
	TNT1 A 0 A_CustomMissile("SLM2Trail",0,0,0)
	TNT1 A 0 A_SeekerMissile(25,10)
	PSMM D 1 Bright A_BishopMissileWeave
	TNT1 A 0 A_CustomMissile("SLM2Trail",0,0,0)
	TNT1 A 0 A_SeekerMissile(25,10)
	PSMM D 1 Bright A_BishopMissileWeave
	TNT1 A 0 A_CustomMissile("SLM2Trail",0,0,0)
	TNT1 A 0 A_SeekerMissile(25,10)
	PSMM E 1 Bright A_BishopMissileWeave
	TNT1 A 0 A_CustomMissile("SLM2Trail",0,0,0)
	TNT1 A 0 A_SeekerMissile(25,10)
	PSMM E 1 Bright A_BishopMissileWeave
	TNT1 A 0 A_CustomMissile("SLM2Trail",0,0,0)
	Goto Spawn+48
    }
}

ACTOR WVSpell3 : WVSpell1
{
    States
    {
    Spawn:
	TNT1 A 0 A_SeekerMissile(25,10)
	PSMM A 1 Bright
	TNT1 A 0 A_CustomMissile("SLM2Trail",0,0,0)
	TNT1 A 0 A_SeekerMissile(25,10)
	PSMM A 1 Bright
	TNT1 A 0 A_CustomMissile("SLM2Trail",0,0,0)
	TNT1 A 0 A_SeekerMissile(25,10)
	PSMM A 1 Bright
	TNT1 A 0 A_CustomMissile("SLM2Trail",0,0,0)
	TNT1 A 0 A_SeekerMissile(25,10)
	PSMM A 1 Bright
	TNT1 A 0 A_CustomMissile("SLM2Trail",0,0,0)
	TNT1 A 0 A_SeekerMissile(25,10)
	PSMM B 1 Bright
	TNT1 A 0 A_CustomMissile("SLM2Trail",0,0,0)
	TNT1 A 0 A_SeekerMissile(25,10)
	PSMM B 1 Bright
	TNT1 A 0 A_CustomMissile("SLM2Trail",0,0,0)
	TNT1 A 0 A_SeekerMissile(25,10)
	PSMM B 1 Bright
	TNT1 A 0 A_CustomMissile("SLM2Trail",0,0,0)
	TNT1 A 0 A_SeekerMissile(25,10)
	PSMM B 1 Bright
	TNT1 A 0 A_CustomMissile("SLM2Trail",0,0,0)
	TNT1 A 0 A_SeekerMissile(25,10)
	PSMM C 1 Bright A_BishopMissileWeave
	TNT1 A 0 A_CustomMissile("SLM2Trail",0,0,0)
	TNT1 A 0 A_SeekerMissile(25,10)
	PSMM C 1 Bright A_BishopMissileWeave
	TNT1 A 0 A_CustomMissile("SLM2Trail",0,0,0)
	TNT1 A 0 A_SeekerMissile(25,10)
	PSMM C 1 Bright A_BishopMissileWeave
	TNT1 A 0 A_CustomMissile("SLM2Trail",0,0,0)
	TNT1 A 0 A_SeekerMissile(25,10)
	PSMM C 1 Bright A_BishopMissileWeave
	TNT1 A 0 A_CustomMissile("SLM2Trail",0,0,0)
	TNT1 A 0 A_SeekerMissile(25,10)
	PSMM D 1 Bright A_BishopMissileWeave
	TNT1 A 0 A_CustomMissile("SLM2Trail",0,0,0)
	TNT1 A 0 A_SeekerMissile(25,10)
	PSMM D 1 Bright A_BishopMissileWeave
	TNT1 A 0 A_CustomMissile("SLM2Trail",0,0,0)
	TNT1 A 0 A_SeekerMissile(25,10)
	PSMM E 1 Bright A_BishopMissileWeave
	TNT1 A 0 A_CustomMissile("SLM2Trail",0,0,0)
	TNT1 A 0 A_SeekerMissile(25,10)
	PSMM E 1 Bright A_BishopMissileWeave
	TNT1 A 0 A_CustomMissile("SLM2Trail",0,0,0)
	TNT1 A 0 A_SeekerMissile(25,10)
	PSMM F 1 Bright A_BishopMissileWeave
	TNT1 A 0 A_CustomMissile("SLM2Trail",0,0,0)
	TNT1 A 0 A_SeekerMissile(25,10)
	PSMM F 1 Bright A_BishopMissileWeave
	TNT1 A 0 A_CustomMissile("SLM2Trail",0,0,0)
	Goto Spawn+36
    }
}

ACTOR WVSpell4 : WVSpell1
{
    States
    {
    Spawn:
	TNT1 A 0 A_SeekerMissile(25,10)
	PSMM A 1 Bright
	TNT1 A 0 A_CustomMissile("SLM2Trail",0,0,0)
	TNT1 A 0 A_SeekerMissile(25,10)
	PSMM A 1 Bright
	TNT1 A 0 A_CustomMissile("SLM2Trail",0,0,0)
	TNT1 A 0 A_SeekerMissile(25,10)
	PSMM A 1 Bright
	TNT1 A 0 A_CustomMissile("SLM2Trail",0,0,0)
	TNT1 A 0 A_SeekerMissile(25,10)
	PSMM A 1 Bright
	TNT1 A 0 A_CustomMissile("SLM2Trail",0,0,0)
	TNT1 A 0 A_SeekerMissile(25,10)
	PSMM B 1 Bright
	TNT1 A 0 A_CustomMissile("SLM2Trail",0,0,0)
	TNT1 A 0 A_SeekerMissile(25,10)
	PSMM B 1 Bright
	TNT1 A 0 A_CustomMissile("SLM2Trail",0,0,0)
	TNT1 A 0 A_SeekerMissile(25,10)
	PSMM B 1 Bright
	TNT1 A 0 A_CustomMissile("SLM2Trail",0,0,0)
	TNT1 A 0 A_SeekerMissile(25,10)
	PSMM B 1 Bright
	TNT1 A 0 A_CustomMissile("SLM2Trail",0,0,0)
	TNT1 A 0 A_SeekerMissile(25,10)
	PSMM C 1 Bright
	TNT1 A 0 A_CustomMissile("SLM2Trail",0,0,0)
	TNT1 A 0 A_SeekerMissile(25,10)
	PSMM C 1 Bright
	TNT1 A 0 A_CustomMissile("SLM2Trail",0,0,0)
	TNT1 A 0 A_SeekerMissile(25,10)
	PSMM C 1 Bright
	TNT1 A 0 A_CustomMissile("SLM2Trail",0,0,0)
	TNT1 A 0 A_SeekerMissile(25,10)
	PSMM C 1 Bright
	TNT1 A 0 A_CustomMissile("SLM2Trail",0,0,0)
	TNT1 A 0 A_SeekerMissile(25,10)
	PSMM D 1 Bright
	TNT1 A 0 A_CustomMissile("SLM2Trail",0,0,0)
	TNT1 A 0 A_SeekerMissile(25,10)
	PSMM D 1 Bright
	TNT1 A 0 A_CustomMissile("SLM2Trail",0,0,0)
	TNT1 A 0 A_SeekerMissile(25,10)
	PSMM E 1 Bright
	TNT1 A 0 A_CustomMissile("SLM2Trail",0,0,0)
	TNT1 A 0 A_SeekerMissile(25,10)
	PSMM E 1 Bright
	TNT1 A 0 A_CustomMissile("SLM2Trail",0,0,0)
	TNT1 A 0 A_SeekerMissile(25,10)
	PSMM F 1 Bright
	TNT1 A 0 A_CustomMissile("SLM2Trail",0,0,0)
	TNT1 A 0 A_SeekerMissile(25,10)
	PSMM F 1 Bright
	TNT1 A 0 A_CustomMissile("SLM2Trail",0,0,0)
	TNT1 A 0 A_SeekerMissile(25,10)
	PSMM D 1 Bright
	TNT1 A 0 A_CustomMissile("SLM2Trail",0,0,0)
	TNT1 A 0 A_SeekerMissile(25,10)
	PSMM D 1 Bright
	TNT1 A 0 A_CustomMissile("SLM2Trail",0,0,0)
	TNT1 A 0 A_SeekerMissile(25,10)
	PSMM E 1 Bright
	TNT1 A 0 A_CustomMissile("SLM2Trail",0,0,0)
	TNT1 A 0 A_SeekerMissile(25,10)
	PSMM E 1 Bright
	TNT1 A 0 A_CustomMissile("SLM2Trail",0,0,0)
	TNT1 A 0 A_SeekerMissile(25,10)
	PSMM F 1 Bright
	TNT1 A 0 A_CustomMissile("SLM2Trail",0,0,0)
	TNT1 A 0 A_SeekerMissile(25,10)
	PSMM F 1 Bright
	TNT1 A 0 A_CustomMissile("SLM2Trail",0,0,0)
	TNT1 A 0 A_SeekerMissile(25,10)
	PSMM D 1 Bright A_BishopMissileWeave
	TNT1 A 0 A_CustomMissile("SLM2Trail",0,0,0)
	TNT1 A 0 A_SeekerMissile(25,10)
	PSMM D 1 Bright A_BishopMissileWeave
	TNT1 A 0 A_CustomMissile("SLM2Trail",0,0,0)
	TNT1 A 0 A_SeekerMissile(25,10)
	PSMM E 1 Bright A_BishopMissileWeave
	TNT1 A 0 A_CustomMissile("SLM2Trail",0,0,0)
	TNT1 A 0 A_SeekerMissile(25,10)
	PSMM E 1 Bright A_BishopMissileWeave
	TNT1 A 0 A_CustomMissile("SLM2Trail",0,0,0)
	TNT1 A 0 A_SeekerMissile(25,10)
	PSMM F 1 Bright A_BishopMissileWeave
	TNT1 A 0 A_CustomMissile("SLM2Trail",0,0,0)
	TNT1 A 0 A_SeekerMissile(25,10)
	PSMM F 1 Bright A_BishopMissileWeave
	TNT1 A 0 A_CustomMissile("SLM2Trail",0,0,0)
	Goto Spawn+72
    }
}

Actor BishopSpotZ : RandomSpawner Replaces Bishop
{
	Game Hexen
	SpawnID 19
	+TELESTOMP
	DropItem "NewBishop" 255 165
	DropItem "Priest" 255 40
	DropItem "Disciple" 255 30
	DropItem "Vampire" 255 20
	DropItem "DarkPatriarch" 255 1
}

Actor NewBishop : Bishop// Replaces Bishop
{
	-NOBLOOD
	Species "Bishop"
	dropitem "ArtiOrangeFlask" 32
	DropItem "Armour4" 8
	dropitem "ReagentGreen" 64
	DropItem "Money" 64
	DropItem "Money" 64
	DropItem "Money" 64
	DropItem "Money" 64
	DropItem "Money1" 64
	DropItem "Money1" 8
	DropItem "Money2" 4
	DropItem "Money3" 2
	DropItem "ChestKey" 2
	Bloodtype "EtherealBloodGreen"
	Tag "Dark Bishop"
	+USEKILLSCRIPTS
	+AVOIDMELEE
	DamageFactor "Holy", 0.5
	DamageFactor "HolyPlayer", 0.5
	DamageFactor "HolyTime", 0.5
	DamageFactor "Shadow", 2.0
	DamageFactor "ShadowTime", 2.0
	DamageFactor "ShadowPlayer", 2.0
	States
	{
	Spawn:
		BISH A 0
		BISH A 0 ACS_NamedExecuteAlways("WOC Monster Init",0,65,0)//increase health on higher difficulties
	Idle:
		BISH A 10 A_Look
		Loop
	See:
		BISH A 2 A_Chase
		BISH A 0 A_JumpIfTargetInLOS(2)
		BISH A 0 A_Jump(256,2)
		BISH A 0 A_BishopDecide
		BISH A 2 A_BishopChase
		BISH A 0 A_JumpIfTargetInLOS(2)
		BISH A 0 A_Jump(256,2)
		BISH A 0 A_BishopDecide
		BISH A 2
		BISH A 0 A_JumpIfTargetInLOS(2)
		BISH A 0 A_Jump(256,2)
		BISH B 0 A_BishopDecide
		BISH B 2 A_BishopChase
		BISH B 0 A_JumpIfTargetInLOS(2)
		BISH B 0 A_Jump(256,2)
		BISH B 0 A_BishopDecide
		BISH B 2 A_Chase
		BISH B 0 A_JumpIfTargetInLOS(2)
		BISH B 0 A_Jump(256,2)
		BISH B 0 A_BishopDecide
		BISH B 2 A_BishopChase
		BISH B 0 A_JumpIfTargetInLOS(2)
		BISH B 0 A_Jump(256,2)
		BISH B 0 A_BishopDecide
		BISH B 0
		Loop
	Blur:
		BISH A 0 A_FaceTarget
		BISH A 2 A_BishopDoBlur
		BISH A 4 A_BishopSpawnBlur
		Wait
	Pain:
		BISH C 6 A_Pain
		BISH CCC 6 A_BishopPainBlur
		BISH C 0
		Goto See
	Missile:
		BISH A 3 A_FaceTarget
		BISH DE 3 A_FaceTarget
		BISH F 3 A_BishopAttack
		BISH F 5 A_BishopAttack2
		BISH F 0 A_FaceTarget
		Goto Missile+4
	Death:
		BISH G 6
		BISH H 6 BRIGHT A_Scream
		BISH I 5 BRIGHT A_NoBlocking
		BISH J 5 BRIGHT A_SpawnItemEx("BishopExplode")
		BISH K 5 BRIGHT
		BISH LM 4 BRIGHT
		BISH N 4 A_CustomMissile("BishopPuff",40,0,0,2)
		BISH O 4 A_QueueCorpse
		BISH P -1 //A_BossDeath
		Stop
	Ice:
		"----" C 5 A_GenericFreezeDeath
		"----" C 1 A_FreezeDeathChunks
		Wait
	Raise:
		BISH O 0 ACS_NamedExecuteAlways("WOC Monster Init",0,65,0)
		BISH ON 5 
		BISH MLKJIH 5 Bright
		BISH G 5
		goto See
	}
}

actor BishopExplode
{
	Speed 0
	Height 4
	Radius 4
	PROJECTILE
	Damage (0)
	+MISSILE
	+DONTBLAST
	+NOBLOCKMAP
	+NOGRAVITY
	+DONTSPLASH
	-TELESTOMP
	Damagetype "Holy"
	States
	{
	Spawn:
		TNT1 A 0
		TNT1 A 1 A_Explode(ACS_NamedExecuteWithResult("WOC Monster Damage Scale",WOCTARGET,FRandom(25,40)),128)
		Stop
	}
}

Actor HeresiarchNewBishop : NewBishop
{
	DropItem "Mana3" 64
	States
	{
	Spawn:
		BISH A 0
		BISH A 0 ACS_NamedExecuteAlways("WOC Monster Init",0,65,0)
		BISH P 4
		BISH ON 4
		BISH MLKJIH 3
		BISH G 3
		Goto Idle
	Raise:
		BISH O 0 ACS_NamedExecuteAlways("WOC Monster Init",0,65,0)
		BISH ON 5 
		BISH MLKJIH 5 Bright
		BISH G 5
		goto See
	}
}

Actor NewBishopFX : BishopFX replaces BishopFX
{
	Damage (ACS_NamedExecuteWithResult("WOC Monster Damage Scale",WOCTARGET,FRandom(1,4)))
	FastSpeed 15
	-STRIFEDAMAGE
	Damagetype "Holy"
	States
	{
	Spawn:
		BPFX ABAB 1 Bright A_BishopMissileWeave
		BPFX B 0 Bright A_SeekerMissile(2, 3, SMF_PRECISE)
		Loop
	Death:
		BPFX CDEF 4 Bright
		BPFX GH 3 Bright
		Stop
	}
}

//Acolyte

Actor Priest : NewBishop
{
	Species "Bishop"
	Obituary "%o succumbed to an Acolyte's dark power."
	dropitem "ArtiOrangeFlask" 32
	dropitem "ReagentRed" 64
	DropItem "Armour8" 16
	DropItem "Money" 64
	DropItem "Money" 64
	DropItem "Money" 64
	DropItem "Money" 64
	DropItem "Money1" 64
	DropItem "Money1" 8
	DropItem "Money2" 4
	DropItem "Money3" 2
	DropItem "ChestKey" 2
	Bloodtype "EtherealBloodYellow"
	Tag "Dark Acolyte"
	States
	{
	Spawn:
		ACOL A 0
		ACOL A 0 A_GiveInventory("FriendlyInDisguise")
		ACOL A 0 ACS_NamedExecuteAlways("WOC Monster Init",0,65,WOC_STATUSIMMUNE)//increase health on higher difficulties
	Idle:
		ACOL A 10 A_Look
		Loop
	See:
		ACOL A 0 A_ChangeFlag("FRIENDLY",1)
		ACOL A 2 A_Chase
		ACOL A 0 A_JumpIfTargetInLOS(2)
		ACOL A 0 A_Jump(256,2)
		ACOL A 0 A_BishopDecide
		ACOL A 2 A_BishopChase
		ACOL A 0 A_JumpIfTargetInLOS(2)
		ACOL A 0 A_Jump(256,2)
		ACOL A 0 A_BishopDecide
		ACOL A 2
		ACOL A 0 A_JumpIfTargetInLOS(2)
		ACOL A 0 A_Jump(256,2)
		ACOL B 0 A_BishopDecide
		ACOL B 2 A_BishopChase
		ACOL B 0 A_JumpIfTargetInLOS(2)
		ACOL B 0 A_Jump(256,2)
		ACOL B 0 A_BishopDecide
		ACOL B 2 A_Chase
		ACOL B 0 A_JumpIfTargetInLOS(2)
		ACOL B 0 A_Jump(256,2)
		ACOL B 0 A_BishopDecide
		ACOL B 2 A_BishopChase
		ACOL B 0 A_JumpIfTargetInLOS(2)
		ACOL B 0 A_Jump(256,2)
		ACOL B 0 A_BishopDecide
		ACOL B 0
		Loop
	Blur:
		ACOL A 0 A_FaceTarget
		ACOL A 2 A_BishopDoBlur
		ACOL AAA 4 A_SpawnItem("AcolyteBlur")
		TNT1 A 0 A_Jump(256,1,2,3)
		ACOL AA 4 A_SpawnItem("AcolyteBlur")
		TNT1 A 0 Thing_Stop(0)
		TNT1 A 0 A_SpawnItem("AcolyteBlur")
		Goto See
	Missile:
		ACOL A 3 A_FaceTarget
		ACOL DE 3 A_FaceTarget
		ACOL F 3 A_PlaySound("BishopAttack")
		TNT1 A 0 A_Jump(256,2,4,6,8)
		ACOL F 5 A_CustomMissile("AcolyteFX",32)
		ACOL F 0 A_FaceTarget
		ACOL F 5 A_CustomMissile("AcolyteFX",32)
		ACOL F 0 A_FaceTarget
		ACOL F 5 A_CustomMissile("AcolyteFX",32)
		ACOL F 0 A_FaceTarget
		ACOL F 5 A_CustomMissile("AcolyteFX",32)
		ACOL F 0 A_FaceTarget
		ACOL F 5 A_CustomMissile("AcolyteFX",32)
		ACOL F 0 A_FaceTarget
		ACOL F 5 A_CustomMissile("AcolyteFX",32)
		ACOL F 0 A_FaceTarget
		ACOL F 5 A_CustomMissile("AcolyteFX",32)
		ACOL F 0 A_FaceTarget
		ACOL F 5 A_CustomMissile("AcolyteFX",32)
		ACOL F 0 A_FaceTarget
		ACOL F 0 A_ClearTarget
		Goto See
	Pain:
		ACOL C 6 A_Pain
		TNT1 A 0 A_Jump(64,"Blur")
		ACOL C 6 A_SpawnItemEx("AcolytePainBlur",Random(-10,10),Random(-10,10),Random(-10,10))
		TNT1 A 0 A_Jump(64,"Blur")
		ACOL C 6 A_SpawnItemEx("AcolytePainBlur",Random(-10,10),Random(-10,10),Random(-10,10))
		TNT1 A 0 A_Jump(64,"Blur")
		ACOL C 6 A_SpawnItemEX("AcolytePainBlur",Random(-10,10),Random(-10,10),Random(-10,10))
		Goto See
	Death:
		ACOL G 6
		ACOL H 6 Bright A_Scream
		ACOL I 5 Bright A_NoBlocking
		ACOL J 5 Bright A_RadiusGive("AcolyteRadiusHeal", 128, RGF_MONSTERS, 1)
		ACOL K 5 Bright
		ACOL LM 4 Bright
		ACOL N 4 A_SpawnItemEx("BishopPuff", 0,0,40, 0,0,0.5)
		ACOL O 4 A_QueueCorpse
		ACOL P -1 //A_BossDeath
		Stop
	Ice:
		"----" C 5 A_GenericFreezeDeath
		"----" C 1 A_FreezeDeathChunks
		Wait
	Raise:
		Stop
	}
}

Actor AcolytePainBlur
{
	+NOBLOCKMAP
	+NOGRAVITY
	RenderStyle Translucent
	Alpha 0.6
	States
	{
	Spawn:
		ACOL C 8
		Stop
	}
}

Actor AcolyteBlur
{
	+NOBLOCKMAP
	+NOGRAVITY
	RenderStyle Translucent
	Alpha 0.6
	States
	{
	Spawn:
		ACOL A 16
		ACOL A 8 A_SetTranslucent(0.4)
		Stop
	}
}

Actor AcolyteFX
{
	Radius 10
	Height 6
	Speed 10
	Projectile
	+SEEKERMISSILE
	+FOILINVUL
	+PAINLESS
	+HITMASTER
	+DONTREFLECT
	RenderStyle Add
	DeathSound "BishopMissileExplode"
	States
	{
	Spawn:
		CFX1 AB 1 Bright A_BishopMissileWeave
		TNT1 A 0 A_SeekerMissile(90,90,SMF_PRECISE)
		CFX1 AB 1 Bright A_BishopMissileWeave
		TNT1 A 0 A_SeekerMissile(90,90,SMF_PRECISE)
		loop
	Death:
		CFX1 C 0 ACS_NamedExecuteAlways("WOC HEALING", 0, ACS_NamedExecuteWithResult("WOC Monster Damage Scale",WOCTARGET,25), AAPTR_MASTER, 1)
		CFX1 CDEF 4 Bright
		CFX1 GH 3 Bright
		stop
	}
}

Actor AcolyteRadiusHeal : WoC_MonActivator
{
	States
	{
	Use:
		TNT1 A 0 ACS_NamedExecuteAlways("WOC HEALING", 0, ACS_NamedExecuteWithResult("WOC Monster Damage Scale",ACTIVATOR,FRandom(25,40)), 0, 1)
		Stop
	}
}

ACTOR Vampire : NewBishop
{
	Health 200
	SeeSound "vampire/see"
	DeathSound "vampire/death"
	PainSound "vampire/pain"
	Dropitem "ArtiRedFlask" 32
	Dropitem "ArtiBlackFlask" 8
	DropItem "Money" 64
	DropItem "Money" 64
	DropItem "Money" 64
	DropItem "Money" 64
	DropItem "Money1" 64
	DropItem "Money1" 8
	DropItem "Money2" 4
	DropItem "Money3" 2
	DropItem "ChestKey" 2
	Species "Bishop"
	Obituary "A Vampire drained all of %o's life."
	Tag "Vampire"
	Bloodtype "Blood"
	DamageFactor "Ice", 0.75
	DamageFactor "IcePlayer", 0.75
	DamageFactor "IceTime", 0.75
	DamageFactor "Shadow", 0.5
	DamageFactor "ShadowPlayer", 0.5
	DamageFactor "ShadowTime", 0.5
	DamageFactor "Holy", 2.0
	DamageFactor "HolyPlayer", 2.0
	DamageFactor "HolyTime", 2.0
	DamageFactor "Poison", 1.25
	DamageFactor "PoisonPlayer", 1.25
	DamageFactor "PoisonTime", 1.25
	States
	{
	Spawn:
		VAM1 A 0
		VAM1 A 0 ACS_NamedExecuteAlways("WOC Monster Init",0,65,0)//increase health on higher difficulties
        Goto Idle
	Idle:
		VAM1 AB 10 A_Look
		Loop
	See:
		VAM1 A 2 A_Chase
		VAM1 A 0 A_JumpIfTargetInLOS(2)
		VAM1 A 0 A_Jump(256,2)
		VAM1 A 0 A_BishopDecide
		VAM1 A 2 A_BishopChase
		VAM1 A 0 A_JumpIfTargetInLOS(2)
		VAM1 A 0 A_Jump(256,2)
		VAM1 A 0 A_BishopDecide
		VAM1 A 2
		VAM1 A 0 A_JumpIfTargetInLOS(2)
		VAM1 A 0 A_Jump(256,2)
		VAM1 B 0 A_BishopDecide
		VAM1 B 2 A_BishopChase
		VAM1 B 0 A_JumpIfTargetInLOS(2)
		VAM1 B 0 A_Jump(256,2)
		VAM1 B 0 A_BishopDecide
		VAM1 B 2 A_Chase
		VAM1 B 0 A_JumpIfTargetInLOS(2)
		VAM1 B 0 A_Jump(256,2)
		VAM1 B 0 A_BishopDecide
		VAM1 B 2 A_BishopChase
		VAM1 B 0 A_JumpIfTargetInLOS(2)
		VAM1 B 0 A_Jump(256,2)
		VAM1 B 0 A_BishopDecide
		VAM1 B 0
		Loop
	Blur:
		VAM1 A 0 A_FaceTarget
		VAM1 A 2 A_BishopDoBlur
		VAM1 AAA 4 A_SpawnItem("VampireBlur")
		TNT1 A 0 A_Jump(256,1,2,3)
		VAM1 AA 4 A_SpawnItem("VampireBlur")
		TNT1 A 0 Thing_Stop(0)
		TNT1 A 0 A_SpawnItem("VampireBlur")
		TNT1 A 0 A_Jump(97,"Missile")
		Goto See
	Missile:
		TNT1 A 0 A_JumpIfCloser(64,1)
		Goto Missile+5
		VAM1 ADE 3 Bright A_FaceTarget
		VAM1 F 3 Bright A_BishopAttack
		Goto See
		VAM1 X 1 Bright A_Jump(96,26)
		VAM1 X 8 Bright A_FaceTarget
		TNT1 AAAAAAAAAAAAAA 0 A_SpawnItemEx("VampCloudSpawner", 0, 0, 30, 0, 0, 0, 0, 128)
		TNT1 AAAAAAAAA 0 A_CustomMissile("BatAttack",Random(8,64),Random(-32,32),Random(20,-20),1)
		VAM1 Y 8 Bright A_CustomMissile("BatAttack",Random(8,64),Random(-32,32),Random(20,-20),1)
		Goto See
		VAM1 E 8 Bright A_FaceTarget
		TNT1 AAAAAAAAAAAAAA 0 A_SpawnDebris("NashGore_FlyingBlood",1)
		VAM1 F 0 Bright A_FaceTarget
		VAM1 FFFFFFFF 1 Bright A_CustomMissile("VampireRoundBeam",32,0,0,1)
		VAM1 F 0 Bright A_FaceTarget
		VAM1 FFFFFFFF 1 Bright A_CustomMissile("VampireRoundBeam",32,0,0,1)
		VAM1 F 0 Bright A_FaceTarget
		VAM1 FFFFFFFF 1 Bright A_CustomMissile("VampireRoundBeam",32,0,0,1)
		VAM1 F 0 Bright A_FaceTarget
		VAM1 FFFFFFFF 1 Bright A_CustomMissile("VampireRoundBeam",32,0,0,1)
		VAM1 F 0 Bright A_FaceTarget
		VAM1 FFFFFFFF 1 Bright A_CustomMissile("VampireRoundBeam",32,0,0,1)
		VAM1 F 0 Bright A_FaceTarget
		VAM1 FFFFFFFF 1 Bright A_CustomMissile("VampireRoundBeam",32,0,0,1)
		VAM1 F 0 Bright A_FaceTarget
		VAM1 FFFFFFFF 1 Bright A_CustomMissile("VampireRoundBeam",32,0,0,1)
		Goto See
	Pain:
		VAM1 C 6 A_Pain
		TNT1 A 0 A_Jump(64,"Blur")
		VAM1 C 6 A_SpawnItemEx("VampirePainBlur",Random(-10,10),Random(-10,10),Random(-10,10))
		TNT1 A 0 A_Jump(64,"Blur")
		VAM1 C 6 A_SpawnItemEx("VampirePainBlur",Random(-10,10),Random(-10,10),Random(-10,10))
		TNT1 A 0 A_Jump(64,"Blur")
		VAM1 C 6 A_SpawnItemEX("VampirePainBlur",Random(-10,10),Random(-10,10),Random(-10,10))
		Goto See
	Death:
		VAM1 G 8 A_Scream
		VAM1 H 5 Bright
		VAM1 I 5 Bright A_NoBlocking
		TNT1 AAAAAAAAAAAAAA 0 A_SpawnItemEx("VampCloudSpawner", 0, 0, 30, 0, 0, 0, 0, 128)
		TNT1 A 0 A_Jump(128,3)
		TNT1 A 0 A_SpawnItemEx("BatAttack", 0, 0, 30, random(-8, 8), random(-8, 8),1)
		TNT1 A 0 A_Jump(256,2)
		TNT1 A 0 A_SpawnItemEx("BatAttack", 0, 0, 30, random(-8, 8), random(-8, 8),-1)
		TNT1 A 0 A_Jump(128,3)
		TNT1 A 0 A_SpawnItemEx("BatAttack", 0, 0, 30, random(-8, 8), random(-8, 8),1)
		TNT1 A 0 A_Jump(256,2)
		TNT1 A 0 A_SpawnItemEx("BatAttack", 0, 0, 30, random(-8, 8), random(-8, 8),-1)
		TNT1 A 0 A_Jump(128,3)
		TNT1 A 0 A_SpawnItemEx("BatAttack", 0, 0, 30, random(-8, 8), random(-8, 8),1)
		TNT1 A 0 A_Jump(256,2)
		TNT1 A 0 A_SpawnItemEx("BatAttack", 0, 0, 30, random(-8, 8), random(-8, 8),-1)
		TNT1 A 0 A_Jump(128,3)
		TNT1 A 0 A_SpawnItemEx("BatAttack", 0, 0, 30, random(-8, 8), random(-8, 8),1)
		TNT1 A 0 A_Jump(256,2)
		TNT1 A 0 A_SpawnItemEx("BatAttack", 0, 0, 30, random(-8, 8), random(-8, 8),-1)
		TNT1 A 0 A_Jump(128,3)
		TNT1 A 0 A_SpawnItemEx("BatAttack", 0, 0, 30, random(-8, 8), random(-8, 8),1)
		TNT1 A 0 A_Jump(256,2)
		TNT1 A 0 A_SpawnItemEx("BatAttack", 0, 0, 30, random(-8, 8), random(-8, 8),-1)
		TNT1 A 0 A_Jump(128,3)
		TNT1 A 0 A_SpawnItemEx("BatAttack", 0, 0, 30, random(-8, 8), random(-8, 8),1)
		TNT1 A 0 A_Jump(256,2)
		TNT1 A 0 A_SpawnItemEx("BatAttack", 0, 0, 30, random(-8, 8), random(-8, 8),-1)
		TNT1 A 0 A_Jump(128,3)
		TNT1 A 0 A_SpawnItemEx("BatAttack", 0, 0, 30, random(-8, 8), random(-8, 8),1)
		TNT1 A 0 A_Jump(256,2)
		TNT1 A 0 A_SpawnItemEx("BatAttack", 0, 0, 30, random(-8, 8), random(-8, 8),-1)
		TNT1 A 0 A_Jump(128,3)
		TNT1 A 0 A_SpawnItemEx("BatAttack", 0, 0, 30, random(-8, 8), random(-8, 8),1)
		TNT1 A 0 A_Jump(256,2)
		TNT1 A 0 A_SpawnItemEx("BatAttack", 0, 0, 30, random(-8, 8), random(-8, 8),-1)
		TNT1 A 0 A_Jump(128,3)
		TNT1 A 0 A_SpawnItemEx("BatAttack", 0, 0, 30, random(-8, 8), random(-8, 8),1)
		TNT1 A 0 A_Jump(256,2)
		TNT1 A 0 A_SpawnItemEx("BatAttack", 0, 0, 30, random(-8, 8), random(-8, 8),-1)
		TNT1 A 0 A_Jump(128,3)
		TNT1 A 0 A_SpawnItemEx("BatAttack", 0, 0, 30, random(-8, 8), random(-8, 8),1)
		TNT1 A 0 A_Jump(256,2)
		TNT1 A 0 A_SpawnItemEx("BatAttack", 0, 0, 30, random(-8, 8), random(-8, 8),-1)
		VAM1 J 5 Bright
		VAM1 KLM 5 Bright
		VAM1 N 5
		VAM1 O 5
		VAM1 P -1 //A_BossDeath
		Stop
	Ice:
		"----" C 5 A_GenericFreezeDeath
		"----" C 1 A_FreezeDeathChunks
		Wait
	Raise:
		VAM1 O 0 ACS_NamedExecuteAlways("WOC Monster Init",0,65,0)
		VAM1 ON 5 
		VAM1 MLKJIH 5 Bright
		VAM1 G 5
		goto See
	}
}

Actor VampirePainBlur
{
  +NOBLOCKMAP
  +NOGRAVITY
  +CLIENTSIDEONLY +DONTBLAST
  RenderStyle Translucent
  Alpha 0.6
  States
  {
  Spawn:
    VAM1 C 8
    Stop
  }
}

Actor VampireBlur
{
  +NOBLOCKMAP
  +NOGRAVITY
  +CLIENTSIDEONLY +DONTBLAST
  RenderStyle Translucent
  Alpha 0.6
  States
  {
  Spawn:
    VAM1 A 16
    VAM1 A 8 A_SetTranslucent(0.4)
    Stop
  }
}


ACTOR VampireRoundBeam
{
	Radius 2
	Height 4
	Speed 10
	FastSpeed 15
	Damage (ACS_NamedExecuteWithResult("WOC Monster Damage Scale",WOCTARGET,FRandom(1,4)))
	Damagetype "Shadow"
	/*+NODAMAGETHRUST*/
	Scale 0.50
	PROJECTILE
	+FLOATBOB
	Renderstyle Add
	+SeekerMissile
	+HITMASTER
	States
	{
	Spawn:
		VAM2 A 0
		VAM2 A 0 Bright A_PlaySound("vampire/beam")
		VAM2 A 1 Bright A_CStaffMissileSlither
		VAM2 A 0 Bright A_SpawnItemEx("VampireRoundBeamTrail", 0, 0, 0, 0, 0, 0, 0, 128)
		VAM2 A 1 Bright A_CStaffMissileSlither
		VAM2 A 0 Bright A_SpawnItemEx("VampireRoundBeamTrail", 0, 0, 0, 0, 0, 0, 0, 128)
		VAM2 A 1 Bright A_CStaffMissileSlither
		VAM2 A 0 Bright A_SpawnItemEx("VampireRoundBeamTrail", 0, 0, 0, 0, 0, 0, 0, 128)
		VAM2 A 1 Bright A_CStaffMissileSlither
		VAM2 A 0 Bright A_SpawnItemEx("VampireRoundBeamTrail", 0, 0, 0, 0, 0, 0, 0, 128)
		VAM2 A 0 Bright A_SeekerMissile(5,5,SMF_PRECISE)
		loop
	Death:
		VAM2 C 0 A_JumpIfInventory("Level",1,"SelfHeal",AAPTR_MASTER)
		VAM2 CDEFGH 3 Bright
		stop
	SelfHeal:
		VAM2 C 0 ACS_NamedExecuteAlways("WOC HEALING", 0, ACS_NamedExecuteWithResult("WOC Monster Damage Scale",WOCTARGET,4), AAPTR_TARGET, 1)
		VAM2 CDEFGH 3 Bright
		stop
	}
}

ACTOR VampireRoundBeamTrail
{
   Radius 2
   Height 4
   RENDERSTYLE ADD
   ALPHA 0.67
   Scale 0.50
   PROJECTILE
   +CLIENTSIDEONLY +DONTBLAST
   +FLOATBOB
   +NOINTERACTION
   +DONTSPLASH
   SeeSound "monster/acosht"
   DeathSound "monster/acohit"
   States
   {
   Spawn:
	  VAM2 A 1 Bright A_FadeOut(0.05)
      Loop
   }
}


actor VampireBloodBoom
{
 game Doom
 scale 0.75
 health 1
 radius 8
 height 1
 mass 1
 +CORPSE
 +CLIENTSIDEONLY +DONTBLAST
 +NOTELEPORT
 +NOBLOCKMAP
 states
 {
 Spawn:
  TNT1 A 0
  VAB1 A 1 A_SpawnItemEx("VampireBloodTrail",0,0,0,1,0,0,0,128)
  VAB1 A 1
  VAB1 A 1 A_SpawnItemEx("VampireBloodTrail",0,0,0,1,0,0,0,128)
  VAB1 A 1
  VAB1 B 1 A_SpawnItemEx("VampireBloodTrail",0,0,0,1,0,0,0,128)
  VAB1 B 1
  VAB1 B 1 A_SpawnItemEx("VampireBloodTrail",0,0,0,1,0,0,0,128)
  VAB1 B 1
  VAB1 C 1 A_SpawnItemEx("VampireBloodTrail",0,0,0,1,0,0,0,128)
  VAB1 C 1
  VAB1 C 1 A_SpawnItemEx("VampireBloodTrail",0,0,0,1,0,0,0,128)
  VAB1 C 1
  VAB1 D 1 A_SpawnItemEx("VampireBloodTrail",0,0,0,1,0,0,0,128)
  VAB1 D 1
  VAB1 D 1 A_SpawnItemEx("VampireBloodTrail",0,0,0,1,0,0,0,128)
  VAB1 D 1
  loop
 Crash:
  TNT1 A 1 A_SpawnItemEx("VampireBloodSpot",0,0,0,1,0,0,0,128)
  stop
 }
}

actor VampireBloodSpot
{
 game Doom
 radius 12
 height 2
 mass 1
 +NOTELEPORT
 -NOBLOCKMAP
 +CLIENTSIDEONLY +DONTBLAST
 states
 {
 Spawn:
  TNT1 A 0
  TNT1 A 0 A_PlaySound("vampireblood")
  TNT1 A 0 A_Jump(64,4)
  TNT1 A 0 A_Jump(128,4)
  TNT1 A 0 A_Jump(192,4)
  TNT1 A 0 A_Jump(255,4)
  VAB3 A 750
  stop
  VAB3 B 750
  stop
  VAB3 C 750
  stop
  VAB3 D 750
  stop
 }
}

actor VampireBloodTrail
{
	game Doom
	scale 0.70
	mass 1
	+LOWGRAVITY
	+NOTELEPORT
	+NOBLOCKMAP
	+CLIENTSIDEONLY +DONTBLAST
	states
	{
	Spawn:
		VAB2 A 4
		VAB2 B 4
		VAB2 C 4
		VAB2 D 4
		stop
	}
}

ACTOR BatAttack
{
	Radius 8
	Height 16
	Speed 12
	Damage (ACS_NamedExecuteWithResult("WOC Monster Damage Scale",WOCTARGET,FRandom(1,8)))
	Damagetype "Shadow"
	/*+NODAMAGETHRUST*/
	PROJECTILE
	+Randomize
	+NoGravity
	//+Float
	seesound "vampire/bats"
	states
	{
	Spawn:
		VAM4 ABCABCABCABC 3 BRIGHT A_SpawnItemEx("BatTrail")
		VAM4 ABCABCABCABC 3 BRIGHT A_SpawnItemEx("BatTrail")
		VAM4 ABCABCABCABC 3 BRIGHT A_SpawnItemEx("BatTrail")
		VAM4 ABCABCABCABC 3 BRIGHT A_SpawnItemEx("BatTrail")
		VAM4 ABCABCABCABC 3 BRIGHT A_SpawnItemEx("BatTrail")
		Goto death
	Death:
		TNT1 A 0 A_SpawnItemEx("BatCloudSpawner", 0, 0, 30, 0, 0, 0, 0, 128)
		VAM4 A 2 A_SetTranslucent(0.9)
		TNT1 A 0 A_SpawnItemEx("BatCloudSpawner", 0, 0, 30, 0, 0, 0, 0, 128)
		VAM4 B 2 A_SetTranslucent(0.8)
		TNT1 A 0 A_SpawnItemEx("BatCloudSpawner", 0, 0, 30, 0, 0, 0, 0, 128)
		VAM4 C 2 A_SetTranslucent(0.7)
		TNT1 A 0 A_SpawnItemEx("BatCloudSpawner", 0, 0, 30, 0, 0, 0, 0, 128)
		VAM4 A 2 A_SetTranslucent(0.6)
		TNT1 A 0 A_SpawnItemEx("BatCloudSpawner", 0, 0, 30, 0, 0, 0, 0, 128)
		VAM4 B 2 A_SetTranslucent(0.5)
		TNT1 A 0 A_SpawnItemEx("BatCloudSpawner", 0, 0, 30, 0, 0, 0, 0, 128)
		VAM4 C 2 A_SetTranslucent(0.4)
		TNT1 A 0 A_SpawnItemEx("BatCloudSpawner", 0, 0, 30, 0, 0, 0, 0, 128)
		VAM4 A 2 A_SetTranslucent(0.3)
		TNT1 A 0 A_SpawnItemEx("BatCloudSpawner", 0, 0, 30, 0, 0, 0, 0, 128)
		VAM4 B 2 A_SetTranslucent(0.2)
		TNT1 A 0 A_SpawnItemEx("BatCloudSpawner", 0, 0, 30, 0, 0, 0, 0, 128)
		VAM4 C 2 A_SetTranslucent(0.1)
		TNT1 A 0 A_SpawnItemEx("BatCloudSpawner", 0, 0, 30, 0, 0, 0, 0, 128)
		Stop
	}
}

ACTOR BatTrail
{
  Radius 8
  Height 16
  RenderStyle Add
  Alpha 0.8
  Scale 0.3
  PROJECTILE
  +Randomize
  +CLIENTSIDEONLY +DONTBLAST
  +NoGravity
  +Float
  states
  {
  Spawn:
    VAM5 ABCDEFGHI 3 BRIGHT
    Goto death
  Death:
	VAM5 I 1
    Stop
  }
}

Actor VampCloudSpawner
{
  radius 0
  height 0
  +NOGRAVITY
  +NOBLOCKMAP
  +NOLIFTDROP
  +NOTARGET
  +DONTSQUASH
  +NOTELEOTHER
  +NONSHOOTABLE
  +CLIENTSIDEONLY +DONTBLAST
  States
  {
  Spawn:
    TNT1 A 0
    TNT1 A 1 A_SpawnItemEx("VampCloud", 0, 0, 0, random(-2, 2), random(-2, 2), random(-1, 1))
    Stop
  }
}

Actor VampCloud
{
  renderstyle translucent
  alpha 0.9
  Scale 0.5
  radius 0
  height 0
  +NOGRAVITY
  +NOBLOCKMAP
  +NOLIFTDROP
  +NOTARGET
  +DONTSQUASH
  +NOTELEOTHER
  +NONSHOOTABLE
  +CLIENTSIDEONLY +DONTBLAST
  States
  {
  Spawn:
    VAM6 A 0
    VAM6 A 0 A_Jump(128, 6)
    VAM6 ABCDE 3 A_FadeOut(0.05)
    Goto Spawn+1
    VAM6 F 0 A_Jump(128, 6)
    VAM6 FGHIJ 3 A_FadeOut(0.05)
    Goto Spawn+7
    VAM6 KLMNO 3 A_FadeOut(0.05)
    Goto Spawn+12
  }
}

Actor BatCloudSpawner
{
  radius 0
  height 0
  +NOGRAVITY
  +NOBLOCKMAP
  +NOLIFTDROP
  +NOTARGET
  +DONTSQUASH
  +NOTELEOTHER
  +NONSHOOTABLE
  +CLIENTSIDEONLY +DONTBLAST
  States
  {
  Spawn:
    TNT1 A 0
    TNT1 A 1 A_SpawnItemEx("BatCloud", 0, 0, 0, random(-2, 2), random(-2, 2), random(-1, 1))
    Stop
  }
}

Actor BatCloud
{
  renderstyle translucent
  alpha 0.9
  Scale 0.2
  radius 0
  height 0
  +NOGRAVITY
  +NOBLOCKMAP
  +NOLIFTDROP
  +NOTARGET
  +DONTSQUASH
  +NOTELEOTHER
  +CLIENTSIDEONLY +DONTBLAST
  +NONSHOOTABLE
  States
  {
  Spawn:
    VAM6 A 0
    VAM6 A 0 A_Jump(128, 6)
    VAM6 ABCDE 3 A_FadeOut(0.10)
    Goto Spawn+1
    VAM6 F 0 A_Jump(128, 6)
    VAM6 FGHIJ 3 A_FadeOut(0.10)
    Goto Spawn+7
    VAM6 KLMNO 3 A_FadeOut(0.10)
    Goto Spawn+12
  }
}

ACTOR BatAttackSafe
{
  Radius 8
  Height 16
  Speed 15
  Damage 0
  PROJECTILE
  +Randomize
  +NoGravity
  +Float
  seesound "vampire/bats"
  states
  {
  Spawn:
    VAM4 ABCABCABCABC 3 BRIGHT A_SpawnItemEx("BatTrail")
	VAM4 ABCABCABCABC 3 BRIGHT A_SpawnItemEx("BatTrail")
	VAM4 ABCABCABCABC 3 BRIGHT A_SpawnItemEx("BatTrail")
	VAM4 ABCABCABCABC 3 BRIGHT A_SpawnItemEx("BatTrail")
	VAM4 ABCABCABCABC 3 BRIGHT A_SpawnItemEx("BatTrail")
    Goto death
  Death:
    TNT1 A 0 A_SpawnItemEx("BatCloudSpawner", 0, 0, 30, 0, 0, 0, 0, 128)
    VAM4 A 2 A_SetTranslucent(0.9)
	TNT1 A 0 A_SpawnItemEx("BatCloudSpawner", 0, 0, 30, 0, 0, 0, 0, 128)
	VAM4 B 2 A_SetTranslucent(0.8)
	TNT1 A 0 A_SpawnItemEx("BatCloudSpawner", 0, 0, 30, 0, 0, 0, 0, 128)
	VAM4 C 2 A_SetTranslucent(0.7)
	TNT1 A 0 A_SpawnItemEx("BatCloudSpawner", 0, 0, 30, 0, 0, 0, 0, 128)
	VAM4 A 2 A_SetTranslucent(0.6)
	TNT1 A 0 A_SpawnItemEx("BatCloudSpawner", 0, 0, 30, 0, 0, 0, 0, 128)
	VAM4 B 2 A_SetTranslucent(0.5)
	TNT1 A 0 A_SpawnItemEx("BatCloudSpawner", 0, 0, 30, 0, 0, 0, 0, 128)
	VAM4 C 2 A_SetTranslucent(0.4)
	TNT1 A 0 A_SpawnItemEx("BatCloudSpawner", 0, 0, 30, 0, 0, 0, 0, 128)
	VAM4 A 2 A_SetTranslucent(0.3)
	TNT1 A 0 A_SpawnItemEx("BatCloudSpawner", 0, 0, 30, 0, 0, 0, 0, 128)
	VAM4 B 2 A_SetTranslucent(0.2)
	TNT1 A 0 A_SpawnItemEx("BatCloudSpawner", 0, 0, 30, 0, 0, 0, 0, 128)
	VAM4 C 2 A_SetTranslucent(0.1)
	TNT1 A 0 A_SpawnItemEx("BatCloudSpawner", 0, 0, 30, 0, 0, 0, 0, 128)
    Stop
  }
}

Actor Disciple : NewBishop
{
	Health 225
	Species "Bishop"
	Dropitem "ArtiOrangeFlask" 32
	Dropitem "ArtiPurpleFlask" 8
	DropItem "Money" 64
	DropItem "Money" 64
	DropItem "Money" 64
	DropItem "Money" 64
	DropItem "Money1" 64
	DropItem "Money1" 8
	DropItem "Money2" 4
	DropItem "Money3" 2
	DropItem "ChestKey" 2
	Obituary"%o succumbed to a Disciple's dark power."
	Bloodtype "EtherealBloodPurple"
	Tag "Dark Disciple"
	DamageFactor "Holy", 1.0
	DamageFactor "HolyPlayer", 1.0
	DamageFactor "HolyTime", 1.0
	DamageFactor "Shadow", 1.0
	DamageFactor "ShadowPlayer", 1.0
	DamageFactor "ShadowTime", 1.0
	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:
		HDIS A 0
		HDIS A 0 ACS_NamedExecuteAlways("WOC Monster Init",0,65,0)//increase health on higher difficulties
	Idle:
		HDIS A 10 A_Look
        Loop
	See:
        HDIS A 0 A_ChangeFlag("GHOST",0)
	    HDIS A 0 A_SetTranslucent(1,0)
        HDIS A 2 A_Chase
		HDIS A 0 A_JumpIfTargetInLOS(2)
		HDIS A 0 A_Jump(256,2)
		HDIS A 0 A_BishopDecide
		HDIS A 2 A_BishopChase
		HDIS A 0 A_JumpIfTargetInLOS(2)
		HDIS A 0 A_Jump(256,2)
		HDIS A 0 A_BishopDecide
		HDIS A 2
		HDIS A 0 A_JumpIfTargetInLOS(2)
		HDIS A 0 A_Jump(256,2)
		HDIS B 0 A_BishopDecide
		HDIS B 2 A_BishopChase
		HDIS B 0 A_JumpIfTargetInLOS(2)
		HDIS B 0 A_Jump(256,2)
		HDIS B 0 A_BishopDecide
		HDIS B 2 A_Chase
		HDIS B 0 A_JumpIfTargetInLOS(2)
		HDIS B 0 A_Jump(256,2)
		HDIS B 0 A_BishopDecide
		HDIS B 2 A_BishopChase
		HDIS B 0 A_JumpIfTargetInLOS(2)
		HDIS B 0 A_Jump(256,2)
		HDIS B 0 A_BishopDecide
		HDIS B 0
		Loop
	Blur:
		HDIS A 0 A_FaceTarget
		HDIS A 0 A_ChangeFlag("GHOST",1)
		HDIS A 0 A_SetTranslucent(0.8,0)
		HDIS A 2 A_BishopDoBlur
		HDIS AAA 4 A_SpawnItem("DiscipleBlur")
		TNT1 A 0 A_Jump(256,1,2,3)
		HDIS AA 4 A_SpawnItem("DiscipleBlur")
		HDIS A 0 A_ChangeFlag("GHOST",0)
		HDIS A 0 A_SetTranslucent(1,0)
		TNT1 A 0 Thing_Stop(0)
		TNT1 A 0 A_SpawnItem("DiscipleBlur")
		TNT1 A 0 A_Jump(97,"Missile")
		Goto See
	Missile:
		HDIS A 3 A_FaceTarget
		HDIS DE 3 A_FaceTarget
		TNT1 A 0 A_JumpIfCloser(64,1)
		Goto Missile+5
		HDIS F 3 A_BishopAttack
		Goto See
		HDIS F 3 A_PlaySound("BishopAttack")
		TNT1 A 0 A_Jump(256,1,5,9,13)
		HDIS F 0 A_FaceTarget
		TNT1 A 0 A_CustomMissile("DiscipleSpreadFX",32,0,-60,1)
		TNT1 A 0 A_CustomMissile("DiscipleSpreadFX",32,0,60,1)
		HDIS F 5 A_CustomMissile("DiscipleFX",32)
		HDIS F 0 A_FaceTarget
		TNT1 A 0 A_CustomMissile("DiscipleSpreadFX",32,0,-60,1)
		TNT1 A 0 A_CustomMissile("DiscipleSpreadFX",32,0,60,1)
		HDIS F 5 A_CustomMissile("DiscipleFX",32)
		HDIS F 0 A_FaceTarget
		TNT1 A 0 A_CustomMissile("DiscipleSpreadFX",32,0,-60,1)
		TNT1 A 0 A_CustomMissile("DiscipleSpreadFX",32,0,60,1)
		HDIS F 5 A_CustomMissile("DiscipleFX",32)
		HDIS F 0 A_FaceTarget
		TNT1 A 0 A_CustomMissile("DiscipleSpreadFX",32,0,-60,1)
		TNT1 A 0 A_CustomMissile("DiscipleSpreadFX",32,0,60,1)
		HDIS F 5 A_CustomMissile("DiscipleFX",32)
		HDIS F 0 A_FaceTarget
		TNT1 A 0 A_CustomMissile("DiscipleSpreadFX",32,0,-60,1)
		TNT1 A 0 A_CustomMissile("DiscipleSpreadFX",32,0,60,1)
		HDIS F 5 A_CustomMissile("DiscipleFX",32)
		HDIS F 0 A_FaceTarget
		TNT1 A 0 A_CustomMissile("DiscipleSpreadFX",32,0,-60,1)
		TNT1 A 0 A_CustomMissile("DiscipleSpreadFX",32,0,60,1)
		HDIS F 5 A_CustomMissile("DiscipleFX",32)
		HDIS F 0 A_FaceTarget
		TNT1 A 0 A_CustomMissile("DiscipleSpreadFX",32,0,-60,1)
		TNT1 A 0 A_CustomMissile("DiscipleSpreadFX",32,0,60,1)
		HDIS F 5 A_CustomMissile("DiscipleFX",32)
		HDIS F 0 A_FaceTarget
		TNT1 A 0 A_CustomMissile("DiscipleSpreadFX",32,0,-60,1)
		TNT1 A 0 A_CustomMissile("DiscipleSpreadFX",32,0,60,1)
		HDIS F 5 A_CustomMissile("DiscipleFX",32)
		Goto See
	Pain:
		HDIS A 0 A_ChangeFlag("GHOST",0)
		HDIS A 0 A_SetTranslucent(1,0)
		HDIS C 6 A_Pain
		TNT1 A 0 A_Jump(64,"Blur")
		HDIS C 6 A_SpawnItemEx("DisciplePainBlur",Random(-10,10),Random(-10,10),Random(-10,10))
		TNT1 A 0 A_Jump(64,"Blur")
		HDIS C 6 A_SpawnItemEx("DisciplePainBlur",Random(-10,10),Random(-10,10),Random(-10,10))
		TNT1 A 0 A_Jump(64,"Blur")
		HDIS C 6 A_SpawnItemEX("DisciplePainBlur",Random(-10,10),Random(-10,10),Random(-10,10))
		Goto See
	Death:
		HDIS A 0 A_ChangeFlag("GHOST",0)
		HDIS A 0 A_SetTranslucent(1,0)
		HDIS G 6
		HDIS H 6 Bright A_Scream
		HDIS I 5 Bright A_NoBlocking
		HDIS J 5 Bright A_SpawnItemEx("DiscipleExplode")
		HDIS K 5 Bright
		HDIS LM 4 Bright
		HDIS N 4 A_SpawnItemEx("BishopPuff", 0,0,40, 0,0,0.5)
		HDIS O 4 A_QueueCorpse
		HDIS P -1 //A_BossDeath
		Stop
	Ice:
		"----" C 5 A_GenericFreezeDeath
		"----" C 1 A_FreezeDeathChunks
		Wait
	Raise:
		HDIS O 0 ACS_NamedExecuteAlways("WOC Monster Init",0,56,0)
		HDIS ON 5 
		HDIS MLKJIH 5 Bright
		HDIS G 5
		goto See
	}
}

Actor DiscipleExplode : BishopExplode
{
	Damagetype "Arcane"
}

Actor DisciplePainBlur
{
  +NOBLOCKMAP
  +NOGRAVITY
  RenderStyle Translucent
  Alpha 0.6
  States
  {
  Spawn:
    HDIS C 8
    Stop
  }
}

Actor DiscipleBlur
{
  +NOBLOCKMAP
  +NOGRAVITY
  RenderStyle Translucent
  Alpha 0.6
  States
  {
  Spawn:
    HDIS A 16
    HDIS A 8 A_SetTranslucent(0.4)
    Stop
  }
}

Actor DiscipleFX
{
	Radius 10
	Height 6
	Speed 10
	FastSpeed 15
	Damage (ACS_NamedExecuteWithResult("WOC Monster Damage Scale",WOCTARGET,FRandom(1,4)))
	Projectile
	/*+NODAMAGETHRUST*/
	+SEEKERMISSILE
	-ACTIVATEIMPACT
	-ACTIVATEPCROSS
	RenderStyle Add
	DeathSound "BishopMissileExplode"
	Damagetype "Arcane"
	States
	{
	Spawn:
		HDFX ABAB 1 Bright A_BishopMissileWeave
		TNT1 A 0 A_SeekerMissile(2,3,SMF_PRECISE)
		loop
	Death:
		HDFX CDEF 4 Bright
		HDFX GH 3 Bright
		stop
	}
}

Actor DiscipleSpreadFX : DiscipleFX
{
   States
   {
   Spawn:
      HDFX A 1 Bright A_BishopMissileWeave
	  TNT1 A 0 A_SeekerMissile(2,9,SMF_PRECISE)
	  HDFX B 1 Bright A_BishopMissileWeave
      TNT1 A 0 A_SeekerMissile(2,9,SMF_PRECISE)
	  HDFX A 1 Bright A_BishopMissileWeave
	  TNT1 A 0 A_SeekerMissile(2,9,SMF_PRECISE)
	  HDFX B 1 Bright A_BishopMissileWeave
      TNT1 A 0 A_SeekerMissile(2,9,SMF_PRECISE)
	  HDFX A 1 Bright A_BishopMissileWeave
	  TNT1 A 0 A_SeekerMissile(2,9,SMF_PRECISE)
	  HDFX B 1 Bright A_BishopMissileWeave
      TNT1 A 0 A_SeekerMissile(2,9,SMF_PRECISE)
	  HDFX A 1 Bright A_BishopMissileWeave
	  TNT1 A 0 A_SeekerMissile(2,9,SMF_PRECISE)
	  HDFX B 1 Bright A_BishopMissileWeave
      TNT1 A 0 A_SeekerMissile(2,9,SMF_PRECISE)
      HDFX ABAB 1 Bright A_BishopMissileWeave
      TNT1 A 0 A_SeekerMissile(2,3,SMF_PRECISE)
      Goto Spawn+16
   Death:
      HDFX CDEF 4 Bright
	  HDFX GH 3 Bright
      stop
   }
}

Actor DarkPatriarch : NewBishop
{
	Health 1200
	PainChance 0
	+NOPAIN
	+DONTMORPH
	+NOFEAR
	+NEVERRESPAWN
	Obituary "%o was judged by the Dark Patriarch."
	DropItem "NewArtiSuperHealth" 64
	DropItem "AccessoryRandomSpawner"
	DropItem "NewArtiInvulnerability2" 64
	Dropitem "NewArtiDarkServant" 64
	Dropitem "NewArtiBoostMana" 64
	Dropitem "ForceCube" 64
	DropItem "Money3" 128
    DropItem "Money3" 128
    DropItem "Money3" 128
    DropItem "Money3" 128
    DropItem "Money3" 128
	DropItem "Money3" 128
	DropItem "Money3" 128
	DropItem "Money3" 128
	DropItem "ChestKey" 128
	Bloodtype "EtherealBloodWhite"
	Tag "Dark Patriarch"
	States
	{
	Spawn:
		DPTR A 0
		DPTR A 0 ACS_NamedExecuteAlways("WOC Monster Init",0,65,WOC_STATUSIMMUNE)
	Idle:
		DPTR A 10 A_Look
		Loop
	See:
		DPTR A 0 A_RadiusGive("PatriarchRadiusHeal", 512, RGF_MONSTERS, 1)
		DPTR A 2 A_Chase
		DPTR A 0 A_JumpIfTargetInLOS(2)
		DPTR A 0 A_Jump(256,2)
		DPTR A 0 A_BishopDecide
		DPTR A 2 A_BishopChase
		DPTR A 0 A_JumpIfTargetInLOS(2)
		DPTR A 0 A_Jump(256,2)
		DPTR A 0 A_BishopDecide
		DPTR A 2
		DPTR A 0 A_JumpIfTargetInLOS(2)
		DPTR A 0 A_Jump(256,2)
		DPTR B 0 A_BishopDecide
		DPTR B 2 A_BishopChase
		DPTR B 0 A_JumpIfTargetInLOS(2)
		DPTR B 0 A_Jump(256,2)
		DPTR B 0 A_BishopDecide
		DPTR B 2 A_Chase
		DPTR B 0 A_JumpIfTargetInLOS(2)
		DPTR B 0 A_Jump(256,2)
		DPTR B 0 A_BishopDecide
		DPTR B 2 A_BishopChase
		DPTR B 0 A_JumpIfTargetInLOS(2)
		DPTR B 0 A_Jump(256,2)
		DPTR B 0 A_BishopDecide
		DPTR B 0
		Loop
	Blur:
		DPTR A 0 A_FaceTarget
		DPTR A 2 A_BishopDoBlur
		DPTR A 0 A_UnsetShootable
		DPTR AAA 4 A_SpawnItemEx("PatriarchBlur")
		DPTR A 0 A_Jump(256,1,2,3)
		DPTR AA 4 A_SpawnItemEx("PatriarchBlur")
		DPTR A 0 A_SetShootable
		DPTR A 0 Thing_Stop(0)
		DPTR A 0 A_SpawnItemEx("PatriarchBlur")
		Goto See
	Missile:
		DPTR A 3 A_FaceTarget
		DPTR DE 3 A_FaceTarget
		DPTR F 3 A_PlaySound("BishopAttack")
		TNT1 A 0 A_Jump(256,2,4,6,8)
		DPTR F 5 A_CustomMissile("PatriarchFX",32)
		DPTR F 0 A_FaceTarget
		DPTR F 5 A_CustomMissile("PatriarchFX",32)
		DPTR F 0 A_FaceTarget
		DPTR F 5 A_CustomMissile("PatriarchFX",32)
		DPTR F 0 A_FaceTarget
		DPTR F 5 A_CustomMissile("PatriarchFX",32)
		DPTR F 0 A_FaceTarget
		DPTR F 5 A_CustomMissile("PatriarchFX",32)
		DPTR F 0 A_FaceTarget
		DPTR F 5 A_CustomMissile("PatriarchFX",32)
		DPTR F 0 A_FaceTarget
		DPTR F 5 A_CustomMissile("PatriarchFX",32)
		DPTR F 0 A_FaceTarget
		DPTR F 5 A_CustomMissile("PatriarchFX",32)
		DPTR F 0 A_FaceTarget
		Goto See
	Death:
		DPTR G 6 A_KillChildren
		DPTR H 6 Bright A_Scream
		DPTR I 5 Bright A_NoBlocking
		DPTR J 5 Bright A_SpawnItemEx("PatriarchExplode")
		DPTR K 5 Bright
		DPTR LM 4 Bright
		DPTR N 4 A_SpawnItemEx("BishopPuff", 0,0,40, 0,0,0.5)
		DPTR O 4 A_QueueCorpse
		DPTR P -1 //A_BossDeath
		Stop
	Ice:
		"----" C 5 A_GenericFreezeDeath
		"----" C 1 A_FreezeDeathChunks
		Wait
	Raise:
		Stop
	}
}

Actor PatriarchRadiusHeal : Custominventory
{
	Inventory.MaxAmount 0
	+Inventory.AUTOACTIVATE
	states
	{
	Use:
		TNT1 A 0 ACS_NamedExecuteAlways("WOC HEALING", 0, ACS_NamedExecuteWithResult("WOC Monster Damage Scale",ACTIVATOR,FRandom(15,30)), 0, 1)
		Stop
	}
}

actor PatriarchExplode : BishopExplode
{
	States
	{
	Spawn:
		TNT1 A 0
		TNT1 A 1 A_Explode(ACS_NamedExecuteWithResult("WOC Monster Damage Scale",WOCTARGET,FRandom(50,80)),128)
		Stop
	}
}

Actor PatriarchPainBlur
{
  +NOBLOCKMAP
  +NOGRAVITY
  RenderStyle Translucent
  Alpha 0.6
  States
  {
  Spawn:
    DPTR C 8
    Stop
  }
}

Actor PatriarchBlur
{
  PROJECTILE
  +RIPPER
  +BLOODLESSIMPACT
  +NOCLIP
  +PAINLESS
  RenderStyle Translucent
  Alpha 0.6
  States
  {
  Spawn:
    DPTR A 16
    DPTR A 8 A_SetTranslucent(0.4)
	DPTR A 0 A_SpawnItemEx("DarkPatriarchClone", 0, 0, 0, 0, 0, 0, 0, SXF_SETMASTER, 250)
    Stop
  }
}

Actor DarkPatriarchClone : DarkPatriarch
{
	Health 100
	DropItem "None"
	Tag "Dark Patriarch Clone"
	+NOICEDEATH
	+DONTFALL
	+GHOST
	Renderstyle Translucent
	Alpha 0.6
	DamageFactor "Arcane", 1.5
	DamageFactor "ArcanePlayer", 1.5
	DamageFactor "ArcaneTime", 1.5
	DamageFactor "PoisonTime", 0
	DamageFactor "Bleed", 0
	States
	{
	Spawn:
		DPTR A 0
		DPTR A 0 ACS_NamedExecuteAlways("WOC Monster Init",0,65,WOC_STATUSIMMUNE|WOC_NOEXPERIENCE)
	Idle:
		DPTR A 10 A_Look
		Loop
	See:
		DPTR A 2 A_Chase
		DPTR A 0 A_JumpIfTargetInLOS(2)
		DPTR A 0 A_Jump(256,2)
		DPTR A 0 A_BishopDecide
		DPTR A 2 A_BishopChase
		DPTR A 0 A_JumpIfTargetInLOS(2)
		DPTR A 0 A_Jump(256,2)
		DPTR A 0 A_BishopDecide
		DPTR A 2
		DPTR A 0 A_JumpIfTargetInLOS(2)
		DPTR A 0 A_Jump(256,2)
		DPTR B 0 A_BishopDecide
		DPTR B 2 A_BishopChase
		DPTR B 0 A_JumpIfTargetInLOS(2)
		DPTR B 0 A_Jump(256,2)
		DPTR B 0 A_BishopDecide
		DPTR B 2 A_Chase
		DPTR B 0 A_JumpIfTargetInLOS(2)
		DPTR B 0 A_Jump(256,2)
		DPTR B 0 A_BishopDecide
		DPTR B 2 A_BishopChase
		DPTR B 0 A_JumpIfTargetInLOS(2)
		DPTR B 0 A_Jump(256,2)
		DPTR B 0 A_BishopDecide
		DPTR B 0
		Loop
	Blur:
		DPTR A 0 A_FaceTarget
		DPTR A 2 A_BishopDoBlur
		DPTR AAA 4 A_SpawnItem("PatriarchBlurClone")
		DPTR A 0 A_Jump(256,1,2,3)
		DPTR AA 4 A_SpawnItem("PatriarchBlurClone")
		DPTR A 0 Thing_Stop(0)
		DPTR A 0 A_SpawnItem("PatriarchBlurClone")
		Goto See
	Missile:
		DPTR A 3 A_FaceTarget
		DPTR DE 3 A_FaceTarget
		DPTR F 3 A_PlaySound("BishopAttack")
		DPTR F 0 A_FaceTarget
		DPTR F 5 A_CustomMissile("PatriarchFX",32)
		DPTR F 0 A_FaceTarget
		DPTR F 5 A_CustomMissile("PatriarchFX",32)
		DPTR F 0 A_FaceTarget
		DPTR F 5 A_CustomMissile("PatriarchFX",32)
		Goto See
	Death:
		"----" A 3 A_FadeOut(0.1)
		Wait
	}
}

Actor PatriarchBlurClone
{
  +NOBLOCKMAP
  +NOGRAVITY
  RenderStyle Translucent
  Alpha 0.4
  States
  {
  Spawn:
    DPTR A 16
    DPTR A 8 A_SetTranslucent(0.2)
    Stop
  }
}

Actor PatriarchFX
{
	Radius 10
	Height 6
	Speed 15
	Damagetype "Holy"
	Projectile
	+SEEKERMISSILE
	Damage (ACS_NamedExecuteWithResult("WOC Monster Damage Scale",WOCTARGET,FRandom(8,28)))
	RenderStyle Add
	SeeSound "PatriarchMissileFire"
	DeathSound "PatriarchMissileExplode"
	States
	{
	Spawn:
		PFX1 CCCC 1 Bright A_BishopMissileWeave
		PFX1 A 0 A_SeekerMissile(2,3,SMF_PRECISE)
		PFX1 DDDC 1 Bright A_BishopMissileWeave
		PFX1 A 0 A_SeekerMissile(2,3,SMF_PRECISE)
		PFX1 EEEE 1 Bright A_BishopMissileWeave
		PFX1 A 0 A_SeekerMissile(2,3,SMF_PRECISE)
		PFX1 FFFF 1 Bright A_BishopMissileWeave
		PFX1 A 0 A_SeekerMissile(2,3,SMF_PRECISE)
		loop
	Death:
		PFX1 H 0 Bright A_SpawnItemEx("PatriarchRainFXSpawner",0,0,9999,0,0,0,0,SXF_NOCHECKPOSITION)
		PFX1 HHHHH 1 Bright //A_SpawnItemEx("PatriarchRainFX",frandom(-64,64),frandom(-64,64),9999,frandom(-1,1),frandom(-1,1),-15)
		PFX1 IIIII 1 Bright //A_SpawnItemEx("PatriarchRainFX",frandom(-64,64),frandom(-64,64),9999,frandom(-1,1),frandom(-1,1),-15)
		PFX1 JJJJ 1 Bright //A_SpawnItemEx("PatriarchRainFX",frandom(-64,64),frandom(-64,64),9999,frandom(-1,1),frandom(-1,1),-15)
		PFX1 KKKLLLMMM 1 Bright //A_SpawnItemEx("PatriarchRainFX",frandom(-64,64),frandom(-64,64),9999,frandom(-1,1),frandom(-1,1),-15)
		PFX1 GGG 1 Bright //A_SpawnItemEx("PatriarchRainFX",frandom(-64,64),frandom(-64,64),9999,frandom(-1,1),frandom(-1,1),-15)
		Stop
	}
}

actor PatriarchRainFXSpawner
{
	+SKYEXPLODE
	PROJECTILE
	-SOLID
	+NOGRAVITY
	+CEILINGHUGGER
	+DONTBLAST
	radius 1
	height 8
	speed 0
	States
	{
	Spawn:
		TNT1 A 0
		TNT1 HHHHH 1 Bright A_SpawnItemEx("PatriarchRainFX",frandom(-64,64),frandom(-64,64),-6,frandom(-1,1),frandom(-1,1),-15)
		TNT1 IIIII 1 Bright A_SpawnItemEx("PatriarchRainFX",frandom(-64,64),frandom(-64,64),-6,frandom(-1,1),frandom(-1,1),-15)
		TNT1 JJJJ 1 Bright A_SpawnItemEx("PatriarchRainFX",frandom(-64,64),frandom(-64,64),-6,frandom(-1,1),frandom(-1,1),-15)
		TNT1 KKKLLLMMM 1 Bright A_SpawnItemEx("PatriarchRainFX",frandom(-64,64),frandom(-64,64),-6,frandom(-1,1),frandom(-1,1),-15)
		TNT1 GGG 1 Bright A_SpawnItemEx("PatriarchRainFX",frandom(-64,64),frandom(-64,64),-6,frandom(-1,1),frandom(-1,1),-15)
		Stop
	}
}

Actor PatriarchFXClone : PatriarchFX
{
	States
	{
	Death:
		PFX1 HHHHH 1 Bright
		PFX1 IIIII 1 Bright
		PFX1 JJJJ 1 Bright
		PFX1 KKKLLLMMM 1 Bright 
		PFX1 GGG 1 Bright
		Stop
	}
}

ACTOR PatriarchRainFX
{
	Radius 6
	Height 12
	Speed 12
	Damage (ACS_NamedExecuteWithResult("WOC Monster Damage Scale",WOCTARGET,FRandom(3,24)))
	Damagetype "Holy"
	Mass 5
	Projectile
	-ACTIVATEPCROSS
	-ACTIVATEIMPACT
	-NOGRAVITY
	+SPAWNCEILING
	+CEILINGHUGGER
	+NODAMAGETHRUST
	RenderStyle Add
	States
	{
	Spawn:
		PFX3 A 0
		PFX3 A 0 A_ChangeFlag("CeilingHugger",0)
	Animation:
		PFX3 A 1 Bright
		Loop
	Death:
		PFX3 B 0 Bright A_ChangeFlag("NOGRAVITY", 1)
		PFX3 B 0 Bright A_CheckFloor("NotFloor")
		PFX3 B 0 Bright A_Jump(38, "Disappear")
		PFX3 GHI 4 Bright
		Stop
	NotFloor:
		PFX3 B 0 Bright A_Jump(38, "Disappear")
		PFX3 BCDEF 4 Bright
		Stop
	Disappear:
		TNT1 A 1 Bright
		Stop
	}
}

ACTOR PatriarchShot
{
	Radius 10
	Height 6
	Speed 25
	Damage (ACS_NamedExecuteWithResult("WOC Monster Damage Scale",WOCTARGET,FRandom(15,30)))
	Damagetype "Holy"
	RENDERSTYLE ADD
	ALPHA 1
	PROJECTILE
	BounceType Doom
	BounceFactor 1
	BounceCount 2
	DeathSound "monster/disht1"
	Decal "WizardScorch"
	States
	{
	Spawn:
		PFX1 AAABBB 1 Bright A_SpawnItemEx("DPFX1",  -(MomX/1.2), -(MomY/1.2), (MomZ/1.2*-1), (MomX/1.2), (MomY/1.2), (MomZ/1.2), 0, 138)
		loop
	Death:
		PFX1 H 0 Bright A_TakeInventory("Mana1", ACS_NamedExecuteWithResult("WOC Monster Damage Scale", WOCTARGET, 5), 0, AAPTR_TRACER)
		PFX1 H 0 Bright A_TakeInventory("Mana2", ACS_NamedExecuteWithResult("WOC Monster Damage Scale", WOCTARGET, 5), 0, AAPTR_TRACER)
		PFX1 HIJKLM 3 Bright
		stop
	}
}

ACTOR DPFX1
{   
	Radius 2
	Height 2
	Speed 0
	PROJECTILE
	+CLIENTSIDEONLY
	RENDERSTYLE ADD
	Scale 0.75
	States
	{
	Spawn:
		PFX1 A 1 Bright A_FadeOut(0.1)
		Loop 
	}
}

ACTOR NewDragon : Dragon Replaces Dragon
{
	Health 4800
	+TELESTOMP
	Speed 20
	DamageFactor "Deathblow", 0
	+NOTARGET
	+NOPAIN
	+LOOKALLAROUND
	Damagefactor "PoisonCloud", 0.25
	DropItem "AccessoryRandomSpawner" 16
	Damagetype "Physical"
	Tag "Death Wyvern"
	+USEKILLSCRIPTS
	DamageFactor "PoisonTime", 0
	DamageFactor "Bleed", 0
	DamageFactor "Holy", 1.5
	DamageFactor "HolyPlayer", 1.5
	DamageFactor "HolyTime", 1.5
	States
	{
	Spawn:
		DRAG D 0
		DRAG D 0 ACS_NamedExecuteAlways("WOC Monster Init",0,65,WOC_BOSS)
	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
	Pain:
		DRAG F 10 A_DragonPain
		Goto See+3
	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 NewDragonFireBall : DragonFireBall replaces DragonFireball
{
	Damage (ACS_NamedExecuteWithResult("WOC Monster Damage Scale",WOCTARGET,FRandom(17,37)))
	/*+NODAMAGETHRUST*/
}

Actor NewDragonExplosion : DragonExplosion replaces DragonExplosion
{
	/*+NODAMAGETHRUST*/
	States
	{
	Spawn:
     CFCF Q 1 Bright
     CFCF Q 4 Bright A_UnHideThing
     CFCF R 3 Bright A_Scream
     CFCF S 4 Bright
     CFCF T 3 Bright A_Explode(ACS_NamedExecuteWithResult("WOC Monster Damage Scale",WOCTARGET,80), 128, 0)
     CFCF U 4 Bright
     CFCF V 3 Bright
     CFCF W 4 Bright
     CFCF X 3 Bright
     CFCF Y 4 Bright
     CFCF Z 3 Bright
     Stop
  }
}

Actor NewDart : Dart replaces Dart
{
	+THRUGHOST
	+WINDTHRUST
	/*+NODAMAGETHRUST*/
	Damagetype "Physical"
}

Actor NewPoisonDart : PoisonDart replaces PoisonDart
{
	+THRUGHOST
	+WINDTHRUST
	Damagetype "Poison"
	PoisonDamageType "PoisonTime"
	/*+NODAMAGETHRUST*/
}

Actor NewProjectileBlade : ProjectileBlade replaces ProjectileBlade
{
	+THRUGHOST
	+WINDTHRUST
	/*+NODAMAGETHRUST*/
	Damagetype "Physical"
}

Actor NewRipperBall : RipperBall replaces RipperBall
{
	+THRUGHOST
	+WINDTHRUST
	/*+NODAMAGETHRUST*/
	Damagetype "Physical"
	States
	{
	Death:
		CFCF Q 4 Bright A_SetTranslucent(1,1)
		CFCF R 3 Bright
		CFCF S 4 Bright
		CFCF T 3 Bright
		CFCF U 4 Bright
		CFCF V 3 Bright
		CFCF W 4 Bright
		CFCF X 3 Bright
		CFCF Y 4 Bright
		CFCF Z 3 Bright
		Stop
	}
}

Actor NewSorcFX1 : SorcFX1 replaces SorcFX1
{
	/*+NODAMAGETHRUST*/
	Damagetype "Fire"
	Renderstyle Add
	Speed 10
	States
	{
	Death:
    FX13 I 2 Bright A_Explode(ACS_NamedExecuteWithResult("WOC Monster Damage Scale",WOCTARGET,60), 128, 0)
    FX13 JKLM 2 Bright
    Stop
   }
}

Actor NewSorcFX3 : SorcFX3 replaces SorcFX3
{
	/*+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,SXF_SETMASTER)
		SBS3 DEFGH 2 Bright
		Stop
    }
}

Actor NewSorcFX4 : SorcFX4 replaces SorcFX4
{
	//Renderstyle Add
	/*+NODAMAGETHRUST*/
	Damagetype "Arcane"
	Speed 20
	States
	{
	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 NewKorax : Korax replaces Korax
{
	Health 100000
	Damagefactor "PoisonCloud", 0.25
	DamageFactor "Deathblow", 0
	PainChance 0
	+NEVERRESPAWN
	+NOTARGET
	+NOPAIN
	+NOFEAR
	+LOOKALLAROUND
	BloodColor "0 78 0"
	Tag "Korax"
	+USEKILLSCRIPTS
	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_BOSS)
	Idle:
		KORX A 5 A_Look
		Loop
	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_KoraxBonePop
		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
		Stop
	}
}