Actor NecromancerHealed : WoC_Boolean {}

Actor Enfeeble : WoC_Skill {}
Actor EnfeebleRank : WoC_Skill {}

Actor EnfeebleEffectItem : Custominventory
{
	Inventory.MaxAmount 0
	+Inventory.AUTOACTIVATE
	states
	{
		Use:
		TNT1 AAA 0 A_SpawnItemEx("EnfeebleEffectPuff", frandom(-16,16), frandom(-16,16), frandom(height/2-8,height/2+8), 0, 0, 0.5*frandom(2,5), 0, 0, 0)
		Stop
	}
}

Actor EnfeeblePuffGiver : Custominventory
{
	Inventory.MaxAmount 0
	+Inventory.AUTOACTIVATE
	states
	{
	Use:
		TNT1 A 0 A_SpawnItemEx("EnfeebleBulletPuff",0,0,32)
		Stop
	}
}

Actor EnfeebleEffectPuff
{
	Projectile
	+NOCLIP
    RenderStyle Add
	Scale 0.67
    States
    {
    Spawn:
	SKP1 ABCDEF 3 Bright
	Stop
    }
}

Actor UseEnfeeble : Custominventory
{
	Inventory.MaxAmount 0
	+Inventory.AUTOACTIVATE
	states
	{
	Use:
		TNT1 A 0 A_FireCustomMissile ("EnfeebleCurseProjectile",0,0)
		Stop
	}
}

Actor EnfeebleHitscan : Custominventory
{
	Inventory.MaxAmount 0
	+Inventory.AUTOACTIVATE
	states
	{
	Use:
		TNT1 A 0 A_FireBullets(0,0,1,0,"EnfeebleBulletPuff",0)
		Stop
	}
}

Actor EnfeebleBulletPuff
{
	Mass 5
	+NOBLOCKMAP
	+NOGRAVITY
	+ALWAYSPUFF
	+PUFFONACTORS
	+BLOODLESSIMPACT
	+MTHRUSPECIES
	States
	{
	Spawn:
		TNT1 CCCCCCCCCCC 0 bright A_SpawnItemEx("EnfeebleBoom", 0, 0, 0, 0, 0, 0, 0, 160, 0)
		TNT1 CCCCCCCCCCC 0 bright A_SpawnItemEx("EnfeebleBoom", 0, 0, 0, 0, 0, 0, 0, 160, 0)
		TNT1 CCCCCCCCCCC 0 bright A_SpawnItemEx("EnfeebleBoom", 0, 0, 0, 0, 0, 0, 0, 160, 0)
		TNT1 CCCCCCCCCCC 0 bright A_SpawnItemEx("EnfeebleBoom", 0, 0, 0, 0, 0, 0, 0, 160, 0)
		TNT1 A 1
		Stop
	}
}

Actor EnfeebleCurseProjectile
{
	Radius 6
	Height 8
	Speed 25
	damage (0)
	Decal "BaronScorch"
	Renderstyle Add
	Projectile
	+RANDOMIZE
	+HITTRACER
	+MTHRUSPECIES +NODAMAGETHRUST +DONTBLAST
	+DONTREFLECT
	states
	{
	Spawn:
		TNT1 A 1
		TNT1 AAA 0 A_SpawnItemEx ("EnfeebleEffectPuff2", 0, random (1,-1), random (1,-1), 0, 0, 0, 0, 160)
		loop
	Death:
		TNT1 CCCCCCCCCCC 0 bright A_SpawnItemEx("EnfeebleBoom", 0, 0, 0, 0, 0, 0, 0, 160, 0)
			TNT1 CCCCCCCCCCC 0 bright A_SpawnItemEx("EnfeebleBoom", 0, 0, 0, 0, 0, 0, 0, 160, 0)
			TNT1 CCCCCCCCCCC 0 bright A_SpawnItemEx("EnfeebleBoom", 0, 0, 0, 0, 0, 0, 0, 160, 0)
			TNT1 CCCCCCCCCCC 0 bright A_SpawnItemEx("EnfeebleBoom", 0, 0, 0, 0, 0, 0, 0, 160, 0)
		TNT1 A 0 A_JumpIfInTargetInventory("IsHarvester", 1, "Harvester")
		TNT1 A 15 ACS_ExecuteAlways(WOC_CASTENFEEBLE, 0, ACS_ExecuteWithResult(WOC_DECORATE,NECROMANCERSKILLS,ABIL_ENFEEBLE,WOCTARGET)*10+ACS_ExecuteWithResult(WOC_DECORATE,STATS,WISDOM,WOCTARGET)/10, 0, ACS_ExecuteWithResult(WOC_DECORATE,NECROMANCERSKILLS,ABIL_ENFEEBLE,WOCTARGET))
		stop
	Harvester:
		TNT1 A 0  ACS_ExecuteAlways(WOC_CASTENFEEBLE, 0, ACS_ExecuteWithResult(WOC_DECORATE,NECROMANCERSKILLS,ABIL_ENFEEBLE,WOCTARGET)*10+ACS_ExecuteWithResult(WOC_DECORATE,STATS,WISDOM,WOCTARGET)/10, 0, ACS_ExecuteWithResult(WOC_DECORATE,NECROMANCERSKILLS,ABIL_ENFEEBLE,WOCTARGET))
		TNT1 A 15 A_GiveInventory("EnfeebleAOEGiver")
		stop
	}
}

actor EnfeebleBoom
{
  radius 0
  height 1
  speed 0
  damage 0
  renderstyle Add
  alpha 0.75
  PROJECTILE
  -RANDOMIZE
  Scale 0.5
  +DONTSPLASH
   +NOINTERACTION
  +CLIENTSIDEONLY
  +NOCLIP
  +RIPPER
  +BLOODLESSIMPACT
  +PAINLESS
  states
  {
  Spawn:
    TNT1 A 0 
    TNT1 A 0 A_CustomMissile("EnfeebleEffectPuff2",0,0,frandom(-180,180),2,frandom(-180,180))
    TNT1 A 2 A_CustomMissile("EnfeebleEffectPuff2",0,0,frandom(-180,180),2,frandom(-180,180))
    stop
  Death:
    TNT1 A 3 
    stop
  }
}

ACTOR EnfeebleEffectPuff2
{
    Projectile
	Speed 6
	+PAINLESS
	+NOCLIP
	+NOINTERACTION
	+CLIENTSIDEONLY
	+DONTSPLASH
    RenderStyle Add
	Alpha 0.6
	Scale 0.4
    States
    {
    Spawn:
	SKP1 ABCDEF 1 Bright
	Stop
    }
}

Actor EnfeebleDuration : Inventory { Inventory.MaxAmount 0x7fffffff }

Actor EnfeebleAOEGiver : CustomInventory
{
	Inventory.MaxAmount 0
	+INVENTORY.AUTOACTIVATE
	Inventory.Icon "TNT1A0"
	States
	{
	Use:
		TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(WOC_DECORATE,STATS,PLAYERNUM,WOCTARGET) == 32,"Use32")
		TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(WOC_DECORATE,STATS,PLAYERNUM,WOCTARGET) == 31,"Use31")
		TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(WOC_DECORATE,STATS,PLAYERNUM,WOCTARGET) == 30,"Use30")
		TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(WOC_DECORATE,STATS,PLAYERNUM,WOCTARGET) == 29,"Use29")
		TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(WOC_DECORATE,STATS,PLAYERNUM,WOCTARGET) == 28,"Use28")
		TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(WOC_DECORATE,STATS,PLAYERNUM,WOCTARGET) == 27,"Use27")
		TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(WOC_DECORATE,STATS,PLAYERNUM,WOCTARGET) == 26,"Use26")
		TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(WOC_DECORATE,STATS,PLAYERNUM,WOCTARGET) == 25,"Use25")
		TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(WOC_DECORATE,STATS,PLAYERNUM,WOCTARGET) == 24,"Use24")
		TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(WOC_DECORATE,STATS,PLAYERNUM,WOCTARGET) == 23,"Use23")
		TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(WOC_DECORATE,STATS,PLAYERNUM,WOCTARGET) == 22,"Use22")
		TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(WOC_DECORATE,STATS,PLAYERNUM,WOCTARGET) == 21,"Use21")
		TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(WOC_DECORATE,STATS,PLAYERNUM,WOCTARGET) == 20,"Use20")
		TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(WOC_DECORATE,STATS,PLAYERNUM,WOCTARGET) == 19,"Use19")
		TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(WOC_DECORATE,STATS,PLAYERNUM,WOCTARGET) == 18,"Use18")
		TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(WOC_DECORATE,STATS,PLAYERNUM,WOCTARGET) == 17,"Use17")
		TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(WOC_DECORATE,STATS,PLAYERNUM,WOCTARGET) == 16,"Use16")
		TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(WOC_DECORATE,STATS,PLAYERNUM,WOCTARGET) == 15,"Use15")
		TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(WOC_DECORATE,STATS,PLAYERNUM,WOCTARGET) == 14,"Use14")
		TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(WOC_DECORATE,STATS,PLAYERNUM,WOCTARGET) == 13,"Use13")
		TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(WOC_DECORATE,STATS,PLAYERNUM,WOCTARGET) == 12,"Use12")
		TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(WOC_DECORATE,STATS,PLAYERNUM,WOCTARGET) == 11,"Use11")
		TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(WOC_DECORATE,STATS,PLAYERNUM,WOCTARGET) == 10,"Use10")
		TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(WOC_DECORATE,STATS,PLAYERNUM,WOCTARGET) == 9,"Use9")
		TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(WOC_DECORATE,STATS,PLAYERNUM,WOCTARGET) == 8,"Use8")
		TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(WOC_DECORATE,STATS,PLAYERNUM,WOCTARGET) == 7,"Use7")
		TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(WOC_DECORATE,STATS,PLAYERNUM,WOCTARGET) == 6,"Use6")
		TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(WOC_DECORATE,STATS,PLAYERNUM,WOCTARGET) == 5,"Use5")
		TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(WOC_DECORATE,STATS,PLAYERNUM,WOCTARGET) == 4,"Use4")
		TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(WOC_DECORATE,STATS,PLAYERNUM,WOCTARGET) == 3,"Use3")
		TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(WOC_DECORATE,STATS,PLAYERNUM,WOCTARGET) == 2,"Use2")
		TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(WOC_DECORATE,STATS,PLAYERNUM,WOCTARGET) == 1,"Use1")
		TNT1 A 0 A_RadiusGive("EnfeebleAOE0", 128, RGF_MONSTERS)
		Stop
		Use1: TNT1 A 0 A_RadiusGive("EnfeebleAOE1", 128, RGF_MONSTERS) Stop
		Use2: TNT1 A 0 A_RadiusGive("EnfeebleAOE2", 128, RGF_MONSTERS) Stop
		Use3: TNT1 A 0 A_RadiusGive("EnfeebleAOE3", 128, RGF_MONSTERS) Stop
		Use4: TNT1 A 0 A_RadiusGive("EnfeebleAOE4", 128, RGF_MONSTERS) Stop
		Use5: TNT1 A 0 A_RadiusGive("EnfeebleAOE5", 128, RGF_MONSTERS) Stop
		Use6: TNT1 A 0 A_RadiusGive("EnfeebleAOE6", 128, RGF_MONSTERS) Stop
		Use7: TNT1 A 0 A_RadiusGive("EnfeebleAOE7", 128, RGF_MONSTERS) Stop
		Use8: TNT1 A 0 A_RadiusGive("EnfeebleAOE8", 128, RGF_MONSTERS) Stop
		Use9: TNT1 A 0 A_RadiusGive("EnfeebleAOE9", 128, RGF_MONSTERS) Stop
		
		Use10: TNT1 A 0 A_RadiusGive("EnfeebleAOE10", 128, RGF_MONSTERS) Stop
		Use11: TNT1 A 0 A_RadiusGive("EnfeebleAOE11", 128, RGF_MONSTERS) Stop
		Use12: TNT1 A 0 A_RadiusGive("EnfeebleAOE12", 128, RGF_MONSTERS) Stop
		Use13: TNT1 A 0 A_RadiusGive("EnfeebleAOE13", 128, RGF_MONSTERS) Stop
		Use14: TNT1 A 0 A_RadiusGive("EnfeebleAOE14", 128, RGF_MONSTERS) Stop
		Use15: TNT1 A 0 A_RadiusGive("EnfeebleAOE15", 128, RGF_MONSTERS) Stop
		Use16: TNT1 A 0 A_RadiusGive("EnfeebleAOE16", 128, RGF_MONSTERS) Stop
		Use17: TNT1 A 0 A_RadiusGive("EnfeebleAOE17", 128, RGF_MONSTERS) Stop
		Use18: TNT1 A 0 A_RadiusGive("EnfeebleAOE18", 128, RGF_MONSTERS) Stop
		Use19: TNT1 A 0 A_RadiusGive("EnfeebleAOE19", 128, RGF_MONSTERS) Stop
		
		Use20: TNT1 A 0 A_RadiusGive("EnfeebleAOE20", 128, RGF_MONSTERS) Stop
		Use21: TNT1 A 0 A_RadiusGive("EnfeebleAOE21", 128, RGF_MONSTERS) Stop
		Use22: TNT1 A 0 A_RadiusGive("EnfeebleAOE22", 128, RGF_MONSTERS) Stop
		Use23: TNT1 A 0 A_RadiusGive("EnfeebleAOE23", 128, RGF_MONSTERS) Stop
		Use24: TNT1 A 0 A_RadiusGive("EnfeebleAOE24", 128, RGF_MONSTERS) Stop
		Use25: TNT1 A 0 A_RadiusGive("EnfeebleAOE25", 128, RGF_MONSTERS) Stop
		Use26: TNT1 A 0 A_RadiusGive("EnfeebleAOE26", 128, RGF_MONSTERS) Stop
		Use27: TNT1 A 0 A_RadiusGive("EnfeebleAOE27", 128, RGF_MONSTERS) Stop
		Use28: TNT1 A 0 A_RadiusGive("EnfeebleAOE28", 128, RGF_MONSTERS) Stop
		Use29: TNT1 A 0 A_RadiusGive("EnfeebleAOE29", 128, RGF_MONSTERS) Stop
		Use30: TNT1 A 0 A_RadiusGive("EnfeebleAOE30", 128, RGF_MONSTERS) Stop
		Use31: TNT1 A 0 A_RadiusGive("EnfeebleAOE31", 128, RGF_MONSTERS) Stop
		Use32: TNT1 A 0 A_RadiusGive("EnfeebleAOE32", 128, RGF_MONSTERS) Stop
	}
}
//, 128, RGF_MONSTERS)
Actor EnfeebleAOE0 : CustomInventory
{
	Inventory.MaxAmount 0
	+AUTOACTIVATE
	+ALWAYSPICKUP
	Inventory.PickupSound "pickup/health"
	Inventory.PickupMessage "NATURE'S SALVE" // "QUARTZ FLASK"
	var int user_Amount;
	States
	{
	Use:
		TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(WOC_DECORATE,STATS,ISFRIENDLY,ACTIVATOR) == 0, "Healing")
		Stop
	Healing:
		TNT1 A 0 ACS_ExecuteAlways(WOC_CASTENFEEBLE,0,0,1,0)
		Stop
	}
}

Actor EnfeebleAOE1 : EnfeebleAOE0 { States { Healing: TNT1 A 0 ACS_ExecuteAlways(WOC_CASTENFEEBLE,0,1,1,0) Stop } }
Actor EnfeebleAOE2 : EnfeebleAOE0 { States { Healing: TNT1 A 0 ACS_ExecuteAlways(WOC_CASTENFEEBLE,0,2,1,0) Stop } }
Actor EnfeebleAOE3 : EnfeebleAOE0 { States { Healing: TNT1 A 0 ACS_ExecuteAlways(WOC_CASTENFEEBLE,0,3,1,0) Stop } }
Actor EnfeebleAOE4 : EnfeebleAOE0 { States { Healing: TNT1 A 0 ACS_ExecuteAlways(WOC_CASTENFEEBLE,0,4,1,0) Stop } }
Actor EnfeebleAOE5 : EnfeebleAOE0 { States { Healing: TNT1 A 0 ACS_ExecuteAlways(WOC_CASTENFEEBLE,0,5,1,0) Stop } }
Actor EnfeebleAOE6 : EnfeebleAOE0 { States { Healing: TNT1 A 0 ACS_ExecuteAlways(WOC_CASTENFEEBLE,0,6,1,0) Stop } }
Actor EnfeebleAOE7 : EnfeebleAOE0 { States { Healing: TNT1 A 0 ACS_ExecuteAlways(WOC_CASTENFEEBLE,0,7,1,0) Stop } }
Actor EnfeebleAOE8 : EnfeebleAOE0 { States { Healing: TNT1 A 0 ACS_ExecuteAlways(WOC_CASTENFEEBLE,0,8,1,0) Stop } }
Actor EnfeebleAOE9 : EnfeebleAOE0 { States { Healing: TNT1 A 0 ACS_ExecuteAlways(WOC_CASTENFEEBLE,0,9,1,0) Stop } }

Actor EnfeebleAOE10 : EnfeebleAOE0 { States { Healing: TNT1 A 0 ACS_ExecuteAlways(WOC_CASTENFEEBLE,0,10,1,0) Stop } }
Actor EnfeebleAOE11 : EnfeebleAOE0 { States { Healing: TNT1 A 0 ACS_ExecuteAlways(WOC_CASTENFEEBLE,0,11,1,0) Stop } }
Actor EnfeebleAOE12 : EnfeebleAOE0 { States { Healing: TNT1 A 0 ACS_ExecuteAlways(WOC_CASTENFEEBLE,0,12,1,0) Stop } }
Actor EnfeebleAOE13 : EnfeebleAOE0 { States { Healing: TNT1 A 0 ACS_ExecuteAlways(WOC_CASTENFEEBLE,0,13,1,0) Stop } }
Actor EnfeebleAOE14 : EnfeebleAOE0 { States { Healing: TNT1 A 0 ACS_ExecuteAlways(WOC_CASTENFEEBLE,0,14,1,0) Stop } }
Actor EnfeebleAOE15 : EnfeebleAOE0 { States { Healing: TNT1 A 0 ACS_ExecuteAlways(WOC_CASTENFEEBLE,0,15,1,0) Stop } }
Actor EnfeebleAOE16 : EnfeebleAOE0 { States { Healing: TNT1 A 0 ACS_ExecuteAlways(WOC_CASTENFEEBLE,0,16,1,0) Stop } }
Actor EnfeebleAOE17 : EnfeebleAOE0 { States { Healing: TNT1 A 0 ACS_ExecuteAlways(WOC_CASTENFEEBLE,0,17,1,0) Stop } }
Actor EnfeebleAOE18 : EnfeebleAOE0 { States { Healing: TNT1 A 0 ACS_ExecuteAlways(WOC_CASTENFEEBLE,0,18,1,0) Stop } }
Actor EnfeebleAOE19 : EnfeebleAOE0 { States { Healing: TNT1 A 0 ACS_ExecuteAlways(WOC_CASTENFEEBLE,0,19,1,0) Stop } }

Actor EnfeebleAOE20 : EnfeebleAOE0 { States { Healing: TNT1 A 0 ACS_ExecuteAlways(WOC_CASTENFEEBLE,0,20,1,0) Stop } }
Actor EnfeebleAOE21 : EnfeebleAOE0 { States { Healing: TNT1 A 0 ACS_ExecuteAlways(WOC_CASTENFEEBLE,0,21,1,0) Stop } }
Actor EnfeebleAOE22 : EnfeebleAOE0 { States { Healing: TNT1 A 0 ACS_ExecuteAlways(WOC_CASTENFEEBLE,0,22,1,0) Stop } }
Actor EnfeebleAOE23 : EnfeebleAOE0 { States { Healing: TNT1 A 0 ACS_ExecuteAlways(WOC_CASTENFEEBLE,0,23,1,0) Stop } }
Actor EnfeebleAOE24 : EnfeebleAOE0 { States { Healing: TNT1 A 0 ACS_ExecuteAlways(WOC_CASTENFEEBLE,0,24,1,0) Stop } }
Actor EnfeebleAOE25 : EnfeebleAOE0 { States { Healing: TNT1 A 0 ACS_ExecuteAlways(WOC_CASTENFEEBLE,0,25,1,0) Stop } }
Actor EnfeebleAOE26 : EnfeebleAOE0 { States { Healing: TNT1 A 0 ACS_ExecuteAlways(WOC_CASTENFEEBLE,0,26,1,0) Stop } }
Actor EnfeebleAOE27 : EnfeebleAOE0 { States { Healing: TNT1 A 0 ACS_ExecuteAlways(WOC_CASTENFEEBLE,0,27,1,0) Stop } }
Actor EnfeebleAOE28 : EnfeebleAOE0 { States { Healing: TNT1 A 0 ACS_ExecuteAlways(WOC_CASTENFEEBLE,0,28,1,0) Stop } }
Actor EnfeebleAOE29 : EnfeebleAOE0 { States { Healing: TNT1 A 0 ACS_ExecuteAlways(WOC_CASTENFEEBLE,0,29,1,0) Stop } }

Actor EnfeebleAOE30 : EnfeebleAOE0 { States { Healing: TNT1 A 0 ACS_ExecuteAlways(WOC_CASTENFEEBLE,0,30,1,0) Stop } }
Actor EnfeebleAOE31 : EnfeebleAOE0 { States { Healing: TNT1 A 0 ACS_ExecuteAlways(WOC_CASTENFEEBLE,0,31,1,0) Stop } }
Actor EnfeebleAOE32 : EnfeebleAOE0 { States { Healing: TNT1 A 0 ACS_ExecuteAlways(WOC_CASTENFEEBLE,0,32,1,0) Stop } }

Actor EnfeebleDebuff1 : CustomInventory
{
	Inventory.MaxAmount 0
	+Inventory.AUTOACTIVATE
	states
	{
		Use:
		TNT1 A 0 A_GiveInventory("PowerEnfeebleDefense1", 0)
		TNT1 A 0 A_GiveInventory("PowerEnfeebleDamage1", 0)
		Stop
	}
}

Actor PowerEnfeebleDefense1 : PowerProtection
{
	Damagefactor "Normal", 1.30
	Powerup.Duration 0x7FFFFFFF
}

Actor PowerEnfeebleDamage1 : PowerDamage
{
	Damagefactor "Normal", 0.86
	Powerup.Duration 0x7FFFFFFF
}
////
Actor EnfeebleDebuff2 : CustomInventory
{
	Inventory.MaxAmount 0
	+Inventory.AUTOACTIVATE
	states
	{
		Use:
		TNT1 A 0 A_GiveInventory("PowerEnfeebleDefense2", 0)
		TNT1 A 0 A_GiveInventory("PowerEnfeebleDamage2", 0)
		Stop
	}
}

Actor PowerEnfeebleDefense2 : PowerProtection
{
	Damagefactor "Normal", 1.35
	Powerup.Duration 0x7FFFFFFF
}

Actor PowerEnfeebleDamage2 : PowerDamage
{
	Damagefactor "Normal", 0.82
	Powerup.Duration 0x7FFFFFFF
}
////
Actor EnfeebleDebuff3 : CustomInventory
{
	Inventory.MaxAmount 0
	+Inventory.AUTOACTIVATE
	states
	{
		Use:
		TNT1 A 0 A_GiveInventory("PowerEnfeebleDefense3", 0)
		TNT1 A 0 A_GiveInventory("PowerEnfeebleDamage3", 0)
		Stop
	}
}

Actor PowerEnfeebleDefense3 : PowerProtection
{
	Damagefactor "Normal", 1.40
	Powerup.Duration 0x7FFFFFFF
}

Actor PowerEnfeebleDamage3 : PowerDamage
{
	Damagefactor "Normal", 0.78
	Powerup.Duration 0x7FFFFFFF
}
////
Actor EnfeebleDebuff4 : CustomInventory
{
	Inventory.MaxAmount 0
	+Inventory.AUTOACTIVATE
	states
	{
		Use:
		TNT1 A 0 A_GiveInventory("PowerEnfeebleDefense4", 0)
		TNT1 A 0 A_GiveInventory("PowerEnfeebleDamage4", 0)
		Stop
	}
}

Actor PowerEnfeebleDefense4 : PowerProtection
{
	Damagefactor "Normal", 1.45
	Powerup.Duration 0x7FFFFFFF
}

Actor PowerEnfeebleDamage4 : PowerDamage
{
	Damagefactor "Normal", 0.74
	Powerup.Duration 0x7FFFFFFF
}
////
Actor EnfeebleDebuff5 : CustomInventory
{
	Inventory.MaxAmount 0
	+Inventory.AUTOACTIVATE
	states
	{
		Use:
		TNT1 A 0 A_GiveInventory("PowerEnfeebleDefense5", 0)
		TNT1 A 0 A_GiveInventory("PowerEnfeebleDamage5", 0)
		Stop
	}
}

Actor PowerEnfeebleDefense5 : PowerProtection
{
	Damagefactor "Normal", 1.5
	Powerup.Duration 0x7FFFFFFF
}

Actor PowerEnfeebleDamage5 : PowerDamage
{
	Damagefactor "Normal", 0.70
	Powerup.Duration 0x7FFFFFFF
}
////
Actor EnfeebleDebuff6 : CustomInventory
{
	Inventory.MaxAmount 0
	+Inventory.AUTOACTIVATE
	states
	{
		Use:
		TNT1 A 0 A_GiveInventory("PowerEnfeebleDefense6", 0)
		TNT1 A 0 A_GiveInventory("PowerEnfeebleDamage6", 0)
		Stop
	}
}

Actor PowerEnfeebleDefense6 : PowerProtection
{
	Damagefactor "Normal", 1.55
	Powerup.Duration 0x7FFFFFFF
}

Actor PowerEnfeebleDamage6 : PowerDamage
{
	Damagefactor "Normal", 0.66
	Powerup.Duration 0x7FFFFFFF
}
////
Actor EnfeebleDebuff7 : CustomInventory
{
	Inventory.MaxAmount 0
	+Inventory.AUTOACTIVATE
	states
	{
		Use:
		TNT1 A 0 A_GiveInventory("PowerEnfeebleDefense7", 0)
		TNT1 A 0 A_GiveInventory("PowerEnfeebleDamage7", 0)
		Stop
	}
}

Actor PowerEnfeebleDefense7 : PowerProtection
{
	Damagefactor "Normal", 1.60
	Powerup.Duration 0x7FFFFFFF
}

Actor PowerEnfeebleDamage7 : PowerDamage
{
	Damagefactor "Normal", 0.62
	Powerup.Duration 0x7FFFFFFF
}
////
Actor EnfeebleDebuff8 : CustomInventory
{
	Inventory.MaxAmount 0
	+Inventory.AUTOACTIVATE
	states
	{
		Use:
		TNT1 A 0 A_GiveInventory("PowerEnfeebleDefense8", 0)
		TNT1 A 0 A_GiveInventory("PowerEnfeebleDamage8", 0)
		Stop
	}
}

Actor PowerEnfeebleDefense8 : PowerProtection
{
	Damagefactor "Normal", 1.65
	Powerup.Duration 0x7FFFFFFF
}

Actor PowerEnfeebleDamage8 : PowerDamage
{
	Damagefactor "Normal", 0.58
	Powerup.Duration 0x7FFFFFFF
}
////
Actor EnfeebleDebuff9 : CustomInventory
{
	Inventory.MaxAmount 0
	+Inventory.AUTOACTIVATE
	states
	{
		Use:
		TNT1 A 0 A_GiveInventory("PowerEnfeebleDefense9", 0)
		TNT1 A 0 A_GiveInventory("PowerEnfeebleDamage9", 0)
		Stop
	}
}

Actor PowerEnfeebleDefense9 : PowerProtection
{
	Damagefactor "Normal", 1.7
	Powerup.Duration 0x7FFFFFFF
}

Actor PowerEnfeebleDamage9 : PowerDamage
{
	Damagefactor "Normal", 0.54
	Powerup.Duration 0x7FFFFFFF
}
////
Actor EnfeebleDebuff10 : CustomInventory
{
	Inventory.MaxAmount 0
	+Inventory.AUTOACTIVATE
	states
	{
		Use:
		TNT1 A 0 A_GiveInventory("PowerEnfeebleDefense10", 0)
		TNT1 A 0 A_GiveInventory("PowerEnfeebleDamage10", 0)
		Stop
	}
}

Actor PowerEnfeebleDefense10 : PowerProtection
{
	Damagefactor "Normal", 1.75
	Powerup.Duration 0x7FFFFFFF
}

Actor PowerEnfeebleDamage10 : PowerDamage
{
	Damagefactor "Normal", 0.5
	Powerup.Duration 0x7FFFFFFF
}
//Summon Shadow

Actor NecromancerPetCheck : WoC_Undroppable
{
	Inventory.MaxAmount 2
}

Actor NecromancerPet2Check : NecromancerPetCheck {}
Actor NecromancerPet3Check : NecromancerPetCheck {}
Actor NecromancerPet4Check : NecromancerPetCheck {}

Actor NecromancerPetCooldown : Powerup
{
	Powerup.Duration 10
}

Actor NecromancerPet2Cooldown : NecromancerPetCooldown {}
Actor NecromancerPet3Cooldown : NecromancerPetCooldown {}
Actor NecromancerPet4Cooldown : NecromancerPetCooldown {}

Actor SummonShadow : WoC_Skill {}

Actor SummonShadowTracker : PowerupGiver
{
	+INVENTORY.AUTOACTIVATE
	Inventory.MaxAmount 0
	Powerup.Type SummonShadowTracker
	Powerup.Duration 0x7FFFFFFD
}

Actor PowerSummonShadowTracker : Powerup
{
	Powerup.Duration 0x7FFFFFFD
	Inventory.Icon "SHADICON"
}

Actor SummonGhoulTracker : PowerupGiver
{
	+INVENTORY.AUTOACTIVATE
	Inventory.MaxAmount 0
	Powerup.Type SummonGhoulTracker
	Powerup.Duration 0x7FFFFFFD
}

Actor PowerSummonGhoulTracker : Powerup
{
	Powerup.Duration 0x7FFFFFFD
	Inventory.Icon "GHOLICON"
}

Actor SummonRevenantTracker : PowerupGiver
{
	+INVENTORY.AUTOACTIVATE
	Inventory.MaxAmount 0
	Powerup.Type SummonRevenantTracker
	Powerup.Duration 0x7FFFFFFD
}

Actor PowerSummonRevenantTracker : Powerup
{
	Powerup.Duration 0x7FFFFFFD
	Inventory.Icon "REVEICON"
}

Actor SummonDeathKnightTracker : PowerupGiver
{
	+INVENTORY.AUTOACTIVATE
	Inventory.MaxAmount 0
	Powerup.Type SummonDeathKnightTracker
	Powerup.Duration 0x7FFFFFFD
}

Actor PowerSummonDeathKnightTracker : Powerup
{
	Powerup.Duration 0x7FFFFFFD
	Inventory.Icon "DKGTICON"
}



Actor UseSummonShadow : CustomInventory
{
	Inventory.MaxAmount 0
	+Inventory.AUTOACTIVATE
	states
	{
	Use:
		TNT1 A 0 A_SpawnItemEx("NecromancerShadow", 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, SXF_NOCHECKPOSITION|SXF_SETMASTER, 0, PET1TID+ACS_ExecuteWithResult(WOC_DECORATE,STATS,PLAYERNUM))
		Stop
	}
}

//Shadow
ACTOR NecromancerShadow : WoC_FriendlyMon
{
	Health 100
	Radius 16
	Height 56
	Mass 100
	RenderStyle "Translucent"
	Alpha 0.7
	Speed 8
	PainChance 200
	Monster
	+FLOORCLIP
	Species "Player"
	+THRUSPECIES
	//+FRIENDLY
	+QUICKTORETALIATE
	-COUNTKILL
	-ACTIVATEMCROSS
	-NOTELEPORT
	+NOBLOCKMONST
	+GHOST
	+NOICEDEATH
	+NEVERRESPAWN
	+NEVERFAST
	+DONTHARMSPECIES
	+DONTBLAST
	+NOBLOOD
	RadiusDamageFactor 0.25
	PainSound "Shadow/pain"
	DeathSound "Shadow/death"
	ActiveSound "Shadow/active"
	DamageFactor "Shadow", 0.5
	DamageFactor "ShadowTime", 0.5
	DamageFactor "Holy", 2.0
	DamageFactor "HolyTime", 2.0
	DamageFactor "PoisonTime", 0
	DamageFactor "Bleed", 0
	Obituary "%o was assassinated by a shadow."
	States
	{
	Spawn:
		SHDW A 0
		SHDW A 0 A_SpawnItemEx("NewMinotaurSmoke")
		SHDW A 0 A_PlaySound("Shadow/active")
		SHDW A 0 ACS_ExecuteAlways(WOC_MINIONREGEN)
		SHDW A 0 ACS_ExecuteAlways(900,0,56)
	Idle:
		SHDW AB 10 A_Look
		Goto See
	See:
		SHDW A 0 A_SetTranslucent(0.7, 0)
		SHDW A 0 A_SetShootable
		SHDW A 0 A_JumpIfTargetinLOS(2, 140)
		SHDW A 0 A_Jump(50, "Giveup")
		SHDW AAA 1 A_Chase
		SHDW A 0 A_SpawnItemEx("ShadowGhostA", 0, 0, 0, 0, 0, 0, 0, 128)
		SHDW BBB 1 A_Chase
		SHDW B 0 A_SpawnItemEx("ShadowGhostB", 0, 0, 0, 0, 0, 0, 0, 128)
		SHDW CCC 1 A_Chase
		SHDW C 0 A_SpawnItemEx("ShadowGhostC", 0, 0, 0, 0, 0, 0, 0, 128)
		SHDW DDD 1 A_Chase
		SHDW D 0 A_SpawnItemEx("ShadowGhostD", 0, 0, 0, 0, 0, 0, 0, 128)
		Goto See
	Giveup:
		SHDW A 0 A_ClearTarget
		Goto See
	Missile:
		SHDW E 0 A_SpawnItemEx("PetAlert")
	    SHDW E 0 A_JumpIfInventory("SummonShadow", 4, 2)
	    SHDW E 0 A_Jump(256,2)
	    SHDW E 0 A_Jump(128,"ShadowDarknessMissile")
		SHDW EEEE 5 A_FaceTarget
		SHDW F 5 A_FaceTarget
		SHDW G 5 BRIGHT A_CustomMissile("NecroShadowBall")
		SHDW E 1 A_CPosRefire
		Goto Missile
	ShadowDarknessMissile:
		SHDW EEEE 5 A_FaceTarget
		SHDW F 5 A_FaceTarget
		SHDW G 5 BRIGHT A_CustomMissile("NecroDarknessSmokeProjectile")
		SHDW E 1 A_CPosRefire
		Goto Missile	
	Pain:
		SHDW H 0 A_JumpIfInventory("SummonShadow", 7, "FadePain")
		SHDW H 4
		SHDW H 4 A_Pain
		Goto See
	FadePain:
		SHDW H 0 A_SetTranslucent(0.1, 0)
		SHDW H 4 A_UnSetShootable
		SHDW H 4 A_Pain
		SHDW H 0 A_SetTranslucent(0.7, 0)
		SHDW H 0 A_SetShootable
		Goto See
	Death:
		SHDW I 6 A_Scream
		SHDW J 5
		SHDW K 5 A_SpawnItemEx("Shadowtorso", 0, 0, 0, 1, 0, 0, 0, 128)
		SHDW L 5 A_Fall
		SHDW MNO 6 
		SHDW P 300
        SHDW PPPPPPPPPPPP 2 A_FadeOut(0.1)
		Stop
	XDeath:
		SHDX A 8
		SHDX B 6 A_XScream
		SHDX C 6 
		SHDX D 6 A_Fall
 		SHDX E 6
 		SHDX F 6
		SHDX G 300
        SHDX GGGGGGGGGGGG 2 A_FadeOut(0.1)
		Stop
	}
}

ACTOR NecroShadowBall
{
	Radius 6
	Height 8
	Speed 25
	Damage (ACS_NamedExecuteWithResult("WOC Player Scale", FRandom(8,28), CHARISMA, ABIL_SUMMONSHADOW, WOCTARGET))
	Damagetype "Shadow"
	Projectile
	+RANDOMIZE
	+MTHRUSPECIES /*+NODAMAGETHRUST*/ +DONTBLAST
	+SEEKERMISSILE
	/*+NODAMAGETHRUST*/ +DONTBLAST
	RenderStyle "ADD"
	Alpha 0.75
	SeeSound "Necromancer/Shadow/Fire"
	DeathSound "imp/shotx"
	Decal DoomImpScorch
	States
	{
	Spawn: 
		SBAL AAAABBBBCCCC 1 BRIGHT A_SpawnItemEx("ShadowTrail", 0, 0, 0, 0, 0, 0, 0, 128)
		SBAL A 0 A_SeekerMissile(10,12,SMF_PRECISE)
		Loop
	Death:
		SBAL C 5 Bright //A_AlertMonsters(0,AMF_TARGETNONPLAYER)
		SBAL DEFGH 4 BRIGHT
		Stop
	}
}

Actor PetAlert
{
	Speed 0
	Radius 6
	Height 8
	Damage 0
	Projectile
	+RIPPER
	+BLOODLESSIMPACT
	+NODAMAGETHRUST +DONTBLAST
	+PAINLESS
	States
	{
	Spawn:
		TNT1 A 0
		TNT1 A 0 A_AlertMonsters(0,AMF_TARGETNONPLAYER)//A_Explode(1,256,1,1,256)
		Goto Death
	Death:
		TNT1 A 1
		Stop
	}
}

ACTOR NecroDarknessSmokeProjectile
{
   Radius 6
   Height 8
   Speed 15
   Damage (0)
   RENDERSTYLE ADD
   PROJECTILE
   +RIPPER
   +FORCEXYBILLBOARD
   +DOOMBOUNCE
   +BLOODLESSIMPACT
   +MTHRUSPECIES +NODAMAGETHRUST +DONTBLAST
   +NODAMAGETHRUST +DONTBLAST
   +FORCERADIUSDMG
   -ALLOWBOUNCEONACTORS
   -BOUNCEONACTORS
   SeeSound "Necromancer/Darkness/Fire"
   Damagetype "ShadowPlayer"
   BounceFactor 1.0
   BounceCount 7
   States
   {
   Spawn:
	  TNT1 A 0 Bright A_Explode(ACS_NamedExecuteWithResult("WOC Player Scale", 3, CHARISMA, ABIL_SUMMONSHADOW, WOCTARGET),36,0,0,36)
	  TNT1 A 1 Bright A_SpawnItemEx("DarkNessSmoke", 0, random (-4, 4), random (-4, 4), 0, random (-2, 2), random (-2, 2), 0, 160)
      loop
   Death:
      TNT1 A 1 Bright
      stop
   }
}

ACTOR ShadowGhostA
{
	Radius 4
	Height 8
	Speed 0
	Damage 0
	Mass 75
	RenderStyle "Translucent"
	Alpha 0.4
	PROJECTILE
	+CLIENTSIDEONLY
	+DONTSPLASH
	+NOCLIP
	+NOINTERACTION
	States
	{
	Spawn:
		SHDW A 1 A_FadeOut(0.03)
		Wait
	}
}

ACTOR ShadowGhostB : ShadowGhostA
{
	States
	{
	Spawn:
		SHDW B 1 A_FadeOut(0.03)
		Wait
	}
}

ACTOR ShadowGhostC : ShadowGhostA
{
	States
	{
	Spawn:
		SHDW C 1 A_FadeOut(0.03)
		Wait
	}
}

ACTOR ShadowGhostD : ShadowGhostA
{
	States
	{
	Spawn:
		SHDW D 1 A_FadeOut(0.03)
		Wait
	}
}

ACTOR Shadowtorso
{
	Radius 12
	Height 15
	Speed 1
	Mass 5000
	RenderStyle "Translucent"
	alpha 0.7
	+Doombounce
      States
	{
	Spawn:
         SHDW QRS 5
         SHDW T 5 A_Fall
         SHDW U 5
         SHDW V 300
         SHDW VVVVVVVVVVVV 2 A_FadeOut(0.1)
         Stop
	}
}

actor ShadowTrail
{
    Radius 1
    Height 1
    Speed 0
    PROJECTILE
    RENDERSTYLE ADD
    ALPHA 0.6
    +NOCLIP
    States
    {
    Spawn:
     SHTR ABCDEF 4 Bright
        Stop       
    }
}



//Blight
Actor Blight :  WoC_Skill {}

Actor UseBlight : Custominventory
{
	Inventory.MaxAmount 0
	+Inventory.AUTOACTIVATE
	states
	{
	Use:
		TNT1 A 0 A_RailAttack(0,0,0,"","",RGF_SILENT|RGF_NOPIERCING,999,"BlightFXRail",0,0,0,0,30,15,"BlightFXRail")
		TNT1 A 0 A_PlaySound("Necromancer/Blight/Fire")
		TNT1 A 0 A_FireBullets(0,0,1,0,"BlightPoisonSpawner",0)
		Stop
	}
}

Actor BlightInEffect : Inventory
{
	Inventory.MaxAmount 1
	+INVENTORY.UNDROPPABLE
}

Actor BlightTimer : Inventory
{
	Inventory.MaxAmount 10
	+INVENTORY.UNDROPPABLE
}

Actor BlightFXItem : Custominventory
{
	Inventory.MaxAmount 0
	+Inventory.AUTOACTIVATE
	states
	{
		Use:
		TNT1 A 0 A_SpawnItemEx("BlightFX", frandom(-16,16), frandom(-16,16), frandom(16,34), 0, 0, 0.5*frandom(2,5), 0, 128, 32)
		Stop
	}
}

Actor IAmBlighted : Inventory
{
	Inventory.MaxAmount 1
}

ACTOR BlightPoisonSpawner
{
    Radius 1
    PROJECTILE
    Speed 0
    Damage 0
	+PUFFGETSOWNER
    +BLOODLESSIMPACT
    +CEILINGHUGGER
    +SPAWNCEILING
    +PAINLESS
    +THRUACTORS
    +NOCLIP
	+NOBLOCKMAP
	+NOGRAVITY
	+PUFFONACTORS
	+ALWAYSPUFF
	+DONTSPLASH
	+MTHRUSPECIES
	+HITTRACER
    RenderStyle None
    States
    {
    Spawn:
		TNT1 A 0
		TNT1 A 0 ACS_NamedExecuteWithResult("WOC DAMAGE OVER TIME", ACS_ExecuteWithResult(WOC_DECORATE,STATS,WOCTID,WOCTRACER), ACS_NamedExecuteWithResult("WOC Player Scale", 60, INTELLECT, ABIL_BLIGHT, WOCTARGET), 10, POISONDOT)
	Looper:
		TNT1 A 1
		TNT1 A 0 A_JumpIfInventory("WhoBlightedMe",4+ACS_ExecuteWithResult(WOC_DECORATE,NECROMANCERSKILLS,ABIL_BLIGHT,WOCTARGET),4)
		TNT1 A 2 A_SpawnItemEx("BlightPoison",frandom(-50,50),frandom(-50,50),frandom(-12,12),0,0,0,frandom(1,360),32,0)
		TNT1 A 2 A_SpawnItemEx("BlightPoison",frandom(-50,50),frandom(-50,50),frandom(-12,12),0,0,0,frandom(1,360),32,0)
		TNT1 A 0 A_GiveInventory("WhoBlightedMe",1)
		Loop
		TNT1 A 0
		Stop
    }
}

ACTOR BlightPoison
{
    Height 3
    Radius 2
    Speed 0
    Alpha 0.80
    Scale 0.55
    RenderStyle Add
    DamageType "Poison"
    PROJECTILE
    +RIPPER
    +BLOODLESSIMPACT
    +NODAMAGETHRUST +DONTBLAST
    +DONTBLAST
	+NOINTERACTION
	+NOCLIP
	+FORCERADIUSDMG
    States
    {
    Spawn:
		BLHS A 0
		BLHS A 0 A_JumpIfInTargetInventory("IsPlaguebringer",1,"Plaguebringer")
		BLHS A 0 Bright A_Explode(ACS_NamedExecuteWithResult("WOC Player Scale", 15, INTELLECT, ABIL_BLIGHT, WOCTARGET),20,0)
		BLHS A 0 Bright A_Jump(230,3,7,11,15,19,23,27)
		BLHS ABCDEFGHIJKLMNOPQRSTUVWXYZ 3 Bright A_FadeOut(0.03)
		BLHZ ABC 3 Bright A_FadeOut(0.03)
		Stop
	PlagueBringer:
		BLHS A 0 Bright A_Explode(ACS_NamedExecuteWithResult("WOC Player Scale", 15, INTELLECT, ABIL_BLIGHT, WOCTARGET),30,0)
		BLHS A 0 Bright A_Jump(230,3,7,11,15,19,23,27)
		BLHS ABCDEFGHIJKLMNOPQRSTUVWXYZ 3 Bright A_FadeOut(0.03)
		BLHZ ABC 3 Bright A_FadeOut(0.03)
		Stop
    }
}

ACTOR BlightFXRail
{
	Height 3
    Radius 2
    Projectile
	+NOCLIP
	+CLIENTSIDEONLY
	+BLOODLESSIMPACT
    Scale 0.25
    RenderStyle Add
    Alpha 0.75
    States
    {
    Spawn:
		TNT1 A 0
		BLHS A 0 Bright A_Jump(230,3,7,11,15,19,23,27)
		BLHS ABCDEFGHIJKLMNOPQRSTUVWXYZ 3 Bright A_FadeOut(0.03)
		BLHZ ABC 3 Bright A_FadeOut(0.03)
		Stop
    }
}

ACTOR BlightFX
{
    Projectile
	+NOCLIP
	+CLIENTSIDEONLY
    Scale 0.35
    RenderStyle Add
    Alpha 0.75
    States
    {
    Spawn:
	TNT1 A 0
	TNT1 A 0 A_Jump(256,1,2,3,4)
	BCFX BCDEFGHIJKLMN 3 A_FadeOut(0.06)
	Stop
    }
}

Actor WhoBlightedMe : Inventory
{
	Inventory.MaxAmount 32
}

Actor Terrify :  WoC_Skill {}

Actor TerrifyEffectItem : Custominventory
{
	Inventory.MaxAmount 0
	+Inventory.AUTOACTIVATE
	states
	{
		Use:
		TNT1 AAA 0 A_SpawnItemEx("TerrifyEffectPuff", frandom(-16,16), frandom(-16,16), frandom(height/2-8,height/2+8), 0, 0, 0.5*frandom(2,5), 0, 0, 0)
		Stop
	}
}

Actor TerrifyPuffGiver : Custominventory
{
	Inventory.MaxAmount 0
	+Inventory.AUTOACTIVATE
	states
	{
	Use:
		TNT1 A 0 A_SpawnItemEx("TerrifyBulletPuff",0,0,32)
		Stop
	}
}

Actor TerrifyEffectPuff
{
	Projectile
	+NOCLIP
    RenderStyle Add
	Scale 0.67
    States
    {
    Spawn:
	SKP2 ABCDEF 3 Bright
	Stop
    }
}

Actor UseTerrify : Custominventory
{
	Inventory.MaxAmount 0
	+Inventory.AUTOACTIVATE
	states
	{
	Use:
		TNT1 A 0 A_FireCustomMissile ("TerrifyCurseProjectile",0,0)
		Stop
	}
}

Actor TerrifyHitscan : Custominventory
{
	Inventory.MaxAmount 0
	+Inventory.AUTOACTIVATE
	states
	{
	Use:
		TNT1 A 0 A_FireBullets(0,0,1,0,"TerrifyBulletPuff",0)
		Stop
	}
}

Actor TerrifyBulletPuff
{
	Mass 5
	+NOBLOCKMAP
	+NOGRAVITY
	+ALWAYSPUFF
	+PUFFONACTORS
	+BLOODLESSIMPACT
	+MTHRUSPECIES
	States
	{
	Spawn:
		TNT1 CCCCCCCCCCC 0 bright A_SpawnItemEx("TerrifyBoom", 0, 0, 0, 0, 0, 0, 0, 160, 0)
		TNT1 CCCCCCCCCCC 0 bright A_SpawnItemEx("TerrifyBoom", 0, 0, 0, 0, 0, 0, 0, 160, 0)
		TNT1 CCCCCCCCCCC 0 bright A_SpawnItemEx("TerrifyBoom", 0, 0, 0, 0, 0, 0, 0, 160, 0)
		TNT1 CCCCCCCCCCC 0 bright A_SpawnItemEx("TerrifyBoom", 0, 0, 0, 0, 0, 0, 0, 160, 0)
		TNT1 A 1
		Stop
	}
}

Actor TerrifyCurseProjectile
{
	Radius 6
	Height 8
	Speed 25
	damage (0)
	Decal "BaronScorch"
	Renderstyle Add
	Projectile
	+RANDOMIZE
	+HITTRACER
	+MTHRUSPECIES +NODAMAGETHRUST +DONTBLAST
	+DONTREFLECT
	states
	{
	Spawn:
		TNT1 A 1
		TNT1 AAA 0 A_SpawnItemEx ("TerrifyEffectPuff2", 0, random (1,-1), random (1,-1), 0, 0, 0, 0, 160)
		loop
	Death:
		TNT1 CCCCCCCCCCC 0 bright A_SpawnItemEx("TerrifyBoom", 0, 0, 0, 0, 0, 0, 0, 160, 0)
			TNT1 CCCCCCCCCCC 0 bright A_SpawnItemEx("TerrifyBoom", 0, 0, 0, 0, 0, 0, 0, 160, 0)
			TNT1 CCCCCCCCCCC 0 bright A_SpawnItemEx("TerrifyBoom", 0, 0, 0, 0, 0, 0, 0, 160, 0)
			TNT1 CCCCCCCCCCC 0 bright A_SpawnItemEx("TerrifyBoom", 0, 0, 0, 0, 0, 0, 0, 160, 0)
		TNT1 A 0 A_JumpIfInTargetInventory("IsHarvester", 1, "Harvester")
		TNT1 A 15 ACS_ExecuteAlways(WOC_CASTTERRIFY, 0, 0, 0, ACS_ExecuteWithResult(WOC_DECORATE,NECROMANCERSKILLS,ABIL_TERRIFY,WOCTARGET)*10+ACS_ExecuteWithResult(WOC_DECORATE,STATS,WISDOM,WOCTARGET)/10)
		stop
	Harvester:
		TNT1 A 0 ACS_ExecuteAlways(WOC_CASTTERRIFY, 0, 0, 0, ACS_ExecuteWithResult(WOC_DECORATE,NECROMANCERSKILLS,ABIL_TERRIFY,WOCTARGET)*10+ACS_ExecuteWithResult(WOC_DECORATE,STATS,WISDOM,WOCTARGET)/10)
		TNT1 A 15 A_GiveInventory("TerrifyAOEGiver")
		stop
	}
}

actor TerrifyBoom
{
  radius 0
  height 1
  speed 0
  damage 0
  renderstyle Add
  alpha 0.75
  PROJECTILE
  -RANDOMIZE
  Scale 0.5
  +DONTSPLASH
   +NOINTERACTION
  +CLIENTSIDEONLY
  +NOCLIP
  +RIPPER
  +BLOODLESSIMPACT
  +PAINLESS
  states
  {
  Spawn:
    TNT1 A 0 
    TNT1 A 0 A_CustomMissile("TerrifyEffectPuff2",0,0,frandom(-180,180),2,frandom(-180,180))
    TNT1 A 2 A_CustomMissile("TerrifyEffectPuff2",0,0,frandom(-180,180),2,frandom(-180,180))
    stop
  Death:
    TNT1 A 3 
    stop
  }
}

ACTOR TerrifyEffectPuff2
{
    Projectile
	Speed 6
	+PAINLESS
	+NOCLIP
	+NOINTERACTION
	+CLIENTSIDEONLY
	+DONTSPLASH
    RenderStyle Add
	Alpha 0.6
	Scale 0.4
    States
    {
    Spawn:
	SKP2 ABCDEF 1 Bright
	Stop
    }
}

Actor TerrifyDuration : Inventory { Inventory.MaxAmount 0x7fffffff }

Actor TerrifyAOEGiver : CustomInventory
{
	Inventory.MaxAmount 0
	+INVENTORY.AUTOACTIVATE
	Inventory.Icon "TNT1A0"
	States
	{
	Use:
		TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(WOC_DECORATE,STATS,PLAYERNUM,WOCTARGET) == 32,"Use32")
		TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(WOC_DECORATE,STATS,PLAYERNUM,WOCTARGET) == 31,"Use31")
		TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(WOC_DECORATE,STATS,PLAYERNUM,WOCTARGET) == 30,"Use30")
		TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(WOC_DECORATE,STATS,PLAYERNUM,WOCTARGET) == 29,"Use29")
		TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(WOC_DECORATE,STATS,PLAYERNUM,WOCTARGET) == 28,"Use28")
		TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(WOC_DECORATE,STATS,PLAYERNUM,WOCTARGET) == 27,"Use27")
		TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(WOC_DECORATE,STATS,PLAYERNUM,WOCTARGET) == 26,"Use26")
		TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(WOC_DECORATE,STATS,PLAYERNUM,WOCTARGET) == 25,"Use25")
		TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(WOC_DECORATE,STATS,PLAYERNUM,WOCTARGET) == 24,"Use24")
		TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(WOC_DECORATE,STATS,PLAYERNUM,WOCTARGET) == 23,"Use23")
		TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(WOC_DECORATE,STATS,PLAYERNUM,WOCTARGET) == 22,"Use22")
		TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(WOC_DECORATE,STATS,PLAYERNUM,WOCTARGET) == 21,"Use21")
		TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(WOC_DECORATE,STATS,PLAYERNUM,WOCTARGET) == 20,"Use20")
		TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(WOC_DECORATE,STATS,PLAYERNUM,WOCTARGET) == 19,"Use19")
		TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(WOC_DECORATE,STATS,PLAYERNUM,WOCTARGET) == 18,"Use18")
		TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(WOC_DECORATE,STATS,PLAYERNUM,WOCTARGET) == 17,"Use17")
		TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(WOC_DECORATE,STATS,PLAYERNUM,WOCTARGET) == 16,"Use16")
		TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(WOC_DECORATE,STATS,PLAYERNUM,WOCTARGET) == 15,"Use15")
		TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(WOC_DECORATE,STATS,PLAYERNUM,WOCTARGET) == 14,"Use14")
		TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(WOC_DECORATE,STATS,PLAYERNUM,WOCTARGET) == 13,"Use13")
		TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(WOC_DECORATE,STATS,PLAYERNUM,WOCTARGET) == 12,"Use12")
		TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(WOC_DECORATE,STATS,PLAYERNUM,WOCTARGET) == 11,"Use11")
		TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(WOC_DECORATE,STATS,PLAYERNUM,WOCTARGET) == 10,"Use10")
		TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(WOC_DECORATE,STATS,PLAYERNUM,WOCTARGET) == 9,"Use9")
		TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(WOC_DECORATE,STATS,PLAYERNUM,WOCTARGET) == 8,"Use8")
		TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(WOC_DECORATE,STATS,PLAYERNUM,WOCTARGET) == 7,"Use7")
		TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(WOC_DECORATE,STATS,PLAYERNUM,WOCTARGET) == 6,"Use6")
		TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(WOC_DECORATE,STATS,PLAYERNUM,WOCTARGET) == 5,"Use5")
		TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(WOC_DECORATE,STATS,PLAYERNUM,WOCTARGET) == 4,"Use4")
		TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(WOC_DECORATE,STATS,PLAYERNUM,WOCTARGET) == 3,"Use3")
		TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(WOC_DECORATE,STATS,PLAYERNUM,WOCTARGET) == 2,"Use2")
		TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(WOC_DECORATE,STATS,PLAYERNUM,WOCTARGET) == 1,"Use1")
		TNT1 A 0 A_RadiusGive("TerrifyAOE0", 128, RGF_MONSTERS)
		Stop
		Use1: TNT1 A 0 A_RadiusGive("TerrifyAOE1", 128, RGF_MONSTERS) Stop
		Use2: TNT1 A 0 A_RadiusGive("TerrifyAOE2", 128, RGF_MONSTERS) Stop
		Use3: TNT1 A 0 A_RadiusGive("TerrifyAOE3", 128, RGF_MONSTERS) Stop
		Use4: TNT1 A 0 A_RadiusGive("TerrifyAOE4", 128, RGF_MONSTERS) Stop
		Use5: TNT1 A 0 A_RadiusGive("TerrifyAOE5", 128, RGF_MONSTERS) Stop
		Use6: TNT1 A 0 A_RadiusGive("TerrifyAOE6", 128, RGF_MONSTERS) Stop
		Use7: TNT1 A 0 A_RadiusGive("TerrifyAOE7", 128, RGF_MONSTERS) Stop
		Use8: TNT1 A 0 A_RadiusGive("TerrifyAOE8", 128, RGF_MONSTERS) Stop
		Use9: TNT1 A 0 A_RadiusGive("TerrifyAOE9", 128, RGF_MONSTERS) Stop
		
		Use10: TNT1 A 0 A_RadiusGive("TerrifyAOE10", 128, RGF_MONSTERS) Stop
		Use11: TNT1 A 0 A_RadiusGive("TerrifyAOE11", 128, RGF_MONSTERS) Stop
		Use12: TNT1 A 0 A_RadiusGive("TerrifyAOE12", 128, RGF_MONSTERS) Stop
		Use13: TNT1 A 0 A_RadiusGive("TerrifyAOE13", 128, RGF_MONSTERS) Stop
		Use14: TNT1 A 0 A_RadiusGive("TerrifyAOE14", 128, RGF_MONSTERS) Stop
		Use15: TNT1 A 0 A_RadiusGive("TerrifyAOE15", 128, RGF_MONSTERS) Stop
		Use16: TNT1 A 0 A_RadiusGive("TerrifyAOE16", 128, RGF_MONSTERS) Stop
		Use17: TNT1 A 0 A_RadiusGive("TerrifyAOE17", 128, RGF_MONSTERS) Stop
		Use18: TNT1 A 0 A_RadiusGive("TerrifyAOE18", 128, RGF_MONSTERS) Stop
		Use19: TNT1 A 0 A_RadiusGive("TerrifyAOE19", 128, RGF_MONSTERS) Stop
		
		Use20: TNT1 A 0 A_RadiusGive("TerrifyAOE20", 128, RGF_MONSTERS) Stop
		Use21: TNT1 A 0 A_RadiusGive("TerrifyAOE21", 128, RGF_MONSTERS) Stop
		Use22: TNT1 A 0 A_RadiusGive("TerrifyAOE22", 128, RGF_MONSTERS) Stop
		Use23: TNT1 A 0 A_RadiusGive("TerrifyAOE23", 128, RGF_MONSTERS) Stop
		Use24: TNT1 A 0 A_RadiusGive("TerrifyAOE24", 128, RGF_MONSTERS) Stop
		Use25: TNT1 A 0 A_RadiusGive("TerrifyAOE25", 128, RGF_MONSTERS) Stop
		Use26: TNT1 A 0 A_RadiusGive("TerrifyAOE26", 128, RGF_MONSTERS) Stop
		Use27: TNT1 A 0 A_RadiusGive("TerrifyAOE27", 128, RGF_MONSTERS) Stop
		Use28: TNT1 A 0 A_RadiusGive("TerrifyAOE28", 128, RGF_MONSTERS) Stop
		Use29: TNT1 A 0 A_RadiusGive("TerrifyAOE29", 128, RGF_MONSTERS) Stop
		Use30: TNT1 A 0 A_RadiusGive("TerrifyAOE30", 128, RGF_MONSTERS) Stop
		Use31: TNT1 A 0 A_RadiusGive("TerrifyAOE31", 128, RGF_MONSTERS) Stop
		Use32: TNT1 A 0 A_RadiusGive("TerrifyAOE32", 128, RGF_MONSTERS) Stop
	}
}
//, 128, RGF_MONSTERS)
Actor TerrifyAOE0 : CustomInventory
{
	Inventory.MaxAmount 0
	+AUTOACTIVATE
	+ALWAYSPICKUP
	Inventory.PickupSound "pickup/health"
	Inventory.PickupMessage "NATURE'S SALVE" // "QUARTZ FLASK"
	var int user_Amount;
	States
	{
	Use:
		TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(WOC_DECORATE,STATS,ISFRIENDLY,ACTIVATOR) == 0, "Healing")
		Stop
	Healing:
		TNT1 A 0 ACS_ExecuteAlways(WOC_CASTTERRIFY,0,0,1,0)
		Stop
	}
}

Actor TerrifyAOE1 : TerrifyAOE0 { States { Healing: TNT1 A 0 ACS_ExecuteAlways(WOC_CASTTERRIFY,0,1,1,0) Stop } }
Actor TerrifyAOE2 : TerrifyAOE0 { States { Healing: TNT1 A 0 ACS_ExecuteAlways(WOC_CASTTERRIFY,0,2,1,0) Stop } }
Actor TerrifyAOE3 : TerrifyAOE0 { States { Healing: TNT1 A 0 ACS_ExecuteAlways(WOC_CASTTERRIFY,0,3,1,0) Stop } }
Actor TerrifyAOE4 : TerrifyAOE0 { States { Healing: TNT1 A 0 ACS_ExecuteAlways(WOC_CASTTERRIFY,0,4,1,0) Stop } }
Actor TerrifyAOE5 : TerrifyAOE0 { States { Healing: TNT1 A 0 ACS_ExecuteAlways(WOC_CASTTERRIFY,0,5,1,0) Stop } }
Actor TerrifyAOE6 : TerrifyAOE0 { States { Healing: TNT1 A 0 ACS_ExecuteAlways(WOC_CASTTERRIFY,0,6,1,0) Stop } }
Actor TerrifyAOE7 : TerrifyAOE0 { States { Healing: TNT1 A 0 ACS_ExecuteAlways(WOC_CASTTERRIFY,0,7,1,0) Stop } }
Actor TerrifyAOE8 : TerrifyAOE0 { States { Healing: TNT1 A 0 ACS_ExecuteAlways(WOC_CASTTERRIFY,0,8,1,0) Stop } }
Actor TerrifyAOE9 : TerrifyAOE0 { States { Healing: TNT1 A 0 ACS_ExecuteAlways(WOC_CASTTERRIFY,0,9,1,0) Stop } }

Actor TerrifyAOE10 : TerrifyAOE0 { States { Healing: TNT1 A 0 ACS_ExecuteAlways(WOC_CASTTERRIFY,0,10,1,0) Stop } }
Actor TerrifyAOE11 : TerrifyAOE0 { States { Healing: TNT1 A 0 ACS_ExecuteAlways(WOC_CASTTERRIFY,0,11,1,0) Stop } }
Actor TerrifyAOE12 : TerrifyAOE0 { States { Healing: TNT1 A 0 ACS_ExecuteAlways(WOC_CASTTERRIFY,0,12,1,0) Stop } }
Actor TerrifyAOE13 : TerrifyAOE0 { States { Healing: TNT1 A 0 ACS_ExecuteAlways(WOC_CASTTERRIFY,0,13,1,0) Stop } }
Actor TerrifyAOE14 : TerrifyAOE0 { States { Healing: TNT1 A 0 ACS_ExecuteAlways(WOC_CASTTERRIFY,0,14,1,0) Stop } }
Actor TerrifyAOE15 : TerrifyAOE0 { States { Healing: TNT1 A 0 ACS_ExecuteAlways(WOC_CASTTERRIFY,0,15,1,0) Stop } }
Actor TerrifyAOE16 : TerrifyAOE0 { States { Healing: TNT1 A 0 ACS_ExecuteAlways(WOC_CASTTERRIFY,0,16,1,0) Stop } }
Actor TerrifyAOE17 : TerrifyAOE0 { States { Healing: TNT1 A 0 ACS_ExecuteAlways(WOC_CASTTERRIFY,0,17,1,0) Stop } }
Actor TerrifyAOE18 : TerrifyAOE0 { States { Healing: TNT1 A 0 ACS_ExecuteAlways(WOC_CASTTERRIFY,0,18,1,0) Stop } }
Actor TerrifyAOE19 : TerrifyAOE0 { States { Healing: TNT1 A 0 ACS_ExecuteAlways(WOC_CASTTERRIFY,0,19,1,0) Stop } }

Actor TerrifyAOE20 : TerrifyAOE0 { States { Healing: TNT1 A 0 ACS_ExecuteAlways(WOC_CASTTERRIFY,0,20,1,0) Stop } }
Actor TerrifyAOE21 : TerrifyAOE0 { States { Healing: TNT1 A 0 ACS_ExecuteAlways(WOC_CASTTERRIFY,0,21,1,0) Stop } }
Actor TerrifyAOE22 : TerrifyAOE0 { States { Healing: TNT1 A 0 ACS_ExecuteAlways(WOC_CASTTERRIFY,0,22,1,0) Stop } }
Actor TerrifyAOE23 : TerrifyAOE0 { States { Healing: TNT1 A 0 ACS_ExecuteAlways(WOC_CASTTERRIFY,0,23,1,0) Stop } }
Actor TerrifyAOE24 : TerrifyAOE0 { States { Healing: TNT1 A 0 ACS_ExecuteAlways(WOC_CASTTERRIFY,0,24,1,0) Stop } }
Actor TerrifyAOE25 : TerrifyAOE0 { States { Healing: TNT1 A 0 ACS_ExecuteAlways(WOC_CASTTERRIFY,0,25,1,0) Stop } }
Actor TerrifyAOE26 : TerrifyAOE0 { States { Healing: TNT1 A 0 ACS_ExecuteAlways(WOC_CASTTERRIFY,0,26,1,0) Stop } }
Actor TerrifyAOE27 : TerrifyAOE0 { States { Healing: TNT1 A 0 ACS_ExecuteAlways(WOC_CASTTERRIFY,0,27,1,0) Stop } }
Actor TerrifyAOE28 : TerrifyAOE0 { States { Healing: TNT1 A 0 ACS_ExecuteAlways(WOC_CASTTERRIFY,0,28,1,0) Stop } }
Actor TerrifyAOE29 : TerrifyAOE0 { States { Healing: TNT1 A 0 ACS_ExecuteAlways(WOC_CASTTERRIFY,0,29,1,0) Stop } }

Actor TerrifyAOE30 : TerrifyAOE0 { States { Healing: TNT1 A 0 ACS_ExecuteAlways(WOC_CASTTERRIFY,0,30,1,0) Stop } }
Actor TerrifyAOE31 : TerrifyAOE0 { States { Healing: TNT1 A 0 ACS_ExecuteAlways(WOC_CASTTERRIFY,0,31,1,0) Stop } }
Actor TerrifyAOE32 : TerrifyAOE0 { States { Healing: TNT1 A 0 ACS_ExecuteAlways(WOC_CASTTERRIFY,0,32,1,0) Stop } }

Actor SummonGhoul : WoC_Skill {}

Actor UseSummonGhoul : CustomInventory
{
	Inventory.MaxAmount 0
	+Inventory.AUTOACTIVATE
	states
	{
	Use:
		TNT1 A 0 A_SpawnItemEx("NecromancerGhoul", 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, SXF_NOCHECKPOSITION|SXF_SETMASTER, 0, PET2TID+ACS_ExecuteWithResult(WOC_DECORATE,STATS,PLAYERNUM))
		Stop
	}
}

ACTOR NecromancerGhoul : WoC_FriendlyMon
{ 
Health 250 
PainChance 24
Speed 9 
Radius 16 
Height 56 
Mass 320
Meleerange 52
MONSTER
BloodColor "20 60 20"
+FLOORCLIP
+DONTHURTSPECIES
Species "Player"
+THRUSPECIES
+FRIENDLY
+QUICKTORETALIATE
-COUNTKILL
-ACTIVATEMCROSS
-NOTELEPORT
+NOBLOCKMONST
/*+NODAMAGETHRUST*/ +DONTBLAST
+NOICEDEATH
+NEVERRESPAWN
+NEVERFAST
+DONTHARMSPECIES
RadiusDamageFactor 0.25
Obituary "A Ghoul poisoned %o with it's toxic projectiles."
HitObituary "%o was beaten to death by a ghoul."
SeeSound "monster/ghlsit" 
PainSound "monster/ghlpai" 
DeathSound "monster/ghldth" 
ActiveSound "monster/ghlact"
Damagetype "Physical"
DamageFactor "Poison", 0.5
DamageFactor "PoisonTime", 0.5
DamageFactor "Holy", 1.5
DamageFactor "HolyTime", 1.5
States 
   { 
   Spawn:
	    GHUL A 0
		GHUL A 0 A_SpawnItemEx("NewMinotaurSmoke")
		GHUL A 0 A_PlaySound("monster/ghlsit")
		GHUL A 0 ACS_ExecuteAlways(WOC_MINIONREGEN)
		GHUL A 0 ACS_ExecuteAlways(900,0,62)
	Idle:
       GHUL AB 10 A_Look 
       Goto See 
   See:
	   GHUL A 0 A_UnSetInvulnerable
	   GHUL A 0 A_JumpIfTargetinLOS(2, 140)
	   GHUL A 0 A_Jump(50, "Giveup")
       GHUL AABBCCDD 2 A_Chase 
       Loop 
   Giveup:
	   GHUL A 0 A_ClearTarget
	   Goto See
   Melee:
	   GHUL A 0 A_SpawnItemEx("PetAlert")
	   GHUL A 0 A_UnSetInvulnerable
       GHUL E 0 A_Jump(128,6)
       GHUL E 6 A_FaceTarget
       GHUL F 0 A_PlaySound("Necromancer/Ghoul/Swing")
       GHUL F 6 A_FaceTarget
	   GHUL T 0 A_CustomMissile("NecroGhoulTaunt")
       GHUL G 5 A_CustomMeleeAttack(ACS_NamedExecuteWithResult("WOC Player Scale", FRandom(35,55), CHARISMA, ABIL_SUMMONGHOUL, ACTIVATOR),"Necromancer/Ghoul/Hit")
       Goto See
       GHUL R 6 A_FaceTarget
       GHUL S 0 A_PlaySound("Necromancer/Ghoul/Swing")
       GHUL S 6 A_FaceTarget
	   GHUL T 0 A_CustomMissile("NecroGhoulTaunt")
       GHUL T 5 A_CustomMeleeAttack(ACS_NamedExecuteWithResult("WOC Player Scale", FRandom(35,55), CHARISMA, ABIL_SUMMONGHOUL, ACTIVATOR),"Necromancer/Ghoul/Hit", "none")
       Goto See
   Missile:
	   GHUL A 0 A_SpawnItemEx("PetAlert")
       GHUL A 0 A_UnSetInvulnerable
	   GHUL Q 0 A_JumpIfCloser(178, "PoisonNovaMissile")
	   GHUL Q 0 A_CheckFloor(2)
	   GHUL Q 0 A_Jump(256, "See")
	   GHUL Q 0 A_JumpIfCloser(450, "GhoulCharge")
	   GHUL Q 0 A_JumpIfInventory("SummonGhoul", 7, 2)
	   GHUL Q 0 A_Jump(256, "See")
       GHUL Q 10 A_FaceTarget 
       GHUL Q 0 A_CustomMissile ("NecroGhoulShot",44,-16,0,0,0)
       GHUL Q 8 A_CustomMissile ("NecroGhoulShot",44,16,0,0,0)
       Goto See
   PoisonNovaMissile:
       GHUL A 0 A_UnSetInvulnerable
	   GHUL Q 0 A_JumpIfInventory("SummonGhoul", 4, 1)
	   Goto GhoulCharge
       GHUL Q 10 A_FaceTarget 
       GHUL Q 8 A_CustomMissile ("NecroGhoulPoisonNovaSpawner",44,16,0,0,0)
       Goto See
   GhoulCharge:
        GHUL A 0 A_SetInvulnerable
		GHUL A 3 A_FaceTarget
		GHUL A 0 A_SkullAttack
		GHUL A 0 A_PlaySound("monster/ghlswg")
		GHUL AAAAA 4 A_SpawnItemEx("NecroGhoulGhostTrail",0,0,0,0,0,0,0,128,0)
		GHUL A 0 A_Gravity
		GHUL A 0 A_Stop
		Goto See
   Pain: 
	   GHUL A 0 A_UnSetInvulnerable
       GHUL H 2 
       GHUL H 2 A_Pain 
       Goto See 
   Death: 
       GHUL I 5
       GHUL J 5 A_Scream 
       GHUL K 5 
       GHUL L 5 A_NoBlocking 
       GHUL M 5 
       GHUL N 5
       GHUL O 5
       GHUL P 300
	   GHUL PPPPPPPPPP 2 A_FadeOut(0.1)
       Stop 
   } 
}

ACTOR NecroGhoulGhostTrail
{
	Radius 16
	Height 56
	Speed 1
	Damage 0
	RenderStyle Translucent
	Alpha 1
	PROJECTILE
	+CLIENTSIDEONLY
	+DONTSPLASH
    +NOINTERACTION
	states
	{
	Spawn:
        GHUL A 0
		GHUL A 1 A_FadeOut(0.10)
		goto Spawn+1
	}
}

ACTOR NecroGhoulPoisonNovaSpawner
{
    PROJECTILE
    +NODAMAGETHRUST +DONTBLAST
	+RIPPER
	+BLOODLESSIMPACT
	+FLOORHUGGER
	+DONTBLAST
	+FORCERADIUSDMG
    Speed 0
    Damage 0
    Radius 10
    Height 14
    RenderStyle Add
	Damagetype "PoisonPlayer"
    States
    {
    Spawn:
	TNT1 AA 0 A_CustomMissile("PoisonNovaExplosion",0,0,0,6,0)
	TNT1 A 0 A_CustomMissile("PoisonNovaExplosion",0,0,8,6,0)
	TNT1 A 0 A_CustomMissile("PoisonNovaExplosion",0,0,16,6,0)
	TNT1 A 0 A_CustomMissile("PoisonNovaExplosion",0,0,24,6,0)
	TNT1 A 0 A_CustomMissile("PoisonNovaExplosion",0,0,32,6,0)
	TNT1 A 0 A_CustomMissile("PoisonNovaExplosion",0,0,40,6,0)
	TNT1 A 0 A_CustomMissile("PoisonNovaExplosion",0,0,48,6,0)
	TNT1 A 0 A_CustomMissile("PoisonNovaExplosion",0,0,56,6,0)
	TNT1 A 0 A_CustomMissile("PoisonNovaExplosion",0,0,64,6,0)
	TNT1 A 0 A_CustomMissile("PoisonNovaExplosion",0,0,72,6,0)
	TNT1 A 0 A_CustomMissile("PoisonNovaExplosion",0,0,80,6,0)
	TNT1 A 0 A_CustomMissile("PoisonNovaExplosion",0,0,88,6,0)
	TNT1 A 0 A_CustomMissile("PoisonNovaExplosion",0,0,96,6,0)
	TNT1 A 0 A_CustomMissile("PoisonNovaExplosion",0,0,104,6,0)
	TNT1 A 0 A_CustomMissile("PoisonNovaExplosion",0,0,112,6,0)
	TNT1 A 0 A_CustomMissile("PoisonNovaExplosion",0,0,120,6,0)
	TNT1 A 0 A_CustomMissile("PoisonNovaExplosion",0,0,128,6,0)
	TNT1 A 0 A_CustomMissile("PoisonNovaExplosion",0,0,136,6,0)
	TNT1 A 0 A_CustomMissile("PoisonNovaExplosion",0,0,144,6,0)
	TNT1 A 0 A_CustomMissile("PoisonNovaExplosion",0,0,152,6,0)
	TNT1 A 0 A_CustomMissile("PoisonNovaExplosion",0,0,160,6,0)
	TNT1 A 0 A_CustomMissile("PoisonNovaExplosion",0,0,168,6,0)
	TNT1 A 0 A_CustomMissile("PoisonNovaExplosion",0,0,176,6,0)
	TNT1 A 0 A_CustomMissile("PoisonNovaExplosion",0,0,184,6,0)
	TNT1 A 0 A_CustomMissile("PoisonNovaExplosion",0,0,192,6,0)
	TNT1 A 0 A_CustomMissile("PoisonNovaExplosion",0,0,200,6,0)
	TNT1 A 0 A_CustomMissile("PoisonNovaExplosion",0,0,208,6,0)
	TNT1 A 0 A_CustomMissile("PoisonNovaExplosion",0,0,216,6,0)
	TNT1 A 0 A_CustomMissile("PoisonNovaExplosion",0,0,224,6,0)
	TNT1 A 0 A_CustomMissile("PoisonNovaExplosion",0,0,232,6,0)
	TNT1 A 0 A_CustomMissile("PoisonNovaExplosion",0,0,240,6,0)
	TNT1 A 0 A_CustomMissile("PoisonNovaExplosion",0,0,248,6,0)
	TNT1 A 0 A_CustomMissile("PoisonNovaExplosion",0,0,256,6,0)
	TNT1 A 0 A_CustomMissile("PoisonNovaExplosion",0,0,264,6,0)
	TNT1 A 0 A_CustomMissile("PoisonNovaExplosion",0,0,272,6,0)
	TNT1 A 0 A_CustomMissile("PoisonNovaExplosion",0,0,280,6,0)
	TNT1 A 0 A_CustomMissile("PoisonNovaExplosion",0,0,288,6,0)
	TNT1 A 0 A_CustomMissile("PoisonNovaExplosion",0,0,296,6,0)
	TNT1 A 0 A_CustomMissile("PoisonNovaExplosion",0,0,304,6,0)
	TNT1 A 0 A_CustomMissile("PoisonNovaExplosion",0,0,312,6,0)
	TNT1 A 0 A_CustomMissile("PoisonNovaExplosion",0,0,320,6,0)
	TNT1 A 0 A_CustomMissile("PoisonNovaExplosion",0,0,328,6,0)
	TNT1 A 0 A_CustomMissile("PoisonNovaExplosion",0,0,336,6,0)
	TNT1 A 0 A_CustomMissile("PoisonNovaExplosion",0,0,344,6,0)
	TNT1 A 0 A_CustomMissile("PoisonNovaExplosion",0,0,352,6,0)
	TNT1 A 0 A_PlaySound("Necromancer/PoisonNova/Fire")
	TNT1 AAAAAAAAAAAAAAAAAAAA 1 A_Explode(ACS_NamedExecuteWithResult("WOC Player Scale", 6, CHARISMA, ABIL_SUMMONGHOUL, WOCTARGET),175,0)
	TNT1 A 15
	Stop
	Death:
	TNT1 A 1
	Stop
    }
}


ACTOR NecroGhoulTaunt
{
    PROJECTILE
    +NODAMAGETHRUST +DONTBLAST
	+RIPPER
	+BLOODLESSIMPACT
	+FLOORHUGGER
	+PAINLESS
	+FORCERADIUSDMG
    Speed 0
    Damage 0
    Radius 5
    Height 5
    RenderStyle Add
	Damagetype "ShadowPlayer"
    States
    {
    Spawn:
	TNT1 A 0
	TNT1 A 1 A_Explode(1,175,0)
	Stop
	Death:
	TNT1 A 1
	Stop
    }
}

ACTOR NecroGhoulShot
{
	Radius 6
	Height 8
	Speed 21
	Damage (ACS_NamedExecuteWithResult("WOC Player Scale", FRandom(5,10), CHARISMA, ABIL_SUMMONGHOUL, WOCTARGET))
	RENDERSTYLE ADD
	PROJECTILE
	+FORCEXYBILLBOARD
	+MTHRUSPECIES 
	+DONTBLAST
	+HITTRACER
	Seesound "Necromancer/Ghoul/Fire"
	DeathSound "Necromancer/Ghoul/Impact"
	DamageType "Poison"
	States
	{
	Spawn:
		FVUL AAABBB 1 Bright A_SpawnItemEx("CStaffTrail",0,0,0,0,0,0,0,128,0)
		loop
	Death:
		FVUL A 0 ACS_NamedExecuteWithResult("WOC DAMAGE OVER TIME", ACS_ExecuteWithResult(WOC_DECORATE,STATS,WOCTID,WOCTRACER), ACS_NamedExecuteWithResult("WOC Player Scale", FRandom(25,50), CHARISMA, ABIL_SUMMONGHOUL, WOCTARGET), 5, POISONDOT)
		FVUL CDEF 4 Bright
		stop
	}
}

Actor Darkness : Inventory
{
  +INVENTORY.UNDROPPABLE
  +FLOATBOB
  -INVENTORY.INVBAR
  +INVENTORY.PICKUPFLASH
  +INVENTORY.FANCYPICKUPSOUND
  Inventory.Icon "ARTICS"
  Inventory.PickupSound "misc/p_pkup"
  Inventory.PickupMessage "Darkness upgraded!"
  Inventory.MaxAmount 10
}

Actor UseDarkness : Custominventory
{
	Inventory.MaxAmount 0
	+Inventory.AUTOACTIVATE
	states
	{
		Use:
		TNT1 A 0 A_JumpIfInventory("Darkness", 7, 3)
		TNT1 A 0 A_JumpIfInventory("Darkness", 4, 3)
		TNT1 A 0 A_Jump(256, 3)
		TNT1 A 0 Bright A_FireCustomMissile ("DarknessSmokeProjectile2",frandom(-4,4),0)
		TNT1 A 0 Bright A_FireCustomMissile ("DarknessSmokeProjectile2",frandom(-4,4),0)
		TNT1 A 0 Bright A_FireCustomMissile ("DarknessSmokeProjectile",0,0)
		Stop
	}
}

ACTOR DarknessSmokeProjectile
{
   Radius 6
   Height 8
   Speed 15
   Damage (0)
   RENDERSTYLE ADD
   PROJECTILE
   +RIPPER
   +FORCEXYBILLBOARD
   +DOOMBOUNCE
   +BLOODLESSIMPACT
   +FORCERADIUSDMG
   -ALLOWBOUNCEONACTORS
   -BOUNCEONACTORS
   SeeSound "Necromancer/Darkness/Fire"
   BounceFactor 1.0
   BounceCount 7
   Damagetype "Shadow"
   States
   {
   Spawn:
	  TNT1 A 0 Bright A_Explode(ACS_NamedExecuteWithResult("WOC Player Scale", 4, INTELLECT, ABIL_DARKNESS, WOCTARGET),36,0,0,36)
	  TNT1 A 1 Bright A_SpawnItemEx("DarkNessSmoke", 0, random (-4, 4), random (-4, 4), 0, random (-2, 2), random (-2, 2), 0, 160)
      loop
   Death:
      TNT1 A 1 Bright
      stop
   }
}

Actor DarknessSmokeProjectile2 : DarknessSmokeProjectile
{
	States
	{
	Spawn:
		TNT1 A 0 Bright A_Explode(ACS_NamedExecuteWithResult("WOC Player Scale", 2, INTELLECT, ABIL_DARKNESS, WOCTARGET),36,0,0,36)
		TNT1 A 1 Bright A_SpawnItemEx("DarkNessSmoke", 0, random (-4, 4), random (-4, 4), 0, random (-2, 2), random (-2, 2), 0, 160)
		loop
	}
}

Actor DarkNessSmoke
{
  Radius 2
  Height 2
  +DONTSPLASH
   +NOINTERACTION
  -SOLID
  +NOCLIP
  +CLIENTSIDEONLY
  PROJECTILE
  RenderStyle Translucent
  Scale 1.5
  Alpha 0.5
  States
  {
  Spawn:
    TNT1 A 0
    TNT1 A 0 A_Jump (256, "Blot1", "Blot2", "Blot3", "Blot4")
  Blot1:
    BLOT A 2 
    BLOT B 2 A_SetTranslucent (0.4, 0)
    BLOT C 2 A_SetTranslucent (0.3, 0)
    BLOT D 2 A_SetTranslucent (0.2, 0)
    BLOT E 2 A_SetTranslucent (0.1, 0)
    stop
  Blot2:
    BLOT F 2 
    BLOT G 2 A_SetTranslucent (0.4, 0)
    BLOT H 2 A_SetTranslucent (0.3, 0)
    BLOT I 2 A_SetTranslucent (0.2, 0)
    BLOT J 2 A_SetTranslucent (0.1, 0)
    stop
  Blot3:
    BLOT K 2 
    BLOT L 2 A_SetTranslucent (0.4, 0)
    BLOT M 2 A_SetTranslucent (0.3, 0)
    BLOT N 2 A_SetTranslucent (0.2, 0)
    BLOT O 2 A_SetTranslucent (0.1, 0)
    stop
  Blot4:
    BLOT P 2 
    BLOT Q 2 A_SetTranslucent (0.4, 0)
    BLOT R 2 A_SetTranslucent (0.3, 0)
    BLOT S 2 A_SetTranslucent (0.2, 0)
    BLOT T 2 A_SetTranslucent (0.1, 0)
    stop
  }
}

Actor PoisonBlast : WoC_Skill {}

Actor UsePoisonBlast : Custominventory
{
	Inventory.MaxAmount 0
	+Inventory.AUTOACTIVATE
	states
	{
	Use:
		TNT1 A 0 A_JumpIfInventory("IsPlaguebringer",1,"Plaguebringer")
		TNT1 A 0 Bright A_FireCustomMissile ("ChaosBlast2",0,0,0,8,0)
		TNT1 A 0 A_JumpIfInventory("PoisonBlast", 7, 2)
		TNT1 A 0 A_JumpIfInventory("PoisonBlast", 4, 2)
		Stop
		TNT1 AA 0 Bright A_FireCustomMissile ("ChaosBlast",0,0,0,8,0)
		Stop
	Plaguebringer:
		TNT1 A 0 Bright A_FireCustomMissile ("ChaosBlast2Plaguebringer",0,0,0,8,0)
		TNT1 A 0 A_JumpIfInventory("PoisonBlast", 7, 2)
		TNT1 A 0 A_JumpIfInventory("PoisonBlast", 4, 2)
		Stop
		TNT1 AA 0 Bright A_FireCustomMissile ("ChaosBlastPlaguebringer",0,0,0,8,0)
		Stop
	}
}

ACTOR ChaosBlast
{
    Speed 25
    Radius 8
    Height 10
    Damage (0)
    RenderStyle Add
    Alpha 0.75
    PROJECTILE
    +MTHRUSPECIES
	+DONTBLAST
	+FORCERADIUSDMG
	+HITTRACER
	Damagetype "Poison"
	Seesound "Necromancer/PoisonBlast/Fire"
    DeathSound "Necromancer/PoisonBlast/Impact"
    States
    {
    Spawn:
		TNT1 A 0 A_Weave(frandom(1,3),frandom(1,3),frandom(0,2),frandom(0,2))
		TNT1 A 1 A_SpawnItemEx("ChaosBlastWeaveTrail",0,0,0,0,0,0,0,32,0)
		Loop
    Death:
		CSFX O 0 ACS_NamedExecuteWithResult("WOC DAMAGE OVER TIME", ACS_ExecuteWithResult(WOC_DECORATE,STATS,WOCTID,WOCTRACER), ACS_NamedExecuteWithResult("WOC Player Scale", 20, INTELLECT, ABIL_POISONBLAST, WOCTARGET), 5, POISONDOT)
		CSFX O 0 A_Explode(ACS_NamedExecuteWithResult("WOC Player Scale", 24, INTELLECT, ABIL_POISONBLAST, WOCTARGET),128,0)
		TNT1 AAAAAAAAAAAAAAAA 0 A_SpawnItemEx("ChaosBlastWeaveBall",0,0,0,frandom(100,400)/100.0,0,frandom(600,1000)/100.0,frandom(1,360),32,0)
		CSFX OPQRST 3 BRIGHT
		Stop
    }
}

Actor ChaosBlastPlaguebringer : ChaosBlast
{
	States
    {
    Death:
		CSFX O 0 ACS_NamedExecuteWithResult("WOC DAMAGE OVER TIME", ACS_ExecuteWithResult(WOC_DECORATE,STATS,WOCTID,WOCTRACER), ACS_NamedExecuteWithResult("WOC Player Scale", 20, INTELLECT, ABIL_POISONBLAST, WOCTARGET), 5, POISONDOT)
		CSFX O 0 A_Explode(ACS_NamedExecuteWithResult("WOC Player Scale", 24, INTELLECT, ABIL_POISONBLAST, WOCTARGET),192,0)
		TNT1 AAAAAAAAAAAAAAAA 0 A_SpawnItemEx("ChaosBlastWeaveBall",0,0,0,frandom(100,400)/100.0,0,frandom(600,1000)/100.0,frandom(1,360),48,0)
		CSFX OPQRST 3 BRIGHT
		Stop
    }
}

ACTOR ChaosBlastWeaveTrail
{
    PROJECTILE
	+NOINTERACTION
	+CLIENTSIDEONLY
	+NOCLIP
	+DONTSPLASH
    Scale 0.35
    RenderStyle Add
    Alpha 0.75
    States
    {
    Spawn:
		TNT1 A 0
		TNT1 A 0 A_Jump(256,1,2,3,4)
		CSFX BCDEFGHIJKLMN 3 BRIGHT A_FadeOut(0.06)
		Stop
    }
}

ACTOR ChaosBlastWeaveBall
{
    PROJECTILE
    -NOGRAVITY
	+RIPPER
	+BLOODLESSIMPACT
	+PAINLESS
	+CLIENTSIDEONLY
	+DONTSPLASH
    RenderStyle Add
    Scale 0.2
    Speed 7
    Radius 2
    Height 2
    States
    {
    Spawn:
		CSFX U 3 BRIGHT A_FadeOut
		Loop
    Death:
		TNT1 A 1
		Stop
    }
}

ACTOR ChaosBlast2 : ChaosBlast
{
    Damage (ACS_NamedExecuteWithResult("WOC Player Scale", FRandom(2,16), INTELLECT, ABIL_POISONBLAST, WOCTARGET))
    States
    {
    Death:
		CSFX O 0 ACS_NamedExecuteWithResult("WOC DAMAGE OVER TIME", ACS_ExecuteWithResult(WOC_DECORATE,STATS,WOCTID,WOCTRACER), ACS_NamedExecuteWithResult("WOC Player Scale", 40, INTELLECT, ABIL_POISONBLAST, WOCTARGET), 5, POISONDOT)
		CSFX O 0 A_Explode(ACS_NamedExecuteWithResult("WOC Player Scale", 76, INTELLECT, ABIL_POISONBLAST, WOCTARGET),128,0)
		TNT1 AAAAAAAAAAAAAAAA 0 A_SpawnItemEx("ChaosBlastWeaveBall",0,0,0,frandom(1.0,4.0),0,frandom(6.0,10.0),frandom(1,360),32,0)
		CSFX OPQRST 3 Bright
		Stop
    }
}

ACTOR ChaosBlast2Plaguebringer : ChaosBlast
{
    Damage (0)
    States
    {
    Death:
		CSFX O 0 ACS_NamedExecuteWithResult("WOC DAMAGE OVER TIME", ACS_ExecuteWithResult(WOC_DECORATE,STATS,WOCTID,WOCTRACER), ACS_NamedExecuteWithResult("WOC Player Scale", 40, INTELLECT, ABIL_POISONBLAST, WOCTARGET), 5, POISONDOT)
		CSFX O 0 A_Explode(ACS_NamedExecuteWithResult("WOC Player Scale", FRandom(78,92), INTELLECT, ABIL_POISONBLAST, WOCTARGET),192,0)
		TNT1 AAAAAAAAAAAAAAAA 0 A_SpawnItemEx("ChaosBlastWeaveBall",0,0,0,frandom(1.0,4.0),0,frandom(6.0,10.0),frandom(1,360),32,0)
		CSFX OPQRST 3 Bright
		Stop
    }
}

Actor Chaos : WoC_Skill {}

Actor UseChaos : Custominventory
{
	Inventory.MaxAmount 0
	+Inventory.AUTOACTIVATE
	states
	{
		Use:
		TNT1 A 0 Bright A_FireCustomMissile ("ChaosCurseProjectile",0,0)
		Stop
	}
}

Actor ChaosPuffGiver : Custominventory
{
	Inventory.MaxAmount 0
	+Inventory.AUTOACTIVATE
	states
	{
	Use:
		TNT1 A 0 A_SpawnItemEx("ChaosBulletPuff",0,0,32,0)
		Stop
	}
}

Actor ChaosHitscan : Custominventory
{
	Inventory.MaxAmount 0
	+Inventory.AUTOACTIVATE
	states
	{
	Use:
		TNT1 A 0 A_FireBullets(0,0,1,0,"ChaosBulletPuff")
		Stop
	}
}

Actor ChaosBulletPuff
{
	Mass 5
	+NOBLOCKMAP
	+NOGRAVITY
	+ALWAYSPUFF
	+PUFFONACTORS
	+BLOODLESSIMPACT
	+MTHRUSPECIES
	States
	{
	Spawn:
		TNT1 CCCCCCCCCCC 0 bright A_SpawnItemEx("ChaosBoom", 0, 0, 0, 0, 0, 0, 0, 160, 0)
		TNT1 CCCCCCCCCCC 0 bright A_SpawnItemEx("ChaosBoom", 0, 0, 0, 0, 0, 0, 0, 160, 0)
		TNT1 CCCCCCCCCCC 0 bright A_SpawnItemEx("ChaosBoom", 0, 0, 0, 0, 0, 0, 0, 160, 0)
		TNT1 CCCCCCCCCCC 0 bright A_SpawnItemEx("ChaosBoom", 0, 0, 0, 0, 0, 0, 0, 160, 0)
		TNT1 A 1
		Stop
	}
}

actor ChaosBoom
{
  radius 0
  height 1
  speed 0
  damage 0
  renderstyle Add
  alpha 0.75
  PROJECTILE
  -RANDOMIZE
  Scale 0.5
  +DONTSPLASH
   +NOINTERACTION
  +CLIENTSIDEONLY
  +NOCLIP
  +RIPPER
  +BLOODLESSIMPACT
  +PAINLESS
  states
  {
  Spawn:
    TNT1 A 0 
    TNT1 A 0 A_CustomMissile("ChaosEffectPuff2",0,0,frandom(-180,180),2,frandom(-180,180))
    TNT1 A 2 A_CustomMissile("ChaosEffectPuff2",0,0,frandom(-180,180),2,frandom(-180,180))
    stop
  Death:
    TNT1 A 3 
    stop
  }
}

Actor ChaosCurseProjectile
{
	Radius 6
	Height 8
	Speed 25
	damage (0)
	Decal "BaronScorch"
	Renderstyle Add
	Projectile
	+RANDOMIZE
	+HITTRACER
	+MTHRUSPECIES +NODAMAGETHRUST +DONTBLAST
	+DONTREFLECT
	states
	{
	Spawn:
		TNT1 A 1
		TNT1 AAA 0 A_SpawnItemEx ("ChaosEffectPuff2", 0, random (1,-1), random (1,-1), 0, 0, 0, 0, 160)
		loop
	Death:
		TNT1 CCCCCCCCCCC 0 bright A_SpawnItemEx("ChaosBoom", 0, 0, 0, 0, 0, 0, 0, 160, 0)
			TNT1 CCCCCCCCCCC 0 bright A_SpawnItemEx("ChaosBoom", 0, 0, 0, 0, 0, 0, 0, 160, 0)
			TNT1 CCCCCCCCCCC 0 bright A_SpawnItemEx("ChaosBoom", 0, 0, 0, 0, 0, 0, 0, 160, 0)
			TNT1 CCCCCCCCCCC 0 bright A_SpawnItemEx("ChaosBoom", 0, 0, 0, 0, 0, 0, 0, 160, 0)
		TNT1 A 0 A_JumpIfInTargetInventory("IsHarvester", 1, "Harvester")
		TNT1 A 15 ACS_ExecuteAlways(WOC_CASTCHAOS, 0, 0, 0, ACS_ExecuteWithResult(WOC_DECORATE,NECROMANCERSKILLS,ABIL_CHAOS,WOCTARGET)*10+ACS_ExecuteWithResult(WOC_DECORATE,STATS,WISDOM,WOCTARGET)/10)
		stop
	Harvester:
		TNT1 A 0 ACS_ExecuteAlways(WOC_CASTCHAOS, 0, 0, 0, ACS_ExecuteWithResult(WOC_DECORATE,NECROMANCERSKILLS,ABIL_CHAOS,WOCTARGET)*10+ACS_ExecuteWithResult(WOC_DECORATE,STATS,WISDOM,WOCTARGET)/10)
		TNT1 A 15 A_GiveInventory("ChaosAOEGiver")
		stop
	}
}

ACTOR ChaosEffectPuff2
{
    Projectile
	Speed 6
	+PAINLESS
	+NOCLIP
	+NOINTERACTION
	+CLIENTSIDEONLY
	+DONTSPLASH
    RenderStyle Add
	Alpha 0.6
	Scale 0.4
    States
    {
    Spawn:
	SKP3 ABCDEF 1 Bright
	Stop
    }
}

Actor ChaosEffectItem : Custominventory
{
	Inventory.MaxAmount 0
	+Inventory.AUTOACTIVATE
	states
	{
		Use:
		TNT1 AAA 0 A_SpawnItemEx("ChaosEffectPuff", frandom(-16,16), frandom(-16,16), frandom(height/2-8,height/2+8), 0, 0, 0, 0, 0, 0)
		TNT1 A 0 A_SpawnItemEx("ChaosRadius", 0, 0, 32)
		Stop
	}
}

Actor ChaosEffectItemNoRadius : Custominventory
{
	Inventory.MaxAmount 0
	+Inventory.AUTOACTIVATE
	states
	{
		Use:
		TNT1 AAA 0 A_SpawnItemEx("ChaosEffectPuff", frandom(-16,16), frandom(-16,16), frandom(height/2-8,height/2+8), 0, 0, 0, 0, 0, 0)
		TNT1 A 0 //A_SpawnItemEx("ChaosRadius", 0, 0, 32)
		Stop
	}
}

ACTOR ChaosEffectPuff
{
    Projectile
	+NOCLIP
    RenderStyle Add
	Scale 0.67
    States
    {
    Spawn:
	SKP3 ABCDEF 3 Bright
	Stop
    }
}

Actor ChaosDuration : Inventory { Inventory.MaxAmount 0x7fffffff }

Actor ChaosRadius
{
	Speed 0
	Radius 6
	Height 8
	Damage 0
	Projectile
	+RIPPER
	+BLOODLESSIMPACT
	+NODAMAGETHRUST +DONTBLAST
	+PAINLESS
	+FORCERADIUSDMG
	Damagetype "TrueDamage"
	States
	{
	Spawn:
		TNT1 A 0
		TNT1 A 0 A_Explode(1,256,1,1,256)
		TNT1 A 0 A_RadiusGive("ChaosAntiDamage",256,RGF_MONSTERS)
		Goto Death
	Death:
		TNT1 A 1
		Stop
	}
}

actor ChaosAntiDamage : CustomInventory
{
	INVENTORY.MAXAMOUNT 0
	+AUTOACTIVATE
	States
	{
	Use:
		TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(WOC_DECORATE,STATS,ISFRIENDLY,ACTIVATOR) == 0,"Pickedup")
		Stop
	Pickedup:
		TNT1 A 0 ACS_ExecuteAlways(WOC_HEALSCRIPT,0,1,0,0)//Heal 1/6 of total health//A_GiveInventory("NewHealth",ACS_ExecuteWithResult(553,1,0,0))//HealThing(100)//ACS_ExecuteWithResult(553,1,0,0))
		stop
	}
}

Actor SummonRevenant : WoC_Skill {}

Actor UseSummonRevenant : CustomInventory
{
	Inventory.MaxAmount 0
	+Inventory.AUTOACTIVATE
	states
	{
	Use:
		TNT1 A 0 A_SpawnItemEx("NecromancerIncarnate", 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, SXF_NOCHECKPOSITION|SXF_SETMASTER, 0, PET3TID+ACS_ExecuteWithResult(WOC_DECORATE,STATS,PLAYERNUM))
		Stop
	}
}

ACTOR NecromancerIncarnate : WoC_FriendlyMon
{ 
Obituary "%o couldn't escape a Death Incarnate's Blast."
HitObituary "%o was beaten to death by a Death Incarnate."
SeeSound "monster/incsit" 
PainSound "skeleton/pain" 
DeathSound "monster/incdth" 
ActiveSound "monster/incact"
Health 300
  Radius 16
  Height 56
  Mass 500
  Speed 10
  PainChance 100
  Monster
  MeleeRange 78
  +MISSILEMORE 
  +FLOORCLIP
  +FRIENDLY
  +DONTHURTSPECIES
	Species "Player"
	+THRUSPECIES
	+QUICKTORETALIATE
-COUNTKILL
-ACTIVATEMCROSS
-NOTELEPORT
+NOBLOCKMONST
/*+NODAMAGETHRUST*/ +DONTBLAST
+NOICEDEATH
+NEVERRESPAWN
+NEVERFAST
+DONTHARMSPECIES
+NOBLOOD
RadiusDamageFactor 0.25
DamageFactor "PoisonTime", 0.0
DamageFactor "Bleed", 0.0
DamageFactor "Holy", 1.5
DamageFactor "HolyTime", 1.5
Damagetype "Physical"
States 
   { 
   Spawn:
		INCA A 0
		INCA A 0 A_SpawnItemEx("NewMinotaurSmoke")
		INCA A 0 A_PlaySound("monster/incsit")
		INCA A 0 ACS_ExecuteAlways(WOC_MINIONREGEN)
		INCA A 0 ACS_ExecuteAlways(900,0,72)
	Idle:
       INCA AB 10 A_Look 
       Goto See
   Giveup:
	   INCA A 0 A_ClearTarget
	   Goto See
   See: 
	   INCA A 0 A_JumpIfTargetinLOS(2, 140)
	   INCA A 0 A_Jump(50, "Giveup")
       INCA AABBCCDDEEFF 2 A_Chase 
       Loop 
   Melee:
       INCA G 0 A_Jump(128,6)
       INCA G 0 A_FaceTarget 
       INCA G 6 A_SpawnItemEx("PetAlert")
       INCA H 0 A_FaceTarget 
	   INCA H 6 A_PlaySound("Necromancer/Revenant/Swing")
       INCA I 6 A_CustomMeleeAttack(ACS_NamedExecuteWithResult("WOC Player Scale", FRandom(26,46), CHARISMA, ABIL_SUMMONREVENANT, ACTIVATOR),"Necromancer/Revenant/Hit","none")
       Goto See
       INCA R 0 A_FaceTarget 
       INCA R 6 A_SpawnItemEx("PetAlert")
       INCA S 0 A_FaceTarget
	   INCA S 6 A_PlaySound("Necromancer/Revenant/Swing")
       INCA T 6 A_CustomMeleeAttack(ACS_NamedExecuteWithResult("WOC Player Scale", FRandom(26,46), CHARISMA, ABIL_SUMMONREVENANT, ACTIVATOR),"Necromancer/Revenant/Hit","none")
       Goto See 
   Missile:
	   INCA J 0 A_SpawnItemEx("PetAlert")
	   INCA J 0 A_Jump(128,"IncarnateStun","BoneShower")
	   INCA J 0 A_Jump(64,"Enfeeble","Chaos","Terrify","Drain")
       INCA J 10 A_FaceTarget
       INCA J 10 A_FaceTarget
	   INCA J 0 A_PlaySound("Necromancer/Revenant/Blast")
       INCA U 10 Bright A_CustomMissile("NecroIncarnateBlast")
       INCA K 10 A_FaceTarget
       Goto See
   Enfeeble:
	   INC4 J 0 A_JumpIfInventory("Enfeeble", 1, 1)
	   Goto Missile+2
       INC4 J 6 A_FaceTarget
       INC4 J 6 A_FaceTarget
	   INC4 J 0 A_PlaySound("ability/enfeeble")
	   INC4 J 0 A_GiveToTarget("EnfeeblePuffGiver")
       INC4 U 6 Bright A_CustomMissile("EnfeebleCurseProjectile")
       INC4 K 6 A_FaceTarget
       Goto See
   Chaos:
       INC3 J 0 A_JumpIfInventory("Chaos", 1, 1)
	   Goto Missile+2
       INC3 J 6 A_FaceTarget
       INC3 J 6 A_FaceTarget
	   INC3 J 0 A_GiveToTarget("ChaosPuffGiver")
	   INC3 J 0 A_PlaySound("ability/chaos")
       INC3 U 6 Bright A_CustomMissile("ChaosCurseProjectile")
       INC3 K 6 A_FaceTarget
       Goto See
   Drain:
       INC2 J 0 A_JumpIfInventory("Drain", 1, 1)
	   Goto Missile+2
       INC2 J 6 A_FaceTarget
       INC2 J 6 A_FaceTarget
	   INC2 J 0 A_GiveToTarget("DrainPuffGiver")
	   INC2 J 0 A_PlaySound("ability/drain")
       INC2 U 6 Bright A_CustomMissile("DrainCurseProjectile")
       INC2 K 6 A_FaceTarget
       Goto See
   Terrify:
	   INC1 J 0 A_JumpIfInventory("Terrify", 1, 1)
	   Goto Missile+2
       INC1 J 6 A_FaceTarget
       INC1 J 6 A_FaceTarget
	   INC1 J 0 A_PlaySound("whiteballbsee")
	   INC1 J 0 A_GiveToTarget("TerrifyPuffGiver")
       INC1 U 6 Bright A_CustomMissile("TerrifyCurseProjectile")
       INC1 K 6 A_FaceTarget
       Goto See 
   IncarnateStun:
	   INCA J 0 A_JumpIfInventory("SummonRevenant", 4, 1)
	   Goto Missile+2
       INCA J 6 A_FaceTarget
       INCA J 6 A_FaceTarget
	   INCA U 0 A_PlaySound("monster/incatk")
	   INCA U 6 Bright A_CustomMissile("NecroIncarnateBlastStun")
       INCA K 6 A_FaceTarget
	   Goto See
   BoneShower:
	   INCA J 0 A_JumpIfInventory("SummonRevenant", 7, 1)
	   Goto Missile+2
	   INCA J 0 A_JumpIfCloser(1024,1)
	   Goto Missile+2
       INCA J 8 A_FaceTarget
       INCA J 8 A_FaceTarget
       INCA U 8 Bright A_CustomMissile("BoneShowerSpawner")
       INCA K 8 A_FaceTarget
       Goto See 
   Pain: 
       INCA L 5 
       INCA L 5 A_Pain 
       Goto See 
   Death:
       INCA LM 7 
       INCA N 7 A_Scream 
       INCA O 7 A_NoBlocking 
       INCA P 7
	   INCA Q 300
       INCA QQQQQQQQQQQQ 2 A_FadeOut(0.1)
      Stop
   XDeath: 
       INCX A 10 Bright A_Playsound("monster/incexp")
       INCX BC 5 Bright
       INCX D 5 Bright A_NoBlocking
       INCX EFGHIJ 5 Bright
	   INCX K 300
       INCX KKKKKKKKKKKK 2 A_FadeOut(0.1)
	   Stop
   } 
}

ACTOR NecroIncarnateBlast : FastProjectile
{
   Damage (ACS_NamedExecuteWithResult("WOC Player Scale", FRandom(40,60), CHARISMA, ABIL_SUMMONREVENANT, WOCTARGET))
   Radius 1
   Height 1
   Speed 250
   PROJECTILE
   +BLOODSPLATTER
   +MTHRUSPECIES /*+NODAMAGETHRUST*/ +DONTBLAST
   +FORCEPAIN
   +HITTRACER
   Damagetype "Shadow"
   Renderstyle Normal
   Alpha 1.0
   States
   {
   Spawn:
      TNT1 A 3
      loop
   Death:
	  TNT1 C 0 ACS_NamedExecuteWithResult("WOC DAMAGE OVER TIME", ACS_ExecuteWithResult(WOC_DECORATE,STATS,WOCTID,WOCTRACER), ACS_NamedExecuteWithResult("WOC Player Scale", FRandom(80,120), CHARISMA, ABIL_SUMMONREVENANT, WOCTARGET), 4, SHADOWDOT)
	  TNT1 CCCCCCCCCCC 0 bright A_SpawnItemEx("PunishmentBoom", 0, 0, 0, 0, 0, 0, 0, 160, 0)
	  TNT1 CCCCCCCCCCC 0 bright A_SpawnItemEx("PunishmentBoom", 0, 0, 0, 0, 0, 0, 0, 160, 0)
	  TNT1 CCCCCCCCCCC 0 bright A_SpawnItemEx("PunishmentBoom", 0, 0, 0, 0, 0, 0, 0, 160, 0)
	  TNT1 CCCCCCCCCCC 0 bright A_SpawnItemEx("PunishmentBoom", 0, 0, 0, 0, 0, 0, 0, 160, 0)
	  TNT1 C 0 A_RadiusThrust(ACS_NamedExecuteWithResult("WOC Player Scale", 1000, CHARISMA, ABIL_SUMMONREVENANT, WOCTARGET),64,RTF_NOIMPACTDAMAGE,64)
	  TNT1 CDEF 4 Bright
	  Stop
   }
}

actor PunishmentBoom
{
  radius 0
  height 1
  speed 0
  damage 0
  renderstyle Add
  alpha 0.75
  PROJECTILE
  -RANDOMIZE
  Scale 0.5
  +DONTSPLASH
   +NOINTERACTION
  +CLIENTSIDEONLY
  +NOCLIP
  +RIPPER
  +BLOODLESSIMPACT
  +PAINLESS
  states
  {
  Spawn:
    TNT1 A 0 
    TNT1 A 0 A_CustomMissile("FireCurseMissileTrail2",0,0,frandom(-180,180),2,frandom(-180,180))
    TNT1 A 2 A_CustomMissile("FireCurseMissileTrail2",0,0,frandom(-180,180),2,frandom(-180,180))
    stop
  Death:
    TNT1 A 3 
    stop
  }
}

Actor FireCurseMissileTrail2
{
   Radius 0
   Height 1
   Speed 5
   PROJECTILE
   +CLIENTSIDEONLY
   +DONTSPLASH
   +NOINTERACTION
   +NOCLIP
   +RIPPER
   +BLOODLESSIMPACT
   +PAINLESS
   RenderStyle Add
   Alpha 0.75
   States
   {
   Spawn:
      TNT1 A 1 Bright
      BLTR ABCDEFG 2 Bright
      Stop
   }
}

ACTOR NecroIncarnateBlastStun
{
   Damage (0)
   Radius 16
   Height 1
   Speed 0
   +NOGRAVITY
   +SEEKERMISSILE
   +NOTARGET
   +NODAMAGETHRUST +DONTBLAST
   +FORCERADIUSDMG
   Damagetype "Shadow"
   ReactionTime 35
   Renderstyle Add
   Alpha 1.0
   States
   {
   Spawn:
	  ISFX A 0 Bright
      ISFX F 1 Bright A_Fire
	  ISFX A 0 Bright A_Explode(2,32,0)
	  ISFX F 1 Bright A_Fire
	  ISFX A 0 Bright A_Explode(2,32,0)
	  ISFX G 1 Bright A_Fire
	  ISFX A 0 Bright A_Explode(2,32,0)
	  ISFX G 1 Bright A_Fire
	  ISFX A 0 Bright A_Explode(2,32,0)
	  ISFX H 1 Bright A_Fire
	  ISFX A 0 Bright A_Explode(2,32,0)
	  ISFX H 1 Bright A_Fire
   Spawn2:
	  ISFX E 0 Bright A_PlaySound("weapons/lighthit")
	  ISFX E 0 Bright A_CountDown
	  ISFX A 0 Bright A_Explode(2,32,0)
	  ISFX E 1 Bright A_Fire
	  ISFX A 0 Bright A_Explode(2,32,0)
	  ISFX E 1 Bright A_Fire
	  ISFX A 0 Bright A_Explode(2,32,0)
	  ISFX D 1 Bright A_Fire
	  ISFX A 0 Bright A_Explode(2,32,0)
	  ISFX D 1 Bright A_Fire
	  ISFX A 0 Bright A_Explode(2,32,0)
	  ISFX C 1 Bright A_Fire
	  ISFX A 0 Bright A_Explode(2,32,0)
	  ISFX C 1 Bright A_Fire
	  Loop
   /*Death:
      ISFX F 1
	  ISFX F 1
	  ISFX G 1
	  ISFX G 1
	  ISFX H 1
	  ISFX H 1
	  Stop*/
   }
}

Actor PoisonNova : WoC_Skill {}

Actor UsePoisonNova : Custominventory
{
	Inventory.MaxAmount 0
	+Inventory.AUTOACTIVATE
	states
	{
		Use:
		TNT1 A 0 A_FireCustomMissile("PoisonNovaSpawner", 0, 0, 0, 0, 1)
		Stop
	}
}

ACTOR PoisonNovaSpawner
{
    PROJECTILE
    +NODAMAGETHRUST +DONTBLAST
	+RIPPER
	+BLOODLESSIMPACT
	+FLOORHUGGER
	+DONTBLAST
	+FORCERADIUSDMG
    Speed 0
    Damage 0
    Radius 10
    Height 14
    RenderStyle Add
	Damagetype "Poison"
    States
    {
    Spawn:
		TNT1 AA 0 A_CustomMissile("PoisonNovaExplosion",0,0,0,6,0)
		TNT1 A 0 A_CustomMissile("PoisonNovaExplosion",0,0,8,6,0)
		TNT1 A 0 A_CustomMissile("PoisonNovaExplosion",0,0,16,6,0)
		TNT1 A 0 A_CustomMissile("PoisonNovaExplosion",0,0,24,6,0)
		TNT1 A 0 A_CustomMissile("PoisonNovaExplosion",0,0,32,6,0)
		TNT1 A 0 A_CustomMissile("PoisonNovaExplosion",0,0,40,6,0)
		TNT1 A 0 A_CustomMissile("PoisonNovaExplosion",0,0,48,6,0)
		TNT1 A 0 A_CustomMissile("PoisonNovaExplosion",0,0,56,6,0)
		TNT1 A 0 A_CustomMissile("PoisonNovaExplosion",0,0,64,6,0)
		TNT1 A 0 A_CustomMissile("PoisonNovaExplosion",0,0,72,6,0)
		TNT1 A 0 A_CustomMissile("PoisonNovaExplosion",0,0,80,6,0)
		TNT1 A 0 A_CustomMissile("PoisonNovaExplosion",0,0,88,6,0)
		TNT1 A 0 A_CustomMissile("PoisonNovaExplosion",0,0,96,6,0)
		TNT1 A 0 A_CustomMissile("PoisonNovaExplosion",0,0,104,6,0)
		TNT1 A 0 A_CustomMissile("PoisonNovaExplosion",0,0,112,6,0)
		TNT1 A 0 A_CustomMissile("PoisonNovaExplosion",0,0,120,6,0)
		TNT1 A 0 A_CustomMissile("PoisonNovaExplosion",0,0,128,6,0)
		TNT1 A 0 A_CustomMissile("PoisonNovaExplosion",0,0,136,6,0)
		TNT1 A 0 A_CustomMissile("PoisonNovaExplosion",0,0,144,6,0)
		TNT1 A 0 A_CustomMissile("PoisonNovaExplosion",0,0,152,6,0)
		TNT1 A 0 A_CustomMissile("PoisonNovaExplosion",0,0,160,6,0)
		TNT1 A 0 A_CustomMissile("PoisonNovaExplosion",0,0,168,6,0)
		TNT1 A 0 A_CustomMissile("PoisonNovaExplosion",0,0,176,6,0)
		TNT1 A 0 A_CustomMissile("PoisonNovaExplosion",0,0,184,6,0)
		TNT1 A 0 A_CustomMissile("PoisonNovaExplosion",0,0,192,6,0)
		TNT1 A 0 A_CustomMissile("PoisonNovaExplosion",0,0,200,6,0)
		TNT1 A 0 A_CustomMissile("PoisonNovaExplosion",0,0,208,6,0)
		TNT1 A 0 A_CustomMissile("PoisonNovaExplosion",0,0,216,6,0)
		TNT1 A 0 A_CustomMissile("PoisonNovaExplosion",0,0,224,6,0)
		TNT1 A 0 A_CustomMissile("PoisonNovaExplosion",0,0,232,6,0)
		TNT1 A 0 A_CustomMissile("PoisonNovaExplosion",0,0,240,6,0)
		TNT1 A 0 A_CustomMissile("PoisonNovaExplosion",0,0,248,6,0)
		TNT1 A 0 A_CustomMissile("PoisonNovaExplosion",0,0,256,6,0)
		TNT1 A 0 A_CustomMissile("PoisonNovaExplosion",0,0,264,6,0)
		TNT1 A 0 A_CustomMissile("PoisonNovaExplosion",0,0,272,6,0)
		TNT1 A 0 A_CustomMissile("PoisonNovaExplosion",0,0,280,6,0)
		TNT1 A 0 A_CustomMissile("PoisonNovaExplosion",0,0,288,6,0)
		TNT1 A 0 A_CustomMissile("PoisonNovaExplosion",0,0,296,6,0)
		TNT1 A 0 A_CustomMissile("PoisonNovaExplosion",0,0,304,6,0)
		TNT1 A 0 A_CustomMissile("PoisonNovaExplosion",0,0,312,6,0)
		TNT1 A 0 A_CustomMissile("PoisonNovaExplosion",0,0,320,6,0)
		TNT1 A 0 A_CustomMissile("PoisonNovaExplosion",0,0,328,6,0)
		TNT1 A 0 A_CustomMissile("PoisonNovaExplosion",0,0,336,6,0)
		TNT1 A 0 A_CustomMissile("PoisonNovaExplosion",0,0,344,6,0)
		TNT1 A 0 A_CustomMissile("PoisonNovaExplosion",0,0,352,6,0)
		TNT1 A 0 A_PlaySound("Necromancer/PoisonNova/Fire")
		TNT1 A 0 A_JumpIfInventory("IsPlaguebringer",1,"PlagueBringer")
		TNT1 AAAAAAAAAAAAAAAAAAAA 1 A_Explode(ACS_NamedExecuteWithResult("WOC Player Scale", 7, INTELLECT, ABIL_POISONNOVA, WOCTARGET),175,0)
		TNT1 A 15
		Stop
	Plaguebringer:
		TNT1 AAAAAAAAAAAAAAAAAAAA 1 A_Explode(ACS_NamedExecuteWithResult("WOC Player Scale", 7, INTELLECT, ABIL_POISONNOVA, WOCTARGET),262,0)
		TNT1 A 15
		Stop
	Death:
	TNT1 A 1
	Stop
    }
}

ACTOR PoisonNovaExplosion
{
    Mass 1
    Radius 1
    Height 1
    Speed 5
    Damage 0
    RenderStyle Add
    PROJECTILE
	+FLOORHUGGER
	+NOINTERACTION
	+DONTSPLASH
	+CLIENTSIDEONLY
	+NOCLIP
	+DONTBLAST
    States
    {
    Spawn:
	TNT1 A 0
        PNOV ABCDEFGHIJKLMOP 2 Bright
        Stop
    }
}

Actor Miasma : WoC_Skill {}

Actor UseMiasma : CustomInventory
{
	+INVENTORY.AUTOACTIVATE
	Inventory.MaxAmount 0
	States
	{
	Use:
		TNT1 A 0 A_JumpIfInventory("IsPlaguebringer",1,"Plaguebringer")
		TNT1 A 0 A_SpawnItemEx("MiasmaEffects", frandom(-200,200), frandom(-200,200), 0, 0, 0, 4, frandom(0,359))
		TNT1 A 0 A_SpawnItemEx("MiasmaEffects", frandom(-200,200), frandom(-200,200), 0, 0, 0, 4, frandom(0,359))
		TNT1 A 0 A_SpawnItemEx("MiasmaEffects2", frandom(-200,200), frandom(-200,200), 0, 0, 0, 2, frandom(0,359))
		TNT1 A 0 A_SpawnItemEx("MiasmaEffects3", frandom(-200,200), frandom(-200,200), 0, 0, 0, 0, frandom(0,359))
		TNT1 A 0 A_SpawnItemEx("MiasmaEffects3", frandom(-200,200), frandom(-200,200), 0, 0, 0, 0, frandom(0,359))
		Stop
	Plaguebringer:
		TNT1 A 0 A_SpawnItemEx("MiasmaEffectsPlaguebringer", frandom(-200,200), frandom(-200,200), 0, 0, 0, 4, frandom(0,359))
		TNT1 A 0 A_SpawnItemEx("MiasmaEffectsPlaguebringer", frandom(-200,200), frandom(-200,200), 0, 0, 0, 4, frandom(0,359))
		TNT1 A 0 A_SpawnItemEx("MiasmaEffects2", frandom(-200,200), frandom(-200,200), 0, 0, 0, 2, frandom(0,359))
		TNT1 A 0 A_SpawnItemEx("MiasmaEffects3", frandom(-200,200), frandom(-200,200), 0, 0, 0, 0, frandom(0,359))
		TNT1 A 0 A_SpawnItemEx("MiasmaEffects3", frandom(-200,200), frandom(-200,200), 0, 0, 0, 0, frandom(0,359))
		Stop
	}
}

Actor MiasmaEffects
{
	Speed 0
	VSpeed 13
	Radius 8
	Height 4
	Damage (1)
	scale 0.5
	Gravity 0.5
	RenderStyle Add
	//Alpha 0.6
	+NOBLOCKMAP
	+DROPOFF
	+MISSILE
	+NOTELEPORT
	//+RIPPER
	+NOGRAVITY
	+FRIENDLY
	+DONTREFLECT
	+DONTSPLASH
	+FORCERADIUSDMG
	+HITTRACER
	Damagetype "Poison"
	Obituary "%k was too toxic for %o"
	States
	{
	Spawn:
		D2FX G 0 Bright
		D2FX G 0 Bright A_CheckSight("Vanish")
		D2FX GHIJKL 3 Bright //A_SpawnItemEx ("StompDust",0,0,0,0,0,1,0,0,0)
	Death:
		"----" A 0 ACS_NamedExecuteWithResult("WOC DAMAGE OVER TIME", ACS_ExecuteWithResult(WOC_DECORATE,STATS,WOCTID,WOCTRACER), ACS_NamedExecuteWithResult("WOC Player Scale", 20, INTELLECT, ABIL_MIASMA, WOCTARGET), 5, POISONDOT)
		"----" A 1 A_Explode(ACS_NamedExecuteWithResult("WOC Player Scale", 10, INTELLECT, ABIL_MIASMA, WOCTARGET),48,0,0,48)
		Stop
	Vanish:
		TNT1 A 0
		Stop
	}
}

Actor MiasmaEffects2
{
  Speed 0
  VSpeed 6
  Radius 8
  Height 4
  Damage 0
  scale 0.25
  Gravity 0.5
  RenderStyle Add
  //Alpha 0.6
  +NOBLOCKMAP
  +DROPOFF
  +MISSILE
  +NOTELEPORT
  +PAINLESS
  +RIPPER
  +NOGRAVITY
  +CLIENTSIDEONLY
  +NOINTERACTION
	+DONTSPLASH
  States
  {
  Spawn:
    D2FX GHIJKL 2 Bright//A_SpawnItemEx ("StompDust",0,0,0,0,0,1,0,0,0)
    stop
  Death:
    TNT1 A 1 //A_SpawnItemEx ("StompDust",0,0,0,0,0,1,0,0,0)
    Stop
  }
}

Actor MiasmaEffects3
{
  Speed 0
  VSpeed 0
  Radius 8
  Height 4
  Damage 0
  scale 0.25
  Gravity 0.5
  RenderStyle Add
  //Alpha 0.6
  +NOBLOCKMAP
  +DROPOFF
  +MISSILE
  +NOTELEPORT
  +RIPPER
  +PAINLESS
  +NOGRAVITY
  +CLIENTSIDEONLY
  +NOINTERACTION
	+DONTSPLASH
  States
  {
  Spawn:
    FSFX NOPQRSTUVW 3 Bright//A_SpawnItemEx ("StompDust",0,0,0,0,0,1,0,0,0)
    stop
  Death:
    TNT1 A 1 //A_SpawnItemEx ("StompDust",0,0,0,0,0,1,0,0,0)
    Stop
  }
}

Actor MiasmaEffectsPlaguebringer : MiasmaEffects
{
	States
	{
	Death:
		"----" A 1 A_Explode(ACS_NamedExecuteWithResult("WOC Player Scale", 12, INTELLECT, ABIL_MIASMA, WOCTARGET),72,0,0,72)
		Stop
	}
}

Actor Miasmaing :  WoC_Boolean {}

Actor Drain : WoC_Skill {}

Actor DrainHeal : Inventory
{
  +INVENTORY.UNDROPPABLE
  Inventory.MaxAmount 0x7fffffff
}

Actor DrainEffectItem : Custominventory
{
	Inventory.MaxAmount 0
	+Inventory.AUTOACTIVATE
	states
	{
		Use:
		TNT1 AAA 0 A_SpawnItemEx("DrainEffectPuff", frandom(-16,16), frandom(-16,16), frandom(height/2-8,height/2+8), 0, 0, 0.5*frandom(2,5), 0, 0, 0)
		Stop
	}
}

Actor DrainPuffGiver : Custominventory
{
	Inventory.MaxAmount 0
	+Inventory.AUTOACTIVATE
	states
	{
	Use:
		TNT1 A 0 A_SpawnItemEx("DrainBulletPuff",0,0,32)
		Stop
	}
}

Actor DrainEffectPuff
{
	Projectile
	+NOCLIP
    RenderStyle Add
	Scale 0.67
    States
    {
    Spawn:
	SKP4 ABCDEF 3 Bright
	Stop
    }
}

Actor UseDrain : Custominventory
{
	Inventory.MaxAmount 0
	+Inventory.AUTOACTIVATE
	states
	{
	Use:
		TNT1 A 0 A_FireCustomMissile ("DrainCurseProjectile",0,0)
		Stop
	}
}

Actor DrainHitscan : Custominventory
{
	Inventory.MaxAmount 0
	+Inventory.AUTOACTIVATE
	states
	{
	Use:
		TNT1 A 0 A_FireBullets(0,0,1,0,"DrainBulletPuff",0)
		Stop
	}
}

Actor DrainBulletPuff
{
	Mass 5
	+NOBLOCKMAP
	+NOGRAVITY
	+ALWAYSPUFF
	+PUFFONACTORS
	+BLOODLESSIMPACT
	+MTHRUSPECIES
	States
	{
	Spawn:
		TNT1 CCCCCCCCCCC 0 bright A_SpawnItemEx("DrainBoom", 0, 0, 0, 0, 0, 0, 0, 160, 0)
		TNT1 CCCCCCCCCCC 0 bright A_SpawnItemEx("DrainBoom", 0, 0, 0, 0, 0, 0, 0, 160, 0)
		TNT1 CCCCCCCCCCC 0 bright A_SpawnItemEx("DrainBoom", 0, 0, 0, 0, 0, 0, 0, 160, 0)
		TNT1 CCCCCCCCCCC 0 bright A_SpawnItemEx("DrainBoom", 0, 0, 0, 0, 0, 0, 0, 160, 0)
		TNT1 A 1
		Stop
	}
}

Actor DrainCurseProjectile
{
	Radius 6
	Height 8
	Speed 25
	damage (0)
	Decal "BaronScorch"
	Renderstyle Add
	Projectile
	+RANDOMIZE
	+HITTRACER
	+MTHRUSPECIES +NODAMAGETHRUST +DONTBLAST
	+DONTREFLECT
	states
	{
	Spawn:
		TNT1 A 1
		TNT1 AAA 0 A_SpawnItemEx ("DrainEffectPuff2", 0, random (1,-1), random (1,-1), 0, 0, 0, 0, 160)
		loop
	Death:
		TNT1 CCCCCCCCCCC 0 bright A_SpawnItemEx("DrainBoom", 0, 0, 0, 0, 0, 0, 0, 160, 0)
			TNT1 CCCCCCCCCCC 0 bright A_SpawnItemEx("DrainBoom", 0, 0, 0, 0, 0, 0, 0, 160, 0)
			TNT1 CCCCCCCCCCC 0 bright A_SpawnItemEx("DrainBoom", 0, 0, 0, 0, 0, 0, 0, 160, 0)
			TNT1 CCCCCCCCCCC 0 bright A_SpawnItemEx("DrainBoom", 0, 0, 0, 0, 0, 0, 0, 160, 0)
		TNT1 A 0 A_JumpIfInTargetInventory("IsHarvester", 1, "Harvester")
		TNT1 A 15 ACS_ExecuteAlways(WOC_CASTDRAIN, 0, 512+512*ACS_ExecuteWithResult(WOC_DECORATE,NECROMANCERSKILLS,ABIL_DRAIN,WOCTARGET)/10+ACS_ExecuteWithResult(WOC_DECORATE,STATS,WISDOM,WOCTARGET), 0, 14+ACS_ExecuteWithResult(WOC_DECORATE,NECROMANCERSKILLS,ABIL_DRAIN,WOCTARGET)*3+ACS_ExecuteWithResult(WOC_DECORATE,STATS,WISDOM,WOCTARGET))
		stop
	Harvester:
		TNT1 A 0 ACS_ExecuteAlways(WOC_CASTDRAIN, 0, 512+512*ACS_ExecuteWithResult(WOC_DECORATE,NECROMANCERSKILLS,ABIL_DRAIN,WOCTARGET)/10+ACS_ExecuteWithResult(WOC_DECORATE,STATS,WISDOM,WOCTARGET), 0, 14+ACS_ExecuteWithResult(WOC_DECORATE,NECROMANCERSKILLS,ABIL_DRAIN,WOCTARGET)*3+ACS_ExecuteWithResult(WOC_DECORATE,STATS,WISDOM,WOCTARGET))
		TNT1 A 15 A_GiveInventory("DrainAOEGiver")
		stop
	}
}

//512 + 512*CheckInventory("ProtectAura")/10 + (CheckInventory("Wisdom"))) && CheckSight(0,I+PLAYERTID,0)
//14+CheckActorInventory(tid,"Drain")*5+CheckActorInventory(tid,"Wisdom")*3/2;

actor DrainBoom
{
  radius 0
  height 1
  speed 0
  damage 0
  renderstyle Add
  alpha 0.75
  PROJECTILE
  -RANDOMIZE
  Scale 0.5
  +DONTSPLASH
   +NOINTERACTION
  +CLIENTSIDEONLY
  +NOCLIP
  +RIPPER
  +BLOODLESSIMPACT
  +PAINLESS
  states
  {
  Spawn:
    TNT1 A 0 
    TNT1 A 0 A_CustomMissile("DrainEffectPuff2",0,0,frandom(-180,180),2,frandom(-180,180))
    TNT1 A 2 A_CustomMissile("DrainEffectPuff2",0,0,frandom(-180,180),2,frandom(-180,180))
    stop
  Death:
    TNT1 A 3 
    stop
  }
}

ACTOR DrainEffectPuff2
{
    Projectile
	Speed 6
	+PAINLESS
	+NOCLIP
	+NOINTERACTION
	+CLIENTSIDEONLY
	+DONTSPLASH
    RenderStyle Add
	Alpha 0.6
	Scale 0.4
    States
    {
    Spawn:
	SKP4 ABCDEF 1 Bright
	Stop
    }
}

Actor DrainDuration : Inventory { Inventory.MaxAmount 0x7fffffff }
Actor DrainRange : Inventory { Inventory.MaxAmount 0x7fffffff }

Actor DrainAOEGiver : CustomInventory
{
	Inventory.MaxAmount 0
	+INVENTORY.AUTOACTIVATE
	Inventory.Icon "TNT1A0"
	States
	{
	Use:
		TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(WOC_DECORATE,STATS,PLAYERNUM,WOCTARGET) == 32,"Use32")
		TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(WOC_DECORATE,STATS,PLAYERNUM,WOCTARGET) == 31,"Use31")
		TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(WOC_DECORATE,STATS,PLAYERNUM,WOCTARGET) == 30,"Use30")
		TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(WOC_DECORATE,STATS,PLAYERNUM,WOCTARGET) == 29,"Use29")
		TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(WOC_DECORATE,STATS,PLAYERNUM,WOCTARGET) == 28,"Use28")
		TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(WOC_DECORATE,STATS,PLAYERNUM,WOCTARGET) == 27,"Use27")
		TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(WOC_DECORATE,STATS,PLAYERNUM,WOCTARGET) == 26,"Use26")
		TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(WOC_DECORATE,STATS,PLAYERNUM,WOCTARGET) == 25,"Use25")
		TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(WOC_DECORATE,STATS,PLAYERNUM,WOCTARGET) == 24,"Use24")
		TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(WOC_DECORATE,STATS,PLAYERNUM,WOCTARGET) == 23,"Use23")
		TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(WOC_DECORATE,STATS,PLAYERNUM,WOCTARGET) == 22,"Use22")
		TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(WOC_DECORATE,STATS,PLAYERNUM,WOCTARGET) == 21,"Use21")
		TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(WOC_DECORATE,STATS,PLAYERNUM,WOCTARGET) == 20,"Use20")
		TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(WOC_DECORATE,STATS,PLAYERNUM,WOCTARGET) == 19,"Use19")
		TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(WOC_DECORATE,STATS,PLAYERNUM,WOCTARGET) == 18,"Use18")
		TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(WOC_DECORATE,STATS,PLAYERNUM,WOCTARGET) == 17,"Use17")
		TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(WOC_DECORATE,STATS,PLAYERNUM,WOCTARGET) == 16,"Use16")
		TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(WOC_DECORATE,STATS,PLAYERNUM,WOCTARGET) == 15,"Use15")
		TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(WOC_DECORATE,STATS,PLAYERNUM,WOCTARGET) == 14,"Use14")
		TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(WOC_DECORATE,STATS,PLAYERNUM,WOCTARGET) == 13,"Use13")
		TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(WOC_DECORATE,STATS,PLAYERNUM,WOCTARGET) == 12,"Use12")
		TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(WOC_DECORATE,STATS,PLAYERNUM,WOCTARGET) == 11,"Use11")
		TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(WOC_DECORATE,STATS,PLAYERNUM,WOCTARGET) == 10,"Use10")
		TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(WOC_DECORATE,STATS,PLAYERNUM,WOCTARGET) == 9,"Use9")
		TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(WOC_DECORATE,STATS,PLAYERNUM,WOCTARGET) == 8,"Use8")
		TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(WOC_DECORATE,STATS,PLAYERNUM,WOCTARGET) == 7,"Use7")
		TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(WOC_DECORATE,STATS,PLAYERNUM,WOCTARGET) == 6,"Use6")
		TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(WOC_DECORATE,STATS,PLAYERNUM,WOCTARGET) == 5,"Use5")
		TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(WOC_DECORATE,STATS,PLAYERNUM,WOCTARGET) == 4,"Use4")
		TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(WOC_DECORATE,STATS,PLAYERNUM,WOCTARGET) == 3,"Use3")
		TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(WOC_DECORATE,STATS,PLAYERNUM,WOCTARGET) == 2,"Use2")
		TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(WOC_DECORATE,STATS,PLAYERNUM,WOCTARGET) == 1,"Use1")
		TNT1 A 0 A_RadiusGive("DrainAOE0", 128, RGF_MONSTERS)
		Stop
		Use1: TNT1 A 0 A_RadiusGive("DrainAOE1", 128, RGF_MONSTERS) Stop
		Use2: TNT1 A 0 A_RadiusGive("DrainAOE2", 128, RGF_MONSTERS) Stop
		Use3: TNT1 A 0 A_RadiusGive("DrainAOE3", 128, RGF_MONSTERS) Stop
		Use4: TNT1 A 0 A_RadiusGive("DrainAOE4", 128, RGF_MONSTERS) Stop
		Use5: TNT1 A 0 A_RadiusGive("DrainAOE5", 128, RGF_MONSTERS) Stop
		Use6: TNT1 A 0 A_RadiusGive("DrainAOE6", 128, RGF_MONSTERS) Stop
		Use7: TNT1 A 0 A_RadiusGive("DrainAOE7", 128, RGF_MONSTERS) Stop
		Use8: TNT1 A 0 A_RadiusGive("DrainAOE8", 128, RGF_MONSTERS) Stop
		Use9: TNT1 A 0 A_RadiusGive("DrainAOE9", 128, RGF_MONSTERS) Stop
		
		Use10: TNT1 A 0 A_RadiusGive("DrainAOE10", 128, RGF_MONSTERS) Stop
		Use11: TNT1 A 0 A_RadiusGive("DrainAOE11", 128, RGF_MONSTERS) Stop
		Use12: TNT1 A 0 A_RadiusGive("DrainAOE12", 128, RGF_MONSTERS) Stop
		Use13: TNT1 A 0 A_RadiusGive("DrainAOE13", 128, RGF_MONSTERS) Stop
		Use14: TNT1 A 0 A_RadiusGive("DrainAOE14", 128, RGF_MONSTERS) Stop
		Use15: TNT1 A 0 A_RadiusGive("DrainAOE15", 128, RGF_MONSTERS) Stop
		Use16: TNT1 A 0 A_RadiusGive("DrainAOE16", 128, RGF_MONSTERS) Stop
		Use17: TNT1 A 0 A_RadiusGive("DrainAOE17", 128, RGF_MONSTERS) Stop
		Use18: TNT1 A 0 A_RadiusGive("DrainAOE18", 128, RGF_MONSTERS) Stop
		Use19: TNT1 A 0 A_RadiusGive("DrainAOE19", 128, RGF_MONSTERS) Stop
		
		Use20: TNT1 A 0 A_RadiusGive("DrainAOE20", 128, RGF_MONSTERS) Stop
		Use21: TNT1 A 0 A_RadiusGive("DrainAOE21", 128, RGF_MONSTERS) Stop
		Use22: TNT1 A 0 A_RadiusGive("DrainAOE22", 128, RGF_MONSTERS) Stop
		Use23: TNT1 A 0 A_RadiusGive("DrainAOE23", 128, RGF_MONSTERS) Stop
		Use24: TNT1 A 0 A_RadiusGive("DrainAOE24", 128, RGF_MONSTERS) Stop
		Use25: TNT1 A 0 A_RadiusGive("DrainAOE25", 128, RGF_MONSTERS) Stop
		Use26: TNT1 A 0 A_RadiusGive("DrainAOE26", 128, RGF_MONSTERS) Stop
		Use27: TNT1 A 0 A_RadiusGive("DrainAOE27", 128, RGF_MONSTERS) Stop
		Use28: TNT1 A 0 A_RadiusGive("DrainAOE28", 128, RGF_MONSTERS) Stop
		Use29: TNT1 A 0 A_RadiusGive("DrainAOE29", 128, RGF_MONSTERS) Stop
		Use30: TNT1 A 0 A_RadiusGive("DrainAOE30", 128, RGF_MONSTERS) Stop
		Use31: TNT1 A 0 A_RadiusGive("DrainAOE31", 128, RGF_MONSTERS) Stop
		Use32: TNT1 A 0 A_RadiusGive("DrainAOE32", 128, RGF_MONSTERS) Stop
	}
}
//, 128, RGF_MONSTERS)
Actor DrainAOE0 : CustomInventory
{
	Inventory.MaxAmount 0
	+AUTOACTIVATE
	+ALWAYSPICKUP
	Inventory.PickupSound "pickup/health"
	Inventory.PickupMessage "NATURE'S SALVE" // "QUARTZ FLASK"
	var int user_Amount;
	States
	{
	Use:
		TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(WOC_DECORATE,STATS,ISFRIENDLY,ACTIVATOR) == 0, "Healing")
		Stop
	Healing:
		TNT1 A 0 ACS_ExecuteAlways(WOC_CASTDRAIN,0,0,1,0)
		Stop
	}
}

Actor DrainAOE1 : DrainAOE0 { States { Healing: TNT1 A 0 ACS_ExecuteAlways(WOC_CASTDRAIN,0,1,1,0) Stop } }
Actor DrainAOE2 : DrainAOE0 { States { Healing: TNT1 A 0 ACS_ExecuteAlways(WOC_CASTDRAIN,0,2,1,0) Stop } }
Actor DrainAOE3 : DrainAOE0 { States { Healing: TNT1 A 0 ACS_ExecuteAlways(WOC_CASTDRAIN,0,3,1,0) Stop } }
Actor DrainAOE4 : DrainAOE0 { States { Healing: TNT1 A 0 ACS_ExecuteAlways(WOC_CASTDRAIN,0,4,1,0) Stop } }
Actor DrainAOE5 : DrainAOE0 { States { Healing: TNT1 A 0 ACS_ExecuteAlways(WOC_CASTDRAIN,0,5,1,0) Stop } }
Actor DrainAOE6 : DrainAOE0 { States { Healing: TNT1 A 0 ACS_ExecuteAlways(WOC_CASTDRAIN,0,6,1,0) Stop } }
Actor DrainAOE7 : DrainAOE0 { States { Healing: TNT1 A 0 ACS_ExecuteAlways(WOC_CASTDRAIN,0,7,1,0) Stop } }
Actor DrainAOE8 : DrainAOE0 { States { Healing: TNT1 A 0 ACS_ExecuteAlways(WOC_CASTDRAIN,0,8,1,0) Stop } }
Actor DrainAOE9 : DrainAOE0 { States { Healing: TNT1 A 0 ACS_ExecuteAlways(WOC_CASTDRAIN,0,9,1,0) Stop } }

Actor DrainAOE10 : DrainAOE0 { States { Healing: TNT1 A 0 ACS_ExecuteAlways(WOC_CASTDRAIN,0,10,1,0) Stop } }
Actor DrainAOE11 : DrainAOE0 { States { Healing: TNT1 A 0 ACS_ExecuteAlways(WOC_CASTDRAIN,0,11,1,0) Stop } }
Actor DrainAOE12 : DrainAOE0 { States { Healing: TNT1 A 0 ACS_ExecuteAlways(WOC_CASTDRAIN,0,12,1,0) Stop } }
Actor DrainAOE13 : DrainAOE0 { States { Healing: TNT1 A 0 ACS_ExecuteAlways(WOC_CASTDRAIN,0,13,1,0) Stop } }
Actor DrainAOE14 : DrainAOE0 { States { Healing: TNT1 A 0 ACS_ExecuteAlways(WOC_CASTDRAIN,0,14,1,0) Stop } }
Actor DrainAOE15 : DrainAOE0 { States { Healing: TNT1 A 0 ACS_ExecuteAlways(WOC_CASTDRAIN,0,15,1,0) Stop } }
Actor DrainAOE16 : DrainAOE0 { States { Healing: TNT1 A 0 ACS_ExecuteAlways(WOC_CASTDRAIN,0,16,1,0) Stop } }
Actor DrainAOE17 : DrainAOE0 { States { Healing: TNT1 A 0 ACS_ExecuteAlways(WOC_CASTDRAIN,0,17,1,0) Stop } }
Actor DrainAOE18 : DrainAOE0 { States { Healing: TNT1 A 0 ACS_ExecuteAlways(WOC_CASTDRAIN,0,18,1,0) Stop } }
Actor DrainAOE19 : DrainAOE0 { States { Healing: TNT1 A 0 ACS_ExecuteAlways(WOC_CASTDRAIN,0,19,1,0) Stop } }

Actor DrainAOE20 : DrainAOE0 { States { Healing: TNT1 A 0 ACS_ExecuteAlways(WOC_CASTDRAIN,0,20,1,0) Stop } }
Actor DrainAOE21 : DrainAOE0 { States { Healing: TNT1 A 0 ACS_ExecuteAlways(WOC_CASTDRAIN,0,21,1,0) Stop } }
Actor DrainAOE22 : DrainAOE0 { States { Healing: TNT1 A 0 ACS_ExecuteAlways(WOC_CASTDRAIN,0,22,1,0) Stop } }
Actor DrainAOE23 : DrainAOE0 { States { Healing: TNT1 A 0 ACS_ExecuteAlways(WOC_CASTDRAIN,0,23,1,0) Stop } }
Actor DrainAOE24 : DrainAOE0 { States { Healing: TNT1 A 0 ACS_ExecuteAlways(WOC_CASTDRAIN,0,24,1,0) Stop } }
Actor DrainAOE25 : DrainAOE0 { States { Healing: TNT1 A 0 ACS_ExecuteAlways(WOC_CASTDRAIN,0,25,1,0) Stop } }
Actor DrainAOE26 : DrainAOE0 { States { Healing: TNT1 A 0 ACS_ExecuteAlways(WOC_CASTDRAIN,0,26,1,0) Stop } }
Actor DrainAOE27 : DrainAOE0 { States { Healing: TNT1 A 0 ACS_ExecuteAlways(WOC_CASTDRAIN,0,27,1,0) Stop } }
Actor DrainAOE28 : DrainAOE0 { States { Healing: TNT1 A 0 ACS_ExecuteAlways(WOC_CASTDRAIN,0,28,1,0) Stop } }
Actor DrainAOE29 : DrainAOE0 { States { Healing: TNT1 A 0 ACS_ExecuteAlways(WOC_CASTDRAIN,0,29,1,0) Stop } }

Actor DrainAOE30 : DrainAOE0 { States { Healing: TNT1 A 0 ACS_ExecuteAlways(WOC_CASTDRAIN,0,30,1,0) Stop } }
Actor DrainAOE31 : DrainAOE0 { States { Healing: TNT1 A 0 ACS_ExecuteAlways(WOC_CASTDRAIN,0,31,1,0) Stop } }
Actor DrainAOE32 : DrainAOE0 { States { Healing: TNT1 A 0 ACS_ExecuteAlways(WOC_CASTDRAIN,0,32,1,0) Stop } }

Actor DrainEffectPuffSurround : CustomInventory
{
	+inventory.AUTOACTIVATE
	Inventory.MaxAmount 0
	states
	{
	use:
		TNT1 A 0
        TNT1 A 0 A_SpawnItemEx ("DrainEffectPuff3", 64, 0, 0, 0, 0, frandom(400,600)/100.0, 0, 128, 0) 
        TNT1 A 0 A_SpawnItemEx ("DrainEffectPuff3", 64, 0, 0, 0, 0, frandom(400,600)/100.0, 10, 128, 0) 
        TNT1 A 0 A_SpawnItemEx ("DrainEffectPuff3", 64, 0, 0, 0, 0, frandom(400,600)/100.0, 20, 128, 0) 
        TNT1 A 0 A_SpawnItemEx ("DrainEffectPuff3", 64, 0, 0, 0, 0, frandom(400,600)/100.0, 30, 128, 0) 
        TNT1 A 0 A_SpawnItemEx ("DrainEffectPuff3", 64, 0, 0, 0, 0, frandom(400,600)/100.0, 40, 128, 0)                                 
        TNT1 A 0 A_SpawnItemEx ("DrainEffectPuff3", 64, 0, 0, 0, 0, frandom(400,600)/100.0, 50, 128, 0)         
        TNT1 A 0 A_SpawnItemEx ("DrainEffectPuff3", 64, 0, 0, 0, 0, frandom(400,600)/100.0, 60, 128, 0) 
        TNT1 A 0 A_SpawnItemEx ("DrainEffectPuff3", 64, 0, 0, 0, 0, frandom(400,600)/100.0, 70, 128, 0) 
      	TNT1 A 0 A_SpawnItemEx ("DrainEffectPuff3", 64, 0, 0, 0, 0, frandom(400,600)/100.0, 80, 128, 0) 
        TNT1 A 0 A_SpawnItemEx ("DrainEffectPuff3", 64, 0, 0, 0, 0, frandom(400,600)/100.0, 90, 128, 0) 
        TNT1 A 0 A_SpawnItemEx ("DrainEffectPuff3", 64, 0, 0, 0, 0, frandom(400,600)/100.0,100, 128, 0) 
        TNT1 A 0 A_SpawnItemEx ("DrainEffectPuff3", 64, 0, 0, 0, 0, frandom(400,600)/100.0,110, 128, 0) 
        TNT1 A 0 A_SpawnItemEx ("DrainEffectPuff3", 64, 0, 0, 0, 0, frandom(400,600)/100.0,120, 128, 0) 
        TNT1 A 0 A_SpawnItemEx ("DrainEffectPuff3", 64, 0, 0, 0, 0, frandom(400,600)/100.0,130, 128, 0) 
        TNT1 A 0 A_SpawnItemEx ("DrainEffectPuff3", 64, 0, 0, 0, 0, frandom(400,600)/100.0,140, 128, 0)                                 
        TNT1 A 0 A_SpawnItemEx ("DrainEffectPuff3", 64, 0, 0, 0, 0, frandom(400,600)/100.0,150, 128, 0)         
        TNT1 A 0 A_SpawnItemEx ("DrainEffectPuff3", 64, 0, 0, 0, 0, frandom(400,600)/100.0,160, 128, 0) 
        TNT1 A 0 A_SpawnItemEx ("DrainEffectPuff3", 64, 0, 0, 0, 0, frandom(400,600)/100.0,170, 128, 0) 
        TNT1 A 0 A_SpawnItemEx ("DrainEffectPuff3", 64, 0, 0, 0, 0, frandom(400,600)/100.0,180, 128, 0) 
       	TNT1 A 0 A_SpawnItemEx ("DrainEffectPuff3", 64, 0, 0, 0, 0, frandom(400,600)/100.0,190, 128, 0)                                         
       	TNT1 A 0 A_SpawnItemEx ("DrainEffectPuff3", 64, 0, 0, 0, 0, frandom(400,600)/100.0,200, 128, 0)           
        TNT1 A 0 A_SpawnItemEx ("DrainEffectPuff3", 64, 0, 0, 0, 0, frandom(400,600)/100.0,210, 128, 0)                     
        TNT1 A 0 A_SpawnItemEx ("DrainEffectPuff3", 64, 0, 0, 0, 0, frandom(400,600)/100.0,220, 128, 0)                     
        TNT1 A 0 A_SpawnItemEx ("DrainEffectPuff3", 64, 0, 0, 0, 0, frandom(400,600)/100.0,230, 128, 0)
        TNT1 A 0 A_SpawnItemEx ("DrainEffectPuff3", 64, 0, 0, 0, 0, frandom(400,600)/100.0,240, 128, 0)
        TNT1 A 0 A_SpawnItemEx ("DrainEffectPuff3", 64, 0, 0, 0, 0, frandom(400,600)/100.0,250, 128, 0)                              
        TNT1 A 0 A_SpawnItemEx ("DrainEffectPuff3", 64, 0, 0, 0, 0, frandom(400,600)/100.0,260, 128, 0)
        TNT1 A 0 A_SpawnItemEx ("DrainEffectPuff3", 64, 0, 0, 0, 0, frandom(400,600)/100.0,270, 128, 0)
        TNT1 A 0 A_SpawnItemEx ("DrainEffectPuff3", 64, 0, 0, 0, 0, frandom(400,600)/100.0,280, 128, 0)
        TNT1 A 0 A_SpawnItemEx ("DrainEffectPuff3", 64, 0, 0, 0, 0, frandom(400,600)/100.0,290, 128, 0)
		TNT1 A 0 A_SpawnItemEx ("DrainEffectPuff3", 64, 0, 0, 0, 0, frandom(400,600)/100.0,300, 128, 0)
        TNT1 A 0 A_SpawnItemEx ("DrainEffectPuff3", 64, 0, 0, 0, 0, frandom(400,600)/100.0,310, 128, 0)
        TNT1 A 0 A_SpawnItemEx ("DrainEffectPuff3", 64, 0, 0, 0, 0, frandom(400,600)/100.0,320, 128, 0)
        TNT1 A 0 A_SpawnItemEx ("DrainEffectPuff3", 64, 0, 0, 0, 0, frandom(400,600)/100.0,330, 128, 0)
        TNT1 A 0 A_SpawnItemEx ("DrainEffectPuff3", 64, 0, 0, 0, 0, frandom(400,600)/100.0,340, 128, 0)               
        TNT1 A 0 A_SpawnItemEx ("DrainEffectPuff3", 64, 0, 0, 0, 0, frandom(400,600)/100.0,350, 128, 0)               
        TNT1 A 4 A_SpawnItemEx ("DrainEffectPuff3", 64, 0, 0, 0, 0, frandom(400,600)/100.0,360, 128, 0)
		Stop
	}
}

Actor DrainEffectPuff3
{
	Projectile
	Speed 5
	+PAINLESS
	+NOCLIP
	+CLIENTSIDEONLY
	+NOINTERACTION
	+DONTSPLASH
	Damage 0
	RenderStyle Add
	//Alpha 0.45
	Scale 0.2
	States
	{
	Spawn:
		BSP4 ABCDEFGHIJKLMNOPQRSTUVWXYZ 1 Bright A_FadeOut(0.02)
		BSP5 AB 1 Bright A_FadeOut(0.3)
		Stop
	}
}

Actor SummonDeathKnight : WoC_Skill {}

Actor UseSummonDeathKnight : CustomInventory
{
	Inventory.MaxAmount 0
	+Inventory.AUTOACTIVATE
	states
	{
	Use:
		TNT1 A 0 A_SpawnItemEx("NecromancerDeathKnight", 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, SXF_NOCHECKPOSITION|SXF_SETMASTER, 0, PET4TID+ACS_ExecuteWithResult(WOC_DECORATE,STATS,PLAYERNUM))
		Stop
	}
}

ACTOR NecromancerDeathknight : WoC_FriendlyMon
{ 
Health 250
Radius 16
Height 56
Mass 700 
Speed 8
PainChance 20 
MeleeRange 78
MONSTER
+FLOORCLIP 
+FRIENDLY
Species "Player"
+THRUSPECIES
+QUICKTORETALIATE
-COUNTKILL
-ACTIVATEMCROSS
-NOTELEPORT
+NOBLOCKMONST
+NOICEDEATH
+NEVERFAST
/*+NODAMAGETHRUST*/ +DONTBLAST
+DONTHARMSPECIES
+NOBLOOD
RadiusDamageFactor 0.25
Obituary "%o got thought he could kill a deathknight."
HitObituary "A Deathknight hacked %o into pieces." 
SeeSound "monster/dknsit" 
PainSound "monster/dknpai" 
DeathSound "monster/dkndth" 
ActiveSound "monster/dknact" 
+NEVERRESPAWN
Damagetype "Physical"
DamageFactor "PoisonTime", 0.0
DamageFactor "Bleed", 0.0
DamageFactor "Holy", 1.5
DamageFactor "HolyTime", 1.5
States 
   { 
   Spawn:
		DKNT A 0
		DKNT A 0 A_SpawnItemEx("NewMinotaurSmoke")
		DKNT A 0 A_PlaySound("monster/dknsit")
		DKNT A 0 ACS_ExecuteAlways(WOC_MINIONREGEN)
		DKNT A 0 ACS_ExecuteAlways(900,0,78)
	Idle: 
       DKNT AB 10 A_Look 
       Goto See 
   Giveup:
	   DKNT A 0 A_ClearTarget
	   Goto See
   See: 
	   DKNT A 0 A_JumpIfTargetinLOS(2, 140)
	   DKNT A 0 A_Jump(50, "Giveup")
       DKNT A 0 A_Jump(32,"See2")
       DKNT A 0 A_UnSetInvulnerable
       DKNT AABBCCDD 3 A_Chase
       Goto See
   See2:
       DKNT P 0 A_SetInvulnerable
       DKNT PPQQRRSS 3 A_Chase
       DKNT S 0 A_Jump(64,"See")
       goto see2
   Melee:
	   DKNT E 0 A_SpawnItemEx("PetAlert")
       DKNT E 0 A_UnSetInvulnerable
       DKNT E 6 A_FaceTarget
       DKNT F 0 A_PlaySound("Necromancer/Knight/Swing")
       DKNT F 6 A_FaceTarget
       DKNT G 6 A_CustomMeleeAttack(ACS_NamedExecuteWithResult("WOC Player Scale", FRandom(35,55), CHARISMA, ABIL_SUMMONDEATHKNIGHT, ACTIVATOR),"Necromancer/Knight/Hit","none")
       Goto See
   Missile:
	   DKNT A 0 A_SpawnItemEx("PetAlert")
       DKNT A 0 A_FaceTarget
       DKNT A 0 A_Jump(256,"Missile1","Missile2","Missile3")
   Missile1:
       DKNT E 0 Bright A_UnSetInvulnerable
       DKNT EF 6 Bright A_FaceTarget
       DKNT F 0 Bright A_Playsound ("Necromancer/Knight/Swing")
       DKNT G 0 Bright A_CustomMissile ("NDKDart",32,0,-6,0)
       DKNT G 0 Bright A_CustomMissile ("NDKDart",32,0,-2,0)
       DKNT G 0 Bright A_CustomMissile ("NDKDart",32,0,2,0)
       DKNT G 5 Bright A_CustomMissile ("NDKDart",32,0,6,0)
       DKNT A 0 A_Jump(64,"Missile2")
       Goto See
   Missile2:
       DKNT T 0 Bright A_SetInvulnerable
       DKNT T 6 Bright A_FaceTarget
       DKNT U 1 Bright A_FaceTarget
       DKNT U 0 Bright A_CustomMissile("NFHeadShot",44,-4,-12,0)      
       DKNT U 5 Bright A_CustomMissile("NFHeadShot",44,-4,12,0)
       DKNT U 0 Bright A_UnSetInvulnerable
       DKNT U 0 A_Jump(64,"Missile3")
       Goto See
   Missile3:
       DKNT T 0 Bright A_SetInvulnerable
       DKNT T 3 Bright A_FaceTarget      
       DKNT U 3 Bright A_CustomMissile("NDKbolt",44,-4,frandom(-7,7),0)
       DKNT T 3 Bright A_FaceTarget      
       DKNT U 3 Bright A_CustomMissile("NDKbolt",44,-4,frandom(-7,7),0)
       DKNT T 3 Bright A_FaceTarget      
       DKNT U 3 Bright A_CustomMissile("NDKbolt",44,-4,frandom(-7,7),0)
       DKNT T 3 Bright A_FaceTarget      
       DKNT U 3 Bright A_CustomMissile("NDKbolt",44,-4,frandom(-7,7),0)
       DKNT T 3 Bright A_FaceTarget      
       DKNT U 3 Bright A_CustomMissile("NDKbolt",44,-4,frandom(-7,7),0)
       DKNT T 3 Bright A_FaceTarget      
       DKNT U 2 Bright A_CustomMissile("NDKbolt",44,-4,frandom(-7,7),0)
       DKNT U 0 Bright A_UnSetInvulnerable
       Goto See
   Pain:
       DKNT H 2
       DKNT H 2 A_Pain
       DKNT H 0 A_Jump(64,"Defend")
       Goto See
   Defend:
       DKNT T 105 A_SetInvulnerable
       DKNT T 0 A_UnSetInvulnerable
       DKNT P 0 A_Jump(16,1)
       Goto See+12
       DKNT A 0
       Goto See
   Death:
       DKNT I 0 Bright A_CustomMissile("NDKSword",44,32,-90,0)
       DKNT I 8 Bright A_CustomMissile("NDKShield",44,-32,90,0)
       DKNT J 8 Bright A_Scream 
       DKNT K 8 Bright
       DKNT L 8 Bright A_NoBlocking 
       DKNT MN 8 Bright 
       DKNT O 300
	   DKNT OOOOOOOOOO 2 A_FadeOut(0.1)
       Stop 
   } 
}

ACTOR NFHeadShot
{
   Radius 12
   Height 12
   Speed 15
   Damage (ACS_NamedExecuteWithResult("WOC Player Scale", FRandom(15,30), CHARISMA, ABIL_SUMMONDEATHKNIGHT, WOCTARGET))
   RENDERSTYLE ADD
   ALPHA 1.00
   PROJECTILE
   DamageType Fire
   +SEEKERMISSILE
   +FORCEXYBILLBOARD
	+MTHRUSPECIES /*+NODAMAGETHRUST*/ +DONTBLAST
	/*+NODAMAGETHRUST*/ +DONTBLAST
   Seesound "Necromancer/Knight/HeadFire"
   DeathSound "Necromancer/Knight/HeadHit"
   States
   {
   Spawn:
      SBS1 ABCD 3 Bright A_SeekerMissile (5,15,SMF_PRECISE)
      loop
   Death:
      RIP1 DEFGH 5 Bright
      stop
   }
}

ACTOR NDKDart
{
   Radius 3
   Height 12
   Speed 25
   Damage (ACS_NamedExecuteWithResult("WOC Player Scale", FRandom(3,24), CHARISMA, ABIL_SUMMONDEATHKNIGHT, WOCTARGET))
   DamageType "ShadowPlayer"
   RENDERSTYLE ADD
   ALPHA 1.00
   PROJECTILE
   +FORCEXYBILLBOARD
	+MTHRUSPECIES
	+DONTBLAST
	+FORCERADIUSDMG
   DeathSound "Necromancer/Knight/SwordHit"
   States
   {
   Spawn:
      DKAT ABC 3 Bright
      loop
   Death:
      DKAT D 0 Bright A_SetTranslucent (0.85,1)
      DKAT D 3 Bright
      DKAT E 3 Bright A_Explode(ACS_NamedExecuteWithResult("WOC Player Scale", 15, CHARISMA, ABIL_SUMMONDEATHKNIGHT, WOCTARGET),96,0)
      DKAT FG 3 Bright
      DKAT H 0 Bright A_CustomMissile("NDKFire",0,0,45,6)
      DKAT H 0 Bright A_CustomMissile("NDKFire",0,0,90,6)
      DKAT H 0 Bright A_CustomMissile("NDKFire",0,0,135,6)
      DKAT H 0 Bright A_CustomMissile("NDKFire",0,0,180,6)
      DKAT H 0 Bright A_CustomMissile("NDKFire",0,0,225,6)
      DKAT H 0 Bright A_CustomMissile("NDKFire",0,0,270,6)
      DKAT H 0 Bright A_CustomMissile("NDKFire",0,0,315,6)
      DKAT H 3 Bright A_CustomMissile("NDKFire",0,0,0,6)
      DKAT IJKLM 3 Bright
      stop
   }
}

ACTOR NDKbolt
{
   Radius 8
   Height 8
   Speed 15
   Damage (ACS_NamedExecuteWithResult("WOC Player Scale", FRandom(3,24), CHARISMA, ABIL_SUMMONDEATHKNIGHT, WOCTARGET))
   PROJECTILE
   RENDERSTYLE ADD
   ALPHA 0.80
   DamageType Fire
   +FORCEXYBILLBOARD
+MTHRUSPECIES /*+NODAMAGETHRUST*/ +DONTBLAST
	/*+NODAMAGETHRUST*/ +DONTBLAST
   SeeSound "Necromancer/Knight/BoltFire"
   DeathSound "Necromancer/Knight/BoltHit"
   States
   {
   Spawn:
      BOLT A 1 Bright A_BishopMissileWeave
      BOLT A 0 A_SpawnItemEx("RedPuff",0,0,0,0,0,0,0,128,0)
      loop
   Death:
      MSP2 EFGHI 2 Bright
      stop
   }
}

ACTOR NDKFire
{
   Radius 2
   Height 6
   Speed 4
   Damage 0
   RENDERSTYLE ADD
   ALPHA 0.95
   PROJECTILE
   +DONTSPLASH
   Damagetype "ShadowPlayer"
+MTHRUSPECIES 
+DONTBLAST
+FORCERADIUSDMG
   States
   {
   Spawn:
      DKAT NOPQRSTNOPQRSTNOPQRST 1 Bright A_Explode(ACS_NamedExecuteWithResult("WOC Player Scale", 2, CHARISMA, ABIL_SUMMONDEATHKNIGHT, WOCTARGET),8,0,0,8)
      goto death
   Death:
      DKAT UVW 3 Bright
      stop
   }
}

ACTOR NDKShield
{   
   Radius 8
   Height 8
   Speed 1
   PROJECTILE
   RENDERSTYLE Normal
   -NOGRAVITY
   +LOWGRAVITY
   +FORCEXYBILLBOARD
   States
   {
   Spawn:
      SHLD ABCDEFGHI 3
      goto death 
   Death:
	  SHLD H 300
      SHLD HHHHHHHHHH 2 A_FadeOut(0.1)
	  Stop
   }
}

ACTOR NDKSword
{   
   Radius 8
   Height 8
   Speed 1
   PROJECTILE
   RENDERSTYLE Normal
   -NOGRAVITY
   +LOWGRAVITY
   +FORCEXYBILLBOARD
   States
   {
   Spawn:
      SWRD KLMNOPQ 3 BRIGHT
      goto Death 
   Death:
      SWRD RS 4 BRIGHT
      SWRD T 4 BRIGHT
      SWRD U 4
      SWRD T 4 BRIGHT
      SWRD U 8
      SWRD T 4 BRIGHT
      SWRD U 16
      SWRD T 4 BRIGHT
	  SWRD U 300
      SWRD U 2 A_FadeOut(0.1)
	  Wait
   }
}

Actor BoneShower : WoC_Skill {}

Actor UseBoneShower : CustomInventory
{
	Inventory.MaxAmount 0
	+Inventory.AutoActivate
	Inventory.Icon "TNT1A0"
	States
	{
	Use:
		TNT1 A 0 A_FireCustomMissile("BoneShowerSpawner",0,0)
		Stop
	}
}

actor BoneShowerSpawner
{
+SKYEXPLODE
PROJECTILE
-SOLID
+NOGRAVITY
+CEILINGHUGGER
+SPAWNSOUNDSOURCE
SeeSound "ability/boneshower"
radius 4
height 8
speed 10
Reactiontime 40
States
{
Spawn:
TNT1 A 0 A_SpawnItemEx("BoneStormFX",frandom(-70,70),frandom(-70,70),-1,0,0,-25)
TNT1 A 0 A_CountDown
TNT1 A 2 A_SpawnItemEx("BoneStormFX",frandom(-70,70),frandom(-70,70),-1,0,0,-25)
Loop
Death:
TNT1 A 1
Stop
}
}

actor BoneStormFX
{
	PROJECTILE
	damage (1)
	radius 3
	+RANDOMIZE
	+MTHRUSPECIES +NODAMAGETHRUST +DONTBLAST
	-NOGRAVITY
	+FORCERADIUSDMG
	Damagetype "PhysicalPlayer"
	height 6
	Scale 0.67
	DeathSound "ability/boneshardhit"
	States
	{
	Spawn:
		SPIK G 2 bright
		loop
	Death:
		TNT1 AAAAAAAAA 0 A_SpawnItemEx("BoneShardParticle",0,0,0,frandom(-1,1),frandom(-1,1),frandom(-1,1),frandom(0,360),0)
		TNT1 A 1 A_Explode(ACS_NamedExecuteWithResult("WOC Player Scale", 15, INTELLECT, ABIL_BONESHOWER, WOCTARGET), 46, 0, 0, 46)
		stop
	}
}

ACTOR BoneShardParticle
{
    Radius 1
    Height 1
    +NOINTERACTION
	+CLIENTSIDEONLY
    RenderStyle Add
    Alpha 0.7
    Scale 0.065
    States
    {
    Spawn:
	TNT1 A 0
	BNPT A 4 Bright A_FadeOut(0.09)
	Loop
    }
}

Actor RaiseDead : WoC_Skill {}

Actor UseRaiseDead : CustomInventory
{
	Inventory.MaxAmount 0
	+Inventory.AUTOACTIVATE
	states
	{
	Use:
		TNT1 A 0 A_PlaySound("ability/raisedead")
		TNT1 A 0 A_JumpIfInventory("RaiseDead",7,3)
		TNT1 A 0 A_JumpIfInventory("RaiseDead",4,3)
		TNT1 A 0 A_Jump(256,3)
		TNT1 AAA 0 A_SpawnItemEx("RaiseDeadSpirit", 0, 0, 0, 25+ACS_ExecuteWithResult(WOC_DECORATE,NECROMANCERSKILLS,ABIL_RAISEDEAD,ACTIVATOR), 0, 0, 0, SXF_SETMASTER)
		Stop
	}
}

Actor RaiseDeadSpirit
{
	Radius 8
	Height 1
	+CANPASS
	+ISMONSTER
	+DROPOFF
	+NOTELEPORT
	+NOBLOCKMAP
	+NOCLIP
	Species "Player"
	States
	{
	Spawn: 
		HAND M 0 A_JumpIfInventory("RaiseDeadDuration", 12, "Bye")
		HAND M 1 A_Chase("","",CHF_DONTMOVE|CHF_RESURRECT)
		HAND M 0 A_GiveInventory("RaiseDeadDuration")
		Loop
	Heal:
		HAND M 0 A_SpawnItemEx("ZombieHand")
		Stop
	Bye:
		HAND M 0
		Stop
	}
}

Actor ZombieHandRezCount : Inventory
{
	Inventory.MaxAmount 3
}

Actor RaiseDeadDuration : Inventory
{
	Inventory.MaxAmount 12
}

Actor ZombieHand
{
	+CANNOTPUSH
	+NODAMAGETHRUST +DONTBLAST
	+FLOORCLIP
	+FLOORHUGGER
	+CLIENTSIDEONLY
	renderstyle Translucent
	Obituary "%o was torn appart by the undead"
	states
	{
	Spawn:
		TNT1 AAAA 0 A_SpawnItemEx("HandDirt",0,0,8,random(-4, 4),random(-4, 4),random(2, 5),0,143,176)
		HAND A 2 A_SpawnItemEx("HandDirt",0,0,8,random(-4, 4),random(-4, 4),random(2, 5),0,143,176)
		HAND B 2 A_SpawnItemEx("HandDirt",0,0,8,random(-4, 4),random(-4, 4),random(2, 5),0,143,176)
		HAND C 2 A_SpawnItemEx("HandDirt",0,0,8,random(-4, 4),random(-4, 4),random(2, 5),0,143,176)
		HAND D 2 A_SpawnItemEx("HandDirt",0,0,8,random(-4, 4),random(-4, 4),random(2, 5),0,143,176)
		HAND EFGHIJKL 2
		Goto Fade
	Fade:
		HAND M 2 A_Fadeout(0.02)
		Loop
	}
}

Actor HandDirt
{
	health 1
	radius 8
	height 1
	mass 1
	gravity 0.5
	+CORPSE
	+NOTELEPORT
	+NOBLOCKMAP
	-SOLID
	+CLIENTSIDEONLY
	states
	{
	Spawn:
		TNT1 A 1
		TNT1 A 0 A_Jump(256,"A","B","C")
		loop
	A:
		DIRT ABC 3
		loop
	B:
		DIRT DEF 3
		loop
	C:
		DIRT GHI 3
		loop
	Crash:
		TNT1 A 0 A_Stop
		DIRT JKL 3
		stop
	}
}

Actor Metamorph : WoC_Skill {}

Actor Metamorphing : WoC_Boolean {}

Actor MetamorphGiver : PowerupGiver
{
	inventory.maxamount 0
	powerup.duration -60
	powerup.type "Metamorph"
	+INVENTORY.AUTOACTIVATE
	+INVENTORY.ALWAYSPICKUP
}

Actor PowerMetamorph : PowerMorph 
{
	PowerMorph.PlayerClass "NewMetamorphesisPlayer"
	PowerMorph.MorphStyle (MRF_NEWTIDBEHAVIOUR|MRF_UNDOBYDEATHFORCED|MRF_UNDOBYDEATH)
	powerup.duration -60 
}

ACTOR BruiserWeapon : Weapon
{
	+WEAPON.AMMO_OPTIONAL
	+CHEATNOTWEAPON
	+NOAUTOFIRE
	Weapon.KickBack 0
	States
	{
	Spawn:
		TNT1 A -1
		Loop
	Ready:
		BHND A 1 Bright A_WeaponReady
		loop
	Deselect:
		BHND A 0 A_Lower
		BHND A 1 Bright A_Lower
		Loop
	Select:
		BHND A 0 A_Raise
		BHND A 1 Bright A_Raise
		Loop
	Fire:
		TNT1 A 0 A_JumpIfInventory("IsPlaguebringer",2,"FireP")
		TNT1 A 0 A_JumpIfInventory("BruiserAttackType",2,"Huggers")
		TNT1 A 0 A_JumpIfInventory("BruiserAttackType",1,"FireShower")
	Meteor:
		BHND BCD 2 Bright
		BHND E 1 Bright A_FireCustomMissile("MetamorphBall",10,0,0,0)
		BHND E 1 Bright A_FireCustomMissile("MetamorphBall",5,0,0,0)
		BHND F 1 Bright A_FireCustomMissile("MetamorphBall",0,0,0,0)
		BHND F 1 Bright A_FireCustomMissile("MetamorphBall",-5,0,0,0)
		BHND F 1 Bright A_FireCustomMissile("MetamorphBall",-10,0,0,0)
		BHND GHZ 3 Bright
		TNT1 A 0 A_Refire
		Goto Ready
	FireShower:
		BHND BCD 4 Bright
		BHND E 1 Bright A_FireCustomMissile("MetamorphBall",20,0,0,0)
		BHND E 1 Bright A_FireCustomMissile("MetamorphBall",15,0,0,0)
		BHND E 1 Bright A_FireCustomMissile("MetamorphBall",10,0,0,0)
		BHND E 1 Bright A_FireCustomMissile("MetamorphBall",5,0,0,0)
		BHND F 1 Bright A_FireCustomMissile("MetamorphBall",0,0,0,0)
		BHND F 1 Bright A_FireCustomMissile("MetamorphBall",-5,0,0,0)
		BHND F 1 Bright A_FireCustomMissile("MetamorphBall",-10,0,0,0)
		BHND F 1 Bright
		BHND GHZ 4 Bright
		TNT1 A 0 A_Refire
		Goto Ready
	Huggers:
		BHND IJK 4 Bright
		BHND L 4 Bright A_FireCustomMissile("MetamorphComet",0,0,0,0)
		BHND Z 15 Bright
		TNT1 A 0 A_Refire
		Goto Ready
	FireP:
		TNT1 A 0 A_JumpIfInventory("BruiserAttackType",2,"HuggersP")
		TNT1 A 0 A_JumpIfInventory("BruiserAttackType",1,"FireShowerP")
	MeteorP:
		BHND BCD 2 Bright
		BHND E 1 Bright A_FireCustomMissile("MetamorphBallPlaguebringer",10,0,0,0)
		BHND E 1 Bright A_FireCustomMissile("MetamorphBallPlaguebringer",5,0,0,0)
		BHND F 1 Bright A_FireCustomMissile("MetamorphBallPlaguebringer",0,0,0,0)
		BHND F 1 Bright A_FireCustomMissile("MetamorphBallPlaguebringer",-5,0,0,0)
		BHND F 1 Bright A_FireCustomMissile("MetamorphBallPlaguebringer",-10,0,0,0)
		BHND GHZ 3 Bright
		TNT1 A 0 A_Refire
		Goto Ready
	FireShowerP:
		BHND BCD 4 Bright
		BHND E 1 Bright A_FireCustomMissile("MetamorphBallPlaguebringer",20,0,0,0)
		BHND E 1 Bright A_FireCustomMissile("MetamorphBallPlaguebringer",15,0,0,0)
		BHND E 1 Bright A_FireCustomMissile("MetamorphBallPlaguebringer",10,0,0,0)
		BHND E 1 Bright A_FireCustomMissile("MetamorphBallPlaguebringer",5,0,0,0)
		BHND F 1 Bright A_FireCustomMissile("MetamorphBallPlaguebringer",0,0,0,0)
		BHND F 1 Bright A_FireCustomMissile("MetamorphBallPlaguebringer",-5,0,0,0)
		BHND F 1 Bright A_FireCustomMissile("MetamorphBallPlaguebringer",-10,0,0,0)
		BHND F 1 Bright
		BHND GHZ 4 Bright
		TNT1 A 0 A_Refire
		Goto Ready
	HuggersP:
		BHND IJK 4 Bright
		BHND L 4 Bright A_FireCustomMissile("MetamorphCometPlaguebringer",0,0,0,0)
		BHND Z 15 Bright
		TNT1 A 0 A_Refire
		Goto Ready
	AltFire:
		TNT1 A 0 A_JumpIfInventory("BruiserAttackType",2,2)
		TNT1 A 0 A_GiveInventory("BruiserAttackType",1)
		Goto Ready
		TNT1 A 0 A_TakeInventory("BruiserAttackType",2)
		Goto Ready
	}
}

ACTOR MetamorphComet
{
   Radius 8
   Height 12
   Speed 25
   damage (ACS_NamedExecuteWithResult("WOC Player Scale", FRandom(20,25), INTELLECT, ABIL_METAMORPH, WOCTARGET))
   Scale 1.0
   PROJECTILE
   RENDERSTYLE Normal
   +THRUGHOST
   +WINDTHRUST
   +MTHRUSPECIES
   +DONTBLAST
   +FORCERADIUSDMG
   +HITTRACER
   SeeSound "ArchonOfHell/Comet"
   DeathSound "ArchonOfHell/CometHit"
   Decal "Scorch"
   DONTHURTSHOOTER
   Damagetype "Poison"
   States
   {
   Spawn:
      ARCB AAAABBBBCCCC 1 Bright A_SpawnItemEx("ArchonCometTrail",0,0,0,0,0,0,0,128)
      loop
   Death:
	  TNT1 A 0 ACS_NamedExecuteWithResult("WOC DAMAGE OVER TIME", ACS_ExecuteWithResult(WOC_DECORATE,STATS,WOCTID,WOCTRACER), ACS_NamedExecuteWithResult("WOC Player Scale", FRandom(60,75), INTELLECT, ABIL_METAMORPH, WOCTARGET), 5, POISONDOT)
	  TNT1 A 0 Radius_Quake (2, 10, 0, 2, 0)
	  TNT1 A 0 Radius_Quake (2, 5, 0, 3, 0)
      ARCB JJJJJJ 0 Bright A_SpawnItemEx("ArchonCometParticle", 0, 0, 0, (0.1)*frandom(10, 35), 0, (0.1)*frandom(-20, 20), frandom(0, 360), 128)
      ARCB JJJJJJ 0 Bright A_SpawnItemEx("ArchonCometParticle", 0, 0, 0, (0.1)*frandom(10, 35), 0, (0.1)*frandom(-20, 20), frandom(0, 360), 128)
      ARCB JJJJJJ 0 Bright A_SpawnItemEx("ArchonCometParticle", 0, 0, 0, (0.1)*frandom(10, 35), 0, (0.1)*frandom(-20, 20), frandom(0, 360), 128)
      ARCB J 0 Bright A_SetTranslucent (0.67,1)
      ARCB J 3 Bright
      ARCB K 3 Bright A_Explode(ACS_NamedExecuteWithResult("WOC Player Scale", 128, INTELLECT, ABIL_METAMORPH, WOCTARGET),128,0)
      ARCB LMN 3 Bright
      stop
   }
}

Actor MetamorphCometPlaguebringer : MetamorphComet
{
	Damage (0)
	States
	{
	Death:
		TNT1 A 0 ACS_NamedExecuteWithResult("WOC DAMAGE OVER TIME", ACS_ExecuteWithResult(WOC_DECORATE,STATS,WOCTID,WOCTRACER), ACS_NamedExecuteWithResult("WOC Player Scale", FRandom(60,75), INTELLECT, ABIL_METAMORPH, WOCTARGET), 5, POISONDOT)
		TNT1 A 0 Radius_Quake (2, 10, 0, 2, 0)
		TNT1 A 0 Radius_Quake (2, 5, 0, 3, 0)
		ARCB JJJJJJ 0 Bright A_SpawnItemEx("ArchonCometParticle", 0, 0, 0, (0.1)*frandom(10, 35), 0, (0.1)*frandom(-20, 20), frandom(0, 360), 128)
		ARCB JJJJJJ 0 Bright A_SpawnItemEx("ArchonCometParticle", 0, 0, 0, (0.1)*frandom(10, 35), 0, (0.1)*frandom(-20, 20), frandom(0, 360), 128)
		ARCB JJJJJJ 0 Bright A_SpawnItemEx("ArchonCometParticle", 0, 0, 0, (0.1)*frandom(10, 35), 0, (0.1)*frandom(-20, 20), frandom(0, 360), 128)
		ARCB J 0 Bright A_SetTranslucent (0.67,1)
		ARCB J 3 Bright
		ARCB K 3 Bright A_Explode(ACS_NamedExecuteWithResult("WOC Player Scale", FRandom(148,153), INTELLECT, ABIL_METAMORPH, WOCTARGET),192,0)
		ARCB LMN 3 Bright
		stop
	}
}

Actor ArchonCometParticle
{
  Height 0
  Radius 0
  Mass 0
  +Missile
  +NoBlockMap
  +NoGravity
  +DontSplash
  +CLIENTSIDEONLY
  +NOINTERACTION
  +NOCLIP
  RenderStyle Add
  Scale 0.05
  States
  {
  Spawn:
    TNT1 A 1 Bright A_FadeOut(0.02)
    Loop
  }
}

ACTOR ArchonSoul
{   
   Radius 1
   Height 1
   Speed 3
   PROJECTILE
   +CLIENTSIDEONLY
	+NOINTERACTION
	+NOCLIP
   RENDERSTYLE ADD
   ALPHA 0.80
   States
   {
   Spawn:
      BFX1 ABCD 6 BRIGHT
      Stop 
   }
}

ACTOR ArchonCometTrail
{   
   Radius 3
   Height 3
   Scale 0.75
   Speed 0
   PROJECTILE
   +CLIENTSIDEONLY
  +NOINTERACTION
  +NOCLIP
   RENDERSTYLE ADD
   ALPHA 0.67
   States
   {
   Spawn:
      NULL A 3 Bright
      ARCB DEFGHI 3 BRIGHT
      Stop 
   }
}

Actor MetamorphBall
{
  Radius 6
  Height 16
  Speed 20
  damage (ACS_NamedExecuteWithResult("WOC Player Scale", FRandom(5,10), INTELLECT, ABIL_METAMORPH, WOCTARGET))
  SeeSound "baron/attack"
  DeathSound "baron/shotx"
  Decal "BaronScorch"
  Renderstyle Add
  Projectile
  +RANDOMIZE
  +MTHRUSPECIES
  +DONTBLAST
  +HITTRACER
  Damagetype "Poison"
  states
  {
  Spawn:
    TNT1 A 1
    TNT1 AAA 0 A_SpawnItemEx ("BaronBallFire", 0, random (1,-1), random (1,-1), 0, 0, 0, 0, 160)
    loop
  Death:
	BAL7 C 0 ACS_NamedExecuteWithResult("WOC DAMAGE OVER TIME", ACS_ExecuteWithResult(WOC_DECORATE,STATS,WOCTID,WOCTRACER), ACS_NamedExecuteWithResult("WOC Player Scale", FRandom(25,50), INTELLECT, ABIL_METAMORPH, WOCTARGET), 5, POISONDOT)
    BAL7 CDE 4 bright
    stop
  }
}

Actor MetamorphBallPlaguebringer : MetamorphBall
{
	Damage (0)
	+FORCERADIUSDMG
	States
	{
	Spawn:
		TNT1 A 1
		TNT1 AAA 0 A_SpawnItemEx ("BaronBallFire", 0, random (1,-1), random (1,-1), 0, 0, 0, 0, 160)
		loop
	Death:
		BAL7 C 0 ACS_NamedExecuteWithResult("WOC DAMAGE OVER TIME", ACS_ExecuteWithResult(WOC_DECORATE,STATS,WOCTID,WOCTRACER), ACS_NamedExecuteWithResult("WOC Player Scale", FRandom(15,30), INTELLECT, ABIL_METAMORPH, WOCTARGET), 5, POISONDOT)
		BAL7 C 0 Bright A_Explode(ACS_NamedExecuteWithResult("WOC Player Scale", FRandom(5,10), INTELLECT, ABIL_METAMORPH, WOCTARGET),20,0)
		BAL7 CDE 4 bright
		stop
	}
}

Actor BaronBallFire
{
  radius 2
  height 2
  speed 0
  damage 0
  renderstyle Add
  alpha 0.4
  Scale 1.1
  +NOBLOCKMAP
  +NOGRAVITY
  +MISSILE
  +NOTELEPORT
  +DONTSPLASH
  +CLIENTSIDEONLY
  +NOINTERACTION
  +NOCLIP
  states
  {
  Spawn:
    BARF A 0 A_Jump (255, "Animate1", "Animate2")
    loop
  Animate1:
    BARF ACEG 1 bright
    stop
  Animate2:
    BARF BDFH 1 bright
    stop
  }
}

actor BruiserAttackType : Inventory { Inventory.MaxAmount 3 }

Actor UnShootablePet : Custominventory
{
	Inventory.MaxAmount 0
	+Inventory.AUTOACTIVATE
	states
	{
		Use:
		TNT1 A 0 
		Fail
	}
}

Actor OutbreakItem : Custominventory
{
	Inventory.MaxAmount 0
	+Inventory.AUTOACTIVATE
	states
	{
	Use:
		TNT1 A 0 A_JumpIfInTargetInventory("IsPlagueBringer",1,"PlagueBringer")
		TNT1 A 0 A_JumpIfInTargetInventory("IsConjuror",1,"Conjuror")
		TNT1 A 0 A_RailWait
		Stop
	PlagueBringer:
		TNT1 A 0 A_SpawnItemEx("OutbreakSpawner", 0, 0, 32, 0, 0, 0, 0, SXF_TRANSFERPOINTERS|SXF_NOCHECKPOSITION)
		Stop
	Conjuror:
		TNT1 A 0 A_SpawnItemEx("NecromancerZombieSpawner", 0, 0, 32, 0, 0, 0, 0, SXF_TRANSFERPOINTERS|SXF_NOCHECKPOSITION)
		Stop
	}
}

Actor XOUTBREAK : WoC_Stat {}
Actor YOUTBREAK : WoC_Stat {}
Actor ZOUTBREAK : WoC_Stat {}

ACTOR OutbreakSpawner
{
    Radius 1
    PROJECTILE
    Speed 0
    Damage 0
	+PUFFGETSOWNER
    +BLOODLESSIMPACT
    +CEILINGHUGGER
    +SPAWNCEILING
    +PAINLESS
    +THRUACTORS
    +NOCLIP
	+NOBLOCKMAP
	+NOGRAVITY
	+PUFFONACTORS
	+ALWAYSPUFF
	+DONTSPLASH
	+MTHRUSPECIES
    RenderStyle None
	var int user_count;
    States
    {
    Spawn:
		TNT1 A 1
		TNT1 A 0 A_JumpIf(user_count > 4+ACS_ExecuteWithResult(WOC_DECORATE,NECROMANCERSKILLS,ABIL_BLIGHT,WOCTARGET), 4)
		TNT1 A 2 A_SpawnItemEx("BlightPoison",frandom(-50,50),frandom(-50,50),frandom(-12,12),0,0,0,frandom(1,360),32,0)
		TNT1 A 2 A_SpawnItemEx("BlightPoison",frandom(-50,50),frandom(-50,50),frandom(-12,12),0,0,0,frandom(1,360),32,0)
		TNT1 A 0 A_SetUserVar("user_count", user_count+1)
		Loop
		TNT1 A 0
		Stop
    }
}

ACTOR NecromancerZombieSpawner
{
    Radius 1
    PROJECTILE
    Speed 0
    Damage 0
    +BLOODLESSIMPACT
    +FLOORHUGGER
    +PAINLESS
    +THRUACTORS
    +NOCLIP
	+NOBLOCKMAP
	+NOGRAVITY
	+PUFFONACTORS
	+ALWAYSPUFF
	+DONTSPLASH
	+MTHRUSPECIES
    RenderStyle None
    States
    {
    Spawn:
		TNT1 A 5
		TNT1 A 0 A_JumpIfInTargetInventory("ImAPet",1,"PetSelect")
		TNT1 A 0 A_SpawnItemEx("NecromancerZombie", 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, SXF_NOCHECKPOSITION|SXF_SETMASTER,128,PET5TID+ACS_ExecuteWithResult(WOC_DECORATE,STATS,PLAYERNUM,WOCTARGET))
		TNT1 A 1
		Stop
	PetSelect:
		TNT1 A 0 A_JumpIfInTargetInventory("SummonShadow",1,"ShadowSelect")
		TNT1 A 0 A_JumpIfInTargetInventory("SummonGhoul",1,"GhoulSelect")
		TNT1 A 0 A_JumpIfInTargetInventory("SummonRevenant",1,"RevenantSelect")
		TNT1 A 0 A_JumpIfInTargetInventory("SummonDeathKnight",1,"DeathKnightSelect")
		TNT1 A 0 A_JumpIfInTargetInventory("ImAZombie",1,"ZombieSelect")
		TNT1 A 1
		Stop
	ShadowSelect:
		TNT1 A 0 A_SpawnItemEx("NecromancerZombie", 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, SXF_NOCHECKPOSITION|SXF_SETMASTER,128,PET5TID+(ACS_ExecuteWithResult(WOC_DECORATE,STATS,WOCTID,WOCTARGET)-PET1TID))
		TNT1 A 1
		Stop
	GhoulSelect:
		TNT1 A 0 A_SpawnItemEx("NecromancerZombie", 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, SXF_NOCHECKPOSITION|SXF_SETMASTER,128,PET5TID+(ACS_ExecuteWithResult(WOC_DECORATE,STATS,WOCTID,WOCTARGET)-PET2TID))
		TNT1 A 1
		Stop
	RevenantSelect:
		TNT1 A 0 A_SpawnItemEx("NecromancerZombie", 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, SXF_NOCHECKPOSITION|SXF_SETMASTER,128,PET5TID+(ACS_ExecuteWithResult(WOC_DECORATE,STATS,WOCTID,WOCTARGET)-PET3TID))
		TNT1 A 1
		Stop
	DeathKnightSelect:
		TNT1 A 0 A_SpawnItemEx("NecromancerZombie", 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, SXF_NOCHECKPOSITION|SXF_SETMASTER,128,PET5TID+(ACS_ExecuteWithResult(WOC_DECORATE,STATS,WOCTID,WOCTARGET)-PET4TID))
		TNT1 A 1
		Stop
	ZombieSelect:
		TNT1 A 0 A_SpawnItemEx("NecromancerZombie", 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, SXF_NOCHECKPOSITION,128,ACS_ExecuteWithResult(WOC_DECORATE,STATS,WOCTID,WOCTARGET))
		TNT1 A 1
		Stop
    }
}

Actor ImAZombie : WoC_Boolean {}

ACTOR NecromancerZombie : WoC_FriendlyMon
{
	Health 50
	Radius 16
	Height 56
	Speed 10
	PainChance 48
	MeleeRange 64
	Monster
	+FLOORCLIP 
	+FRIENDLY
	Species "Player"
	+THRUSPECIES
	+QUICKTORETALIATE
	-COUNTKILL
	-ACTIVATEMCROSS
	-NOTELEPORT
	+NOBLOCKMONST
	+NOICEDEATH
	+NEVERFAST
	+DONTBLAST
	+DONTHARMSPECIES
	RadiusDamageFactor 0.25
	SeeSound "ZombieFodder/sight"
	PainSound "ZombieFodder/pain"
	DeathSound "ZombieFodder/death"
	ActiveSound "ZombieFodder/active"
	Obituary "%o joins the zombies."
	DamageFactor "Holy", 1.5
	DamageFactor "HolyTime", 1.5
	DamageFactor "PoisonTime", 0.0
	States
	{
	Spawn:
		ZFOD L 0
		ZFOD L 0 ACS_NamedExecuteAlways("Conjuror Zombie Script")
		ZFOD L 5
		ZFOD KJI 5
		Goto Idle
	Idle:
		ZFOD AB 10 A_Look
		Goto See
	See:
		ZFOD AABBCCDD 3 A_Chase
		Loop
	Melee:
		ZFOD EF 6 A_FaceTarget
		ZFOD G 6 A_CustomMeleeAttack(ACS_NamedExecuteWithResult("WOC Player Scale", FRandom(8,16), CHARISMA, 0, ACTIVATOR),"ZFlesh/Hit")
		Goto See
	Pain:
		ZFOD H 4
		ZFOD H 4 A_Pain
		Goto See
	Death:
		ZFOD I 7
		ZFOD J 7 A_Scream
		ZFOD K 5 A_NoBlocking
		ZFOD L 5
		ZFOD M 350
		ZFOD M 5 A_FadeOut(0.1)
		Wait
	XDeath:
		ZFOD N 5
		ZFOD O 5 A_XScream
		ZFOD P 5 A_NoBlocking
		ZFOD QR 5
		ZFOD S 350
		ZFOD S 5 A_FadeOut(0.1)
		Wait
	}
}

ACTOR OutbreakPoison
{
    Height 3
    Radius 2
    Speed 0
    Alpha 0.80
    Scale 0.55
    RenderStyle Add
    DamageType "Poison"
    PROJECTILE
    +RIPPER
    +BLOODLESSIMPACT
    +NODAMAGETHRUST +DONTBLAST
    +DONTBLAST
	+NOINTERACTION
	+NOCLIP
	+FORCERADIUSDMG
    States
    {
    Spawn:
		BLHS AA 0 Bright A_Explode(ACS_NamedExecuteWithResult("WOC Player Scale", 40, INTELLECT, 0, WOCTARGET),30,0)
		BLHS A 0 Bright A_Jump(230,3,7,11,15,19,23,27)
		BLHS ABCDEFGHIJKLMNOPQRSTUVWXYZ 3 Bright A_FadeOut(0.03)
		BLHZ ABC 3 Bright A_FadeOut(0.03)
		Stop
    }
}

Actor ChaosAOEGiver : CustomInventory
{
	Inventory.MaxAmount 0
	+INVENTORY.AUTOACTIVATE
	Inventory.Icon "TNT1A0"
	States
	{
	Use:
		TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(WOC_DECORATE,STATS,PLAYERNUM,WOCTARGET) == 32,"Use32")
		TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(WOC_DECORATE,STATS,PLAYERNUM,WOCTARGET) == 31,"Use31")
		TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(WOC_DECORATE,STATS,PLAYERNUM,WOCTARGET) == 30,"Use30")
		TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(WOC_DECORATE,STATS,PLAYERNUM,WOCTARGET) == 29,"Use29")
		TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(WOC_DECORATE,STATS,PLAYERNUM,WOCTARGET) == 28,"Use28")
		TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(WOC_DECORATE,STATS,PLAYERNUM,WOCTARGET) == 27,"Use27")
		TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(WOC_DECORATE,STATS,PLAYERNUM,WOCTARGET) == 26,"Use26")
		TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(WOC_DECORATE,STATS,PLAYERNUM,WOCTARGET) == 25,"Use25")
		TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(WOC_DECORATE,STATS,PLAYERNUM,WOCTARGET) == 24,"Use24")
		TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(WOC_DECORATE,STATS,PLAYERNUM,WOCTARGET) == 23,"Use23")
		TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(WOC_DECORATE,STATS,PLAYERNUM,WOCTARGET) == 22,"Use22")
		TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(WOC_DECORATE,STATS,PLAYERNUM,WOCTARGET) == 21,"Use21")
		TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(WOC_DECORATE,STATS,PLAYERNUM,WOCTARGET) == 20,"Use20")
		TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(WOC_DECORATE,STATS,PLAYERNUM,WOCTARGET) == 19,"Use19")
		TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(WOC_DECORATE,STATS,PLAYERNUM,WOCTARGET) == 18,"Use18")
		TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(WOC_DECORATE,STATS,PLAYERNUM,WOCTARGET) == 17,"Use17")
		TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(WOC_DECORATE,STATS,PLAYERNUM,WOCTARGET) == 16,"Use16")
		TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(WOC_DECORATE,STATS,PLAYERNUM,WOCTARGET) == 15,"Use15")
		TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(WOC_DECORATE,STATS,PLAYERNUM,WOCTARGET) == 14,"Use14")
		TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(WOC_DECORATE,STATS,PLAYERNUM,WOCTARGET) == 13,"Use13")
		TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(WOC_DECORATE,STATS,PLAYERNUM,WOCTARGET) == 12,"Use12")
		TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(WOC_DECORATE,STATS,PLAYERNUM,WOCTARGET) == 11,"Use11")
		TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(WOC_DECORATE,STATS,PLAYERNUM,WOCTARGET) == 10,"Use10")
		TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(WOC_DECORATE,STATS,PLAYERNUM,WOCTARGET) == 9,"Use9")
		TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(WOC_DECORATE,STATS,PLAYERNUM,WOCTARGET) == 8,"Use8")
		TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(WOC_DECORATE,STATS,PLAYERNUM,WOCTARGET) == 7,"Use7")
		TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(WOC_DECORATE,STATS,PLAYERNUM,WOCTARGET) == 6,"Use6")
		TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(WOC_DECORATE,STATS,PLAYERNUM,WOCTARGET) == 5,"Use5")
		TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(WOC_DECORATE,STATS,PLAYERNUM,WOCTARGET) == 4,"Use4")
		TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(WOC_DECORATE,STATS,PLAYERNUM,WOCTARGET) == 3,"Use3")
		TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(WOC_DECORATE,STATS,PLAYERNUM,WOCTARGET) == 2,"Use2")
		TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(WOC_DECORATE,STATS,PLAYERNUM,WOCTARGET) == 1,"Use1")
		TNT1 A 0 A_RadiusGive("ChaosAOE0", 128, RGF_MONSTERS)
		Stop
		Use1: TNT1 A 0 A_RadiusGive("ChaosAOE1", 128, RGF_MONSTERS) Stop
		Use2: TNT1 A 0 A_RadiusGive("ChaosAOE2", 128, RGF_MONSTERS) Stop
		Use3: TNT1 A 0 A_RadiusGive("ChaosAOE3", 128, RGF_MONSTERS) Stop
		Use4: TNT1 A 0 A_RadiusGive("ChaosAOE4", 128, RGF_MONSTERS) Stop
		Use5: TNT1 A 0 A_RadiusGive("ChaosAOE5", 128, RGF_MONSTERS) Stop
		Use6: TNT1 A 0 A_RadiusGive("ChaosAOE6", 128, RGF_MONSTERS) Stop
		Use7: TNT1 A 0 A_RadiusGive("ChaosAOE7", 128, RGF_MONSTERS) Stop
		Use8: TNT1 A 0 A_RadiusGive("ChaosAOE8", 128, RGF_MONSTERS) Stop
		Use9: TNT1 A 0 A_RadiusGive("ChaosAOE9", 128, RGF_MONSTERS) Stop
		
		Use10: TNT1 A 0 A_RadiusGive("ChaosAOE10", 128, RGF_MONSTERS) Stop
		Use11: TNT1 A 0 A_RadiusGive("ChaosAOE11", 128, RGF_MONSTERS) Stop
		Use12: TNT1 A 0 A_RadiusGive("ChaosAOE12", 128, RGF_MONSTERS) Stop
		Use13: TNT1 A 0 A_RadiusGive("ChaosAOE13", 128, RGF_MONSTERS) Stop
		Use14: TNT1 A 0 A_RadiusGive("ChaosAOE14", 128, RGF_MONSTERS) Stop
		Use15: TNT1 A 0 A_RadiusGive("ChaosAOE15", 128, RGF_MONSTERS) Stop
		Use16: TNT1 A 0 A_RadiusGive("ChaosAOE16", 128, RGF_MONSTERS) Stop
		Use17: TNT1 A 0 A_RadiusGive("ChaosAOE17", 128, RGF_MONSTERS) Stop
		Use18: TNT1 A 0 A_RadiusGive("ChaosAOE18", 128, RGF_MONSTERS) Stop
		Use19: TNT1 A 0 A_RadiusGive("ChaosAOE19", 128, RGF_MONSTERS) Stop
		
		Use20: TNT1 A 0 A_RadiusGive("ChaosAOE20", 128, RGF_MONSTERS) Stop
		Use21: TNT1 A 0 A_RadiusGive("ChaosAOE21", 128, RGF_MONSTERS) Stop
		Use22: TNT1 A 0 A_RadiusGive("ChaosAOE22", 128, RGF_MONSTERS) Stop
		Use23: TNT1 A 0 A_RadiusGive("ChaosAOE23", 128, RGF_MONSTERS) Stop
		Use24: TNT1 A 0 A_RadiusGive("ChaosAOE24", 128, RGF_MONSTERS) Stop
		Use25: TNT1 A 0 A_RadiusGive("ChaosAOE25", 128, RGF_MONSTERS) Stop
		Use26: TNT1 A 0 A_RadiusGive("ChaosAOE26", 128, RGF_MONSTERS) Stop
		Use27: TNT1 A 0 A_RadiusGive("ChaosAOE27", 128, RGF_MONSTERS) Stop
		Use28: TNT1 A 0 A_RadiusGive("ChaosAOE28", 128, RGF_MONSTERS) Stop
		Use29: TNT1 A 0 A_RadiusGive("ChaosAOE29", 128, RGF_MONSTERS) Stop
		Use30: TNT1 A 0 A_RadiusGive("ChaosAOE30", 128, RGF_MONSTERS) Stop
		Use31: TNT1 A 0 A_RadiusGive("ChaosAOE31", 128, RGF_MONSTERS) Stop
		Use32: TNT1 A 0 A_RadiusGive("ChaosAOE32", 128, RGF_MONSTERS) Stop
	}
}
//, 128, RGF_MONSTERS)
Actor ChaosAOE0 : CustomInventory
{
	Inventory.MaxAmount 0
	+AUTOACTIVATE
	+ALWAYSPICKUP
	Inventory.PickupSound "pickup/health"
	Inventory.PickupMessage "NATURE'S SALVE" // "QUARTZ FLASK"
	var int user_Amount;
	States
	{
	Use:
		TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(WOC_DECORATE,STATS,ISFRIENDLY,ACTIVATOR) == 0, "Healing")
		Stop
	Healing:
		TNT1 A 0 ACS_ExecuteAlways(WOC_CASTCHAOS,0,0,1,0)
		Stop
	}
}

Actor ChaosAOE1 : ChaosAOE0 { States { Healing: TNT1 A 0 ACS_ExecuteAlways(WOC_CASTCHAOS,0,1,1,0) Stop } }
Actor ChaosAOE2 : ChaosAOE0 { States { Healing: TNT1 A 0 ACS_ExecuteAlways(WOC_CASTCHAOS,0,2,1,0) Stop } }
Actor ChaosAOE3 : ChaosAOE0 { States { Healing: TNT1 A 0 ACS_ExecuteAlways(WOC_CASTCHAOS,0,3,1,0) Stop } }
Actor ChaosAOE4 : ChaosAOE0 { States { Healing: TNT1 A 0 ACS_ExecuteAlways(WOC_CASTCHAOS,0,4,1,0) Stop } }
Actor ChaosAOE5 : ChaosAOE0 { States { Healing: TNT1 A 0 ACS_ExecuteAlways(WOC_CASTCHAOS,0,5,1,0) Stop } }
Actor ChaosAOE6 : ChaosAOE0 { States { Healing: TNT1 A 0 ACS_ExecuteAlways(WOC_CASTCHAOS,0,6,1,0) Stop } }
Actor ChaosAOE7 : ChaosAOE0 { States { Healing: TNT1 A 0 ACS_ExecuteAlways(WOC_CASTCHAOS,0,7,1,0) Stop } }
Actor ChaosAOE8 : ChaosAOE0 { States { Healing: TNT1 A 0 ACS_ExecuteAlways(WOC_CASTCHAOS,0,8,1,0) Stop } }
Actor ChaosAOE9 : ChaosAOE0 { States { Healing: TNT1 A 0 ACS_ExecuteAlways(WOC_CASTCHAOS,0,9,1,0) Stop } }

Actor ChaosAOE10 : ChaosAOE0 { States { Healing: TNT1 A 0 ACS_ExecuteAlways(WOC_CASTCHAOS,0,10,1,0) Stop } }
Actor ChaosAOE11 : ChaosAOE0 { States { Healing: TNT1 A 0 ACS_ExecuteAlways(WOC_CASTCHAOS,0,11,1,0) Stop } }
Actor ChaosAOE12 : ChaosAOE0 { States { Healing: TNT1 A 0 ACS_ExecuteAlways(WOC_CASTCHAOS,0,12,1,0) Stop } }
Actor ChaosAOE13 : ChaosAOE0 { States { Healing: TNT1 A 0 ACS_ExecuteAlways(WOC_CASTCHAOS,0,13,1,0) Stop } }
Actor ChaosAOE14 : ChaosAOE0 { States { Healing: TNT1 A 0 ACS_ExecuteAlways(WOC_CASTCHAOS,0,14,1,0) Stop } }
Actor ChaosAOE15 : ChaosAOE0 { States { Healing: TNT1 A 0 ACS_ExecuteAlways(WOC_CASTCHAOS,0,15,1,0) Stop } }
Actor ChaosAOE16 : ChaosAOE0 { States { Healing: TNT1 A 0 ACS_ExecuteAlways(WOC_CASTCHAOS,0,16,1,0) Stop } }
Actor ChaosAOE17 : ChaosAOE0 { States { Healing: TNT1 A 0 ACS_ExecuteAlways(WOC_CASTCHAOS,0,17,1,0) Stop } }
Actor ChaosAOE18 : ChaosAOE0 { States { Healing: TNT1 A 0 ACS_ExecuteAlways(WOC_CASTCHAOS,0,18,1,0) Stop } }
Actor ChaosAOE19 : ChaosAOE0 { States { Healing: TNT1 A 0 ACS_ExecuteAlways(WOC_CASTCHAOS,0,19,1,0) Stop } }

Actor ChaosAOE20 : ChaosAOE0 { States { Healing: TNT1 A 0 ACS_ExecuteAlways(WOC_CASTCHAOS,0,20,1,0) Stop } }
Actor ChaosAOE21 : ChaosAOE0 { States { Healing: TNT1 A 0 ACS_ExecuteAlways(WOC_CASTCHAOS,0,21,1,0) Stop } }
Actor ChaosAOE22 : ChaosAOE0 { States { Healing: TNT1 A 0 ACS_ExecuteAlways(WOC_CASTCHAOS,0,22,1,0) Stop } }
Actor ChaosAOE23 : ChaosAOE0 { States { Healing: TNT1 A 0 ACS_ExecuteAlways(WOC_CASTCHAOS,0,23,1,0) Stop } }
Actor ChaosAOE24 : ChaosAOE0 { States { Healing: TNT1 A 0 ACS_ExecuteAlways(WOC_CASTCHAOS,0,24,1,0) Stop } }
Actor ChaosAOE25 : ChaosAOE0 { States { Healing: TNT1 A 0 ACS_ExecuteAlways(WOC_CASTCHAOS,0,25,1,0) Stop } }
Actor ChaosAOE26 : ChaosAOE0 { States { Healing: TNT1 A 0 ACS_ExecuteAlways(WOC_CASTCHAOS,0,26,1,0) Stop } }
Actor ChaosAOE27 : ChaosAOE0 { States { Healing: TNT1 A 0 ACS_ExecuteAlways(WOC_CASTCHAOS,0,27,1,0) Stop } }
Actor ChaosAOE28 : ChaosAOE0 { States { Healing: TNT1 A 0 ACS_ExecuteAlways(WOC_CASTCHAOS,0,28,1,0) Stop } }
Actor ChaosAOE29 : ChaosAOE0 { States { Healing: TNT1 A 0 ACS_ExecuteAlways(WOC_CASTCHAOS,0,29,1,0) Stop } }

Actor ChaosAOE30 : ChaosAOE0 { States { Healing: TNT1 A 0 ACS_ExecuteAlways(WOC_CASTCHAOS,0,30,1,0) Stop } }
Actor ChaosAOE31 : ChaosAOE0 { States { Healing: TNT1 A 0 ACS_ExecuteAlways(WOC_CASTCHAOS,0,31,1,0) Stop } }
Actor ChaosAOE32 : ChaosAOE0 { States { Healing: TNT1 A 0 ACS_ExecuteAlways(WOC_CASTCHAOS,0,32,1,0) Stop } }

Actor HarvesterSoul0 : Custominventory
{
	Inventory.MaxAmount 0
	+Inventory.AUTOACTIVATE
	+ALWAYSPICKUP
	+FLOATBOB
	+DROPPED
	+NEVERRESPAWN
	Inventory.PickupMessage "Harvester Soul"
	var int user_amount;
	Renderstyle Add
	Inventory.PickupSound "Necromancer/SoulHarvest/Pickup"
	states
	{
	Spawn:
		SOUA A 0 A_JumpIf(user_amount>=875, "Blink")
		SOUA ABCD 4 Bright Light("HarvesterSoulLight") A_SetUserVar("user_amount", user_amount+4)
		Loop
	Blink:
		SOUA A 0 A_JumpIf(user_amount>=1050, "Vanish")
		SOUA A 0 A_SetUserVar("user_amount", user_amount+4)
		SOUA A 4 Bright Light("HarvesterSoulLight") A_SetTranslucent(0.5,1)
		SOUA A 0 A_SetUserVar("user_amount", user_amount+4)
		SOUA B 4 Bright Light("HarvesterSoulLight") A_SetTranslucent(1.0,1)
		SOUA A 0 A_SetUserVar("user_amount", user_amount+4)
		SOUA C 4 Bright Light("HarvesterSoulLight") A_SetTranslucent(0.5,1)
		SOUA D 0 A_SetUserVar("user_amount", user_amount+4)
		SOUA D 4 Bright Light("HarvesterSoulLight") A_SetTranslucent(1.0,1)
		Loop
	Use:
		//TNT1 A 0 A_RadiusGive("HarvesterSoulMana", 2048, RGF_PLAYERS)
		//TNT1 A 0 A_RadiusGive("HarvesterSoulHealth", 2048, RGF_PLAYERS|RGF_MONSTERS)
		TNT1 A 0 ACS_ExecuteAlways(WOC_HARVESTERSOUL)
		Stop
	Vanish:
		TNT1 A 0
		Stop
	}
}

Actor HarvesterSoul1 : HarvesterSoul0 { States { Use: TNT1 A 0 ACS_ExecuteAlways(WOC_HARVESTERSOUL,0,1,0,0) Stop } }
Actor HarvesterSoul2 : HarvesterSoul0 { States { Use: TNT1 A 0 ACS_ExecuteAlways(WOC_HARVESTERSOUL,0,2,0,0) Stop } }
Actor HarvesterSoul3 : HarvesterSoul0 { States { Use: TNT1 A 0 ACS_ExecuteAlways(WOC_HARVESTERSOUL,0,3,0,0) Stop } }
Actor HarvesterSoul4 : HarvesterSoul0 { States { Use: TNT1 A 0 ACS_ExecuteAlways(WOC_HARVESTERSOUL,0,4,0,0) Stop } }
Actor HarvesterSoul5 : HarvesterSoul0 { States { Use: TNT1 A 0 ACS_ExecuteAlways(WOC_HARVESTERSOUL,0,5,0,0) Stop } }
Actor HarvesterSoul6 : HarvesterSoul0 { States { Use: TNT1 A 0 ACS_ExecuteAlways(WOC_HARVESTERSOUL,0,6,0,0) Stop } }
Actor HarvesterSoul7 : HarvesterSoul0 { States { Use: TNT1 A 0 ACS_ExecuteAlways(WOC_HARVESTERSOUL,0,7,0,0) Stop } }
Actor HarvesterSoul8 : HarvesterSoul0 { States { Use: TNT1 A 0 ACS_ExecuteAlways(WOC_HARVESTERSOUL,0,8,0,0) Stop } }
Actor HarvesterSoul9 : HarvesterSoul0 { States { Use: TNT1 A 0 ACS_ExecuteAlways(WOC_HARVESTERSOUL,0,9,0,0) Stop } }

Actor HarvesterSoul10 : HarvesterSoul0 { States { Use: TNT1 A 0 ACS_ExecuteAlways(WOC_HARVESTERSOUL,0,10,0,0) Stop } }
Actor HarvesterSoul11 : HarvesterSoul0 { States { Use: TNT1 A 0 ACS_ExecuteAlways(WOC_HARVESTERSOUL,0,11,0,0) Stop } }
Actor HarvesterSoul12 : HarvesterSoul0 { States { Use: TNT1 A 0 ACS_ExecuteAlways(WOC_HARVESTERSOUL,0,12,0,0) Stop } }
Actor HarvesterSoul13 : HarvesterSoul0 { States { Use: TNT1 A 0 ACS_ExecuteAlways(WOC_HARVESTERSOUL,0,13,0,0) Stop } }
Actor HarvesterSoul14 : HarvesterSoul0 { States { Use: TNT1 A 0 ACS_ExecuteAlways(WOC_HARVESTERSOUL,0,14,0,0) Stop } }
Actor HarvesterSoul15 : HarvesterSoul0 { States { Use: TNT1 A 0 ACS_ExecuteAlways(WOC_HARVESTERSOUL,0,15,0,0) Stop } }
Actor HarvesterSoul16 : HarvesterSoul0 { States { Use: TNT1 A 0 ACS_ExecuteAlways(WOC_HARVESTERSOUL,0,16,0,0) Stop } }
Actor HarvesterSoul17 : HarvesterSoul0 { States { Use: TNT1 A 0 ACS_ExecuteAlways(WOC_HARVESTERSOUL,0,17,0,0) Stop } }
Actor HarvesterSoul18 : HarvesterSoul0 { States { Use: TNT1 A 0 ACS_ExecuteAlways(WOC_HARVESTERSOUL,0,18,0,0) Stop } }
Actor HarvesterSoul19 : HarvesterSoul0 { States { Use: TNT1 A 0 ACS_ExecuteAlways(WOC_HARVESTERSOUL,0,19,0,0) Stop } }

Actor HarvesterSoul20 : HarvesterSoul0 { States { Use: TNT1 A 0 ACS_ExecuteAlways(WOC_HARVESTERSOUL,0,20,0,0) Stop } }
Actor HarvesterSoul21 : HarvesterSoul0 { States { Use: TNT1 A 0 ACS_ExecuteAlways(WOC_HARVESTERSOUL,0,21,0,0) Stop } }
Actor HarvesterSoul22 : HarvesterSoul0 { States { Use: TNT1 A 0 ACS_ExecuteAlways(WOC_HARVESTERSOUL,0,22,0,0) Stop } }
Actor HarvesterSoul23 : HarvesterSoul0 { States { Use: TNT1 A 0 ACS_ExecuteAlways(WOC_HARVESTERSOUL,0,23,0,0) Stop } }
Actor HarvesterSoul24 : HarvesterSoul0 { States { Use: TNT1 A 0 ACS_ExecuteAlways(WOC_HARVESTERSOUL,0,24,0,0) Stop } }
Actor HarvesterSoul25 : HarvesterSoul0 { States { Use: TNT1 A 0 ACS_ExecuteAlways(WOC_HARVESTERSOUL,0,25,0,0) Stop } }
Actor HarvesterSoul26 : HarvesterSoul0 { States { Use: TNT1 A 0 ACS_ExecuteAlways(WOC_HARVESTERSOUL,0,26,0,0) Stop } }
Actor HarvesterSoul27 : HarvesterSoul0 { States { Use: TNT1 A 0 ACS_ExecuteAlways(WOC_HARVESTERSOUL,0,27,0,0) Stop } }
Actor HarvesterSoul28 : HarvesterSoul0 { States { Use: TNT1 A 0 ACS_ExecuteAlways(WOC_HARVESTERSOUL,0,28,0,0) Stop } }
Actor HarvesterSoul29 : HarvesterSoul0 { States { Use: TNT1 A 0 ACS_ExecuteAlways(WOC_HARVESTERSOUL,0,29,0,0) Stop } }

Actor HarvesterSoul30 : HarvesterSoul0 { States { Use: TNT1 A 0 ACS_ExecuteAlways(WOC_HARVESTERSOUL,0,30,0,0) Stop } }
Actor HarvesterSoul31 : HarvesterSoul0 { States { Use: TNT1 A 0 ACS_ExecuteAlways(WOC_HARVESTERSOUL,0,31,0,0) Stop } }
Actor HarvesterSoul32 : HarvesterSoul0 { States { Use: TNT1 A 0 ACS_ExecuteAlways(WOC_HARVESTERSOUL,0,32,0,0) Stop } }
	
Actor HarvesterSoulMana : CustomInventory
{
	Radius 8
	Height 8
	+FLOATBOB
	+ALWAYSPICKUP
	+AUTOACTIVATE
	Inventory.MaxAmount 0
	Inventory.PickupSound "pickup/mana"
	Inventory.PickupMessage "$TXT_MANA_BOTH" // "COMBINED MANA"
	Tag "Combined Mana"
	States
	{
	Use:
		TNT1 A 0 A_GiveInventory("Mana1", ACS_executewithresult(WOC_DECORATE,STATS,MAXMANA,ACTIVATOR)*0.075)
		TNT1 A 0 A_GiveInventory("Mana2", ACS_executewithresult(WOC_DECORATE,STATS,MAXMANA,ACTIVATOR)*0.075)
		Stop
	}
}

Actor HarvesterSoulHealth : CustomInventory
{
	Radius 8
	Height 8
	+FLOATBOB
	+ALWAYSPICKUP
	+AUTOACTIVATE
	Inventory.MaxAmount 0
	Inventory.PickupSound "pickup/mana"
	Inventory.PickupMessage "$TXT_MANA_BOTH" // "COMBINED MANA"
	Tag "Combined Mana"
	States
	{
	Use:
		TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(WOC_DECORATE,STATS,ISFRIENDLY,ACTIVATOR) == 1, "Healing")
		Stop
	Healing:
		TNT1 A 0 ACS_ExecuteAlways(WOC_HEALSCRIPT,0,ACS_ExecuteWithResult(553,0,0,0)*0.15,0,0)
		Stop
	}
}

Actor ShadowInvisible : PowerupGiver
{
	+INVENTORY.AUTOACTIVATE
	Inventory.MaxAmount 0
	Powerup.Type ShadowInvisible
}

Actor PowerShadowInvisible : PowerInvisibility
{
	+GHOST
	Powerup.Duration -10
	Powerup.Mode Translucent
	Powerup.Strength 30
}

Actor DeathKnightDamage : PowerupGiver
{
	+INVENTORY.AUTOACTIVATE
	Inventory.MaxAmount 0
	Powerup.Type DeathKnightDamage
}

Actor PowerDeathKnightDamage : PowerDamage
{
	Damagefactor "Normal", 1.15
	Powerup.Duration 35
}

Actor GhoulProtection : PowerupGiver
{
	+INVENTORY.AUTOACTIVATE
	Inventory.MaxAmount 0
	Powerup.Type GhoulProtection
}

Actor PowerGhoulProtection : PowerProtection
{
	Damagefactor "Normal", 0.85
	Powerup.Duration 35
}

Actor RevenantSpeed : PowerupGiver
{
	+INVENTORY.AUTOACTIVATE
	Inventory.MaxAmount 0
	Powerup.Type RevenantSpeed
}

Actor PowerRevenantSpeed : PowerSpeed
{
	Speed 1.15
	Inventory.Icon ""
	Powerup.Duration 35
	+PowerSpeed.NoTrail
}

Actor HarvesterDrain : PowerupGiver
{
	+INVENTORY.AUTOACTIVATE
	Inventory.MaxAmount 0
	Powerup.Type HarvesterDrain
}

Actor PowerHarvesterDrain : Powerup
{
	Powerup.Strength 0.05
	Powerup.Duration 0x7FFFFFFF
}

Actor PlaguebringerPlagueRadiusGiver : CustomInventory
{
	Inventory.MaxAmount 0
	+Inventory.AUTOACTIVATE
	states
	{
		Use:
		TNT1 A 0 A_RadiusGive("PlaguebringerPlagueGiver", 512, RGF_MONSTERS, 1)
		Stop
	}
}

Actor PlaguebringerPlagueGiver : CustomInventory
{
	Inventory.MaxAmount 0
	+AUTOACTIVATE
	+ALWAYSPICKUP
	States
	{
	Use:
		TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(WOC_DECORATE,STATS,ISFRIENDLY,ACTIVATOR) == 0, "Healing")
		Stop
	Healing:
		TNT1 A 0 A_GiveInventory("PlaguebringerPlague", 1)
		Stop
	}
}

Actor PlaguebringerPlague : PowerupGiver
{
	+INVENTORY.AUTOACTIVATE
	Inventory.MaxAmount 0
	Powerup.Type PlaguebringerPlague
}

Actor PowerPlaguebringerPlague : PowerProtection
{
	DamageFactor "Poison", 1.5
	DamageFactor "PoisonPlayer", 1.5
	DamageFactor "PoisonTime", 1.5
	Powerup.Duration 35
}