Actor MFireball : WoC_Skill {}

Actor UseMFireBall : Custominventory
{
	+Inventory.AUTOACTIVATE
	states
	{
		Use:
		TNT1 A 0 A_PlaySound("Mage/Fireball/Fire")
		TNT1 A 0 A_JumpIfInventory("MFireBall",4,"SuperFireball")
		TNT1 A 0 A_FireCustomMissile("FireBallFx",0,0)
		Stop
		SuperFireball:
		TNT1 A 0 A_FireCustomMissile("SuperFireBallFx",0,0)
		Stop
	}
}

ACTOR SuperFireballFX
{
	Speed 23
	Radius 6
	Height 8
	Damage 0
	Damagetype Fire
	Renderstyle Add
	Projectile
	-NOGRAVITY
	-THRUGHOST
	+NOWALLBOUNCESND
	+MTHRUSPECIES
	+DONTBLAST
	Gravity 0.1
	DeathSound "Mage/Fireball/Impact"
	Obituary "%o roasted on %k 's fireball"
	States
	{
	Spawn:
		SBS1 A 2 Bright
		SBS1 BCD 3 Bright
		Loop
	Death:
		TNT1 A 0 A_CustomMissile("Fireballfx",0,0,-180,4,0)
		TNT1 A 0 A_JumpIfInTargetInventory("MFireball",7,"SuperDeath")
		TNT1 AA 0 A_CustomMissile("Fireballfx2",0,0,frandom(-180,180),4,0)
		Stop
	SuperDeath:
		TNT1 AAAA 0 A_CustomMissile("Fireballfx2",0,0,frandom(-180,180),4,0)
		Stop
	}
}

ACTOR FireballFX
{
	Speed 23
	Radius 6
	Height 8
	Damage (1)
	Damagetype Fire
	Renderstyle Add
	Projectile
	-NOGRAVITY
	-THRUGHOST
	+NOWALLBOUNCESND
	+MTHRUSPECIES 
	+DONTBLAST
	Gravity 0.1
	BounceFactor 0.8
	BounceCount 7
	+HEXENBOUNCE
	+FORCERADIUSDMG
	DeathSound "Mage/Fireball/Impact"
	Obituary "%o roasted on %k 's fireball"
	States
	{
	Spawn:
		SBS1 A 2 Bright
		SBS1 BCD 3 Bright
		Loop
	Death:
		FX13 I 0 Radius_Quake(2,8,0,2,0)
		FX13 I 0 Radius_Quake(1,6,0,3,0)
		FX13 I 0 A_JumpIfInTargetInventory("IsPyro", 1, "Pyro")
		FX13 I 2 Bright A_Explode(ACS_NamedExecuteWithResult("WOC Player Scale", 80, INTELLECT, ABIL_FIREBALL, WOCTARGET), 125, 0, 1)
		FX13 JKLM 2 Bright
		Stop
	Pyro:
		FX13 I 2 Bright A_Explode(ACS_NamedExecuteWithResult("WOC Player Scale", 80, INTELLECT, ABIL_FIREBALL, WOCTARGET), 125, 0, 1, 125)
		FX13 JKLM 2 Bright
		Stop
	}
}

ACTOR FireballFX2 : FireballFX
{
	Scale 0.8
	Radius 4
	Height 6
	States
	{
	Death:
		FX13 I 0 Radius_Quake(1,8,0,3,0)
		FX13 I 0 A_JumpIfInTargetInventory("IsPyro", 1, "Pyro")
		FX13 I 2 Bright A_Explode(ACS_NamedExecuteWithResult("WOC Player Scale", 20, INTELLECT, ABIL_FIREBALL, WOCTARGET), 80, 0, 1)
		FX13 JKLM 2 Bright
		Stop
	Pyro:
		FX13 I 2 Bright A_Explode(ACS_NamedExecuteWithResult("WOC Player Scale", 20, INTELLECT, ABIL_FIREBALL, WOCTARGET), 80, 0, 1, 80)
		FX13 JKLM 2 Bright
		Stop
	}
}


Actor Telekinesis : WoC_Skill {}

Actor NewBlastEffect : BlastEffect replaces BlastEffect { Renderstyle Add }

Actor Teleblast : CustomInventory 
{ 
	+AUTOACTIVATE 
	+Inventory.AUTOACTIVATE
	states
	{
	Use:
		TNT1 A 0 A_Blast(BF_NOIMPACTDAMAGE, 192+ACS_ExecuteWithResult(WOC_DECORATE,MAGESKILLS,ABIL_TELEKINESIS,ACTIVATOR)*10+ACS_ExecuteWithResult(WOC_DECORATE,STATS,WISDOM,ACTIVATOR),192+ACS_ExecuteWithResult(WOC_DECORATE,MAGESKILLS,ABIL_TELEKINESIS,ACTIVATOR)*10+ACS_ExecuteWithResult(WOC_DECORATE,STATS,WISDOM,ACTIVATOR),10+ACS_ExecuteWithResult(WOC_DECORATE,MAGESKILLS,ABIL_TELEKINESIS,ACTIVATOR)*1+ACS_ExecuteWithResult(WOC_DECORATE,STATS,WISDOM,ACTIVATOR)*0.025,"NewBlastEffect","BlastRadius")
		Stop
	}
}

Actor IceBolt : WoC_Skill {}

Actor UseIceBolt : CustomInventory
{
	Inventory.MaxAmount 0
	+Inventory.AutoActivate
	Inventory.Icon "TNT1A0"
	States
	{
	Use:
		TNT1 A 0 A_JumpIfInventory("IceBolt", 7, "Shot1")
		TNT1 A 0 A_JumpIfInventory("IceBolt", 4, "Shot2")
	Shot3:
		TNT1 A 0 A_PlaySound("Mage/IceBolt/Small")
		TNT1 A 0 A_FireCustomMissile("IceBoltMissile",0,0)
		Stop
	Shot2:
		TNT1 A 0 A_PlaySound("Mage/IceBolt/Small")
		TNT1 A 0 A_FireCustomMissile("IceBoltMissile2",0,0)
		Stop
	Shot1:
		TNT1 A 0 A_PlaySound("Mage/IceBolt/Large")
		TNT1 A 0 A_FireCustomMissile("IceBoltMissile3",0,0)
		Stop
	}
}

Actor IceBoltMissile
{
	Speed 50
	Radius 6
	Height 8
	Damage (ACS_NamedExecuteWithResult("WOC Player Scale", FRandom(25,40), INTELLECT, ABIL_ICEBOLT, WOCTARGET))
	DamageType "Ice"
	Projectile
	Renderstyle Add
	+WINDTHRUST
	+THRUGHOST
	+MTHRUSPECIES /*+NODAMAGETHRUST*/ +DONTBLAST
	DeathSound "Mage/IceBolt/Impact"
	States
	{
	Spawn:
		SHRD A 0
		SHRD A 0 A_JumpIfInTargetInventory("IsIceborn",1,"Iceborn")
	Animation:
		SHRD AAABBBCCC 1 Bright A_SpawnItemEx("FrostMissileFog", 0, 0, 1, 4, 0, frandom(-0.5, 0.5), frandom(-10, 10), 128)
		Loop
	Iceborn:
		SHRD A 0 A_ChangeFlag("ForcePain", 1)
		Goto Animation
	Death:
		SHEX ABCDE 5 Bright
		Stop
	}
}

Actor IceBoltMissile2 : IceBoltMissile
{
	Scale 0.3
	Damage (ACS_NamedExecuteWithResult("WOC Player Scale", FRandom(40,55), INTELLECT, ABIL_ICEBOLT, WOCTARGET))
	States
	{
	Spawn:
		BREA A 0
		BREA A 0 Bright A_JumpIfInTargetInventory("IsIceborn",1,"Iceborn")
	Animation:
		BREA A 1 bright A_CustomMissile("IceyTrailSmall",0,0,0)
		loop
	Iceborn:
		BREA A 0 A_ChangeFlag("ForcePain", 1)
		Goto Animation
	Death:
		BREA BCD 3 Bright
		Stop
	}
}

Actor IceBoltMissile3
{
	radius 6
	height 8
	renderstyle Add
	scale 0.5
	obituary "%o frosted over from %k's pointy ice thing!"
	speed 50
	Damage 0
	damagetype "Ice"
	DeathSound "Mage/IceBolt/Impact"
	PROJECTILE
	//+RIPPER
	+WINDTHRUST
	+THRUGHOST
	+MTHRUSPECIES /*+NODAMAGETHRUST*/ +DONTBLAST
	+FORCERADIUSDMG
	states
	{
	Spawn:
		BREA A 0
		BREA A 0 Bright A_JumpIfInTargetInventory("IsIceborn",1,"Iceborn")
	Animation:
		BREA A 1 bright A_CustomMissile("IceyTrail",0,0,0)
		loop
	Iceborn:
		BREA A 0 A_ChangeFlag("ForcePain", 1)
		Goto Animation
	Death:
		BREA B 0 Bright A_Explode(ACS_NamedExecuteWithResult("WOC Player Scale", FRandom(55,70), INTELLECT, ABIL_ICEBOLT, WOCTARGET),64,0,0,64)
		BREA BCD 3 bright
		stop
	}
}

Actor IceyTrail
{
	renderstyle Add
	alpha 0.5
	scale 0.15
	//seesound "borealsparkles"
	PROJECTILE
	+CLIENTSIDEONLY +DONTBLAST
	+NOINTERACTION
	+NOCLIP
	+DONTSPLASH
	states
	{
	Spawn:
		BREA B 1 bright
		BREA B 3 bright
		BREA B 3 bright A_SetTranslucent(0.9,1)
		BREA B 3 bright A_SetTranslucent(0.7,1)
		BREA B 3 bright A_SetTranslucent(0.5,1)
		BREA B 3 bright A_SetTranslucent(0.3,1)
		BREA B 3 bright A_SetTranslucent(0.1,1)
	Death:
		TNT1 A 3 bright
		stop
	}
}

Actor IceyTrailSmall : IceyTrail { Scale 0.09 }

Actor MSpark : WoC_Skill {}

Actor Sparking : CustomInventory
{
	+INVENTORY.UNDROPPABLE
	+FLOATBOB
	+INVENTORY.INVBAR
	+INVENTORY.PICKUPFLASH
	+INVENTORY.FANCYPICKUPSOUND
	+INVENTORY.AUTOACTIVATE
	Inventory.Icon "ARTIABSO"
	Inventory.PickupSound "misc/p_pkup"
	Inventory.MaxAmount 1
	States
	{
	Use:
		TNT1 A 0 A_AlertMonsters
		TNT1 A 0 A_FireBullets(14,8.875,15+ACS_ExecuteWithResult(WOC_DECORATE,MAGESKILLS,ABIL_SPARK,ACTIVATOR),0,"SparkingPuff",FBF_NORANDOM, 1024)
		stop
	}
}

ACTOR SparkingPuff
{
	+NOBLOCKMAP
	+NOGRAVITY
	+PUFFGETSOWNER
	+PUFFONACTORS
	+ALWAYSPUFF
	+BLOODLESSIMPACT
	+MTHRUSPECIES
	+FORCERADIUSDMG
	RenderStyle Add
	scale 0.4
	Mass 1
	SeeSound "Mage/Spark/Impact"
	AttackSound "Mage/Spark/Impact"
	ActiveSound "Mage/Spark/Impact"
	Damagetype "Lightning"
	States
	{
	Spawn:
		FAXE R 0 Bright
		FAXE RSTUVWX 2 Bright A_Explode(ACS_NamedExecuteWithResult("WOC Player Scale", 1, INTELLECT, ABIL_SPARK, WOCTARGET),32,0,0,32)
		Stop
	}
}

Actor FireTrap : WoC_Skill {}

Actor UseFireTrap : CustomInventory
{
	Inventory.MaxAmount 0
	+Inventory.AUTOACTIVATE
	states
	{
	Use:
		TNT1 A 0 A_PlaySound("Mage/Firetrap/Summon")
		TNT1 A 0 A_SpawnItemEx("FireTrapEffects", cos(pitch)*140,0,32-(sin(pitch)*140))
		Stop
	}
}

ACTOR FireTrapEffects
{
	health 20
	Radius 8
	Height 5
	speed 0
	Damage (1)
	Mass 1000000
	+NOBLOOD
	-SHOOTABLE
	-NOBLOCKMAP
	+NOGRAVITY
	+MISSILE
	+MTHRUSPECIES /*+NODAMAGETHRUST*/ +DONTBLAST
	+DONTREFLECT
	+NOCLIP
	+FORCERADIUSDMG
	Reactiontime 135
	RenderStyle Add
	Damagetype "Fire"
	Alpha 0.0
	DeathSound "Mage/Firetrap/Impact"
	Obituary "%o walked right into a trap"
	States
	{
	Spawn:
		MSP1 ABCDEF 5 BRIGHT A_SetTranslucent(alpha+0.2,1)
		MSP1 A 0 A_ChangeFlag("NoClip",0)
	Spawn2:
		MSP1 ABCDEF 5 BRIGHT A_Countdown
		Loop
	Death:
		TNT1 A 0 Radius_Quake(3,12,0,3,0)
		TNT1 A 0 Radius_Quake(1,7,0,5,0)
		MSP1 I 0 A_SetTranslucent(1,1)
		MSP1 I 0 A_JumpIfInTargetInventory("IsPyro",1,"Pyro")
		MSP1 I 0 A_Explode(ACS_NamedExecuteWithResult("WOC Player Scale", 128, INTELLECT, ABIL_FIRETRAP, WOCTARGET),150,0,1)
		MSPI I 0 A_JumpIfInTargetInventory("FireTrap",4,"FireTrapBoom")
		MSP1 I 0 A_Scream
		MSP1 GHIJKLMNOP 3 BRIGHT A_FadeOut(0.05)
		Stop
	Pyro:
		MSP1 I 0 A_Explode(ACS_NamedExecuteWithResult("WOC Player Scale", 128, INTELLECT, ABIL_FIRETRAP, WOCTARGET),150,0,1,150)
		MSPI I 0 A_JumpIfInTargetInventory("FireTrap",4,"FireTrapBoom")
		MSP1 I 0 A_Scream
		MSP1 GHIJKLMNOP 3 BRIGHT A_FadeOut(0.05)
		Stop
	FireTrapBoom:
		MSP1 I 0 Bright A_CustomMissile("FireTrapBoom",0,0,0,6)
		MSP1 I 0 Bright A_CustomMissile("FireTrapBoom",0,0,45,6)
		MSP1 I 0 Bright A_CustomMissile("FireTrapBoom",0,0,90,6)
		MSP1 I 0 Bright A_CustomMissile("FireTrapBoom",0,0,135,6)
		MSP1 I 0 Bright A_CustomMissile("FireTrapBoom",0,0,180,6)
		MSP1 I 0 Bright A_CustomMissile("FireTrapBoom",0,0,225,6)
		MSP1 I 0 Bright A_CustomMissile("FireTrapBoom",0,0,270,6)
		MSP1 I 0 Bright A_CustomMissile("FireTrapBoom",0,0,315,6)
		MSP1 I 0 A_Scream
		MSP1 GHIJKLMNOP 3 BRIGHT A_FadeOut(0.05)
		Stop
	}
}

ACTOR FireTrapBoom
{
   Radius 1
   Height 1
   Speed 6
   Damage 0
   PROJECTILE
   RENDERSTYLE ADD
   DONTHURTSHOOTER
   +RIPPER
   +MTHRUSPECIES /*+NODAMAGETHRUST*/ +DONTBLAST
   +BLOODLESSIMPACT
   SeeSound "Mage/Firetrap/Impact"
   ALPHA 0.80
   States
   {
   Spawn:
	  TNT1 A 0
	  TNT1 A 0 A_JumpIfInTargetInventory("FireTrap",7,"Level7")
	  TNT1 AA 6 A_SpawnItemEx("FireTrapBoomFX",0,0)
      Stop
   Level7:
      TNT1 AAAA 6 A_SpawnItemEx("FireTrapBoomFX",0,0)
      Stop
   }
}

ACTOR FireTrapBoomFX
{   
	Radius 5
	Height 5
	PROJECTILE
	RENDERSTYLE ADD
	+MTHRUSPECIES /*+NODAMAGETHRUST*/ +DONTBLAST
	+FORCERADIUSDMG
	Damagetype fire
	ALPHA 1
	SeeSound "Mage/Firetrap/Impact"
	States
	{
	Spawn:
		MSP1 G 3 Bright
		MSP1 H 0 Bright A_JumpIfInTargetInventory("IsPyro",1,"Pyro")
		MSP1 H 3 Bright A_Explode (ACS_NamedExecuteWithResult("WOC Player Scale", 12, INTELLECT, ABIL_FIRETRAP, WOCTARGET),80,0)
		MSP1 IJKLMNOP 3 A_FadeOut(0.05)
		stop
	Pyro:
		MSP1 H 3 Bright A_Explode (ACS_NamedExecuteWithResult("WOC Player Scale", 12, INTELLECT, ABIL_FIRETRAP, WOCTARGET),80,0,1,80)
		MSP1 IJKLMNOP 3 A_FadeOut(0.05)
		stop
	}
}

Actor ManaCharge : WoC_Skill {}

Actor ManaChargeAuraIcon : PowerupGiver
{
	Powerup.Type "ManaChargeAuraIcon"
	Powerup.Duration 35
	+INVENTORY.AUTOACTIVATE
	Inventory.MaxAmount 0
}

Actor PowerManaChargeAuraIcon : Powerup
{
	Powerup.Duration 35
	Inventory.Icon "MCHAICON"
}

Actor ManaChargeingAura : PowerupGiver
{
	Powerup.Type "ManaChargeingAura"
	Powerup.Duration 0x7FFFFFFF
	+INVENTORY.AUTOACTIVATE
	Inventory.MaxAmount 0
}

Actor PowerManaChargeingAura : PowerDamage
{
	DamageFactor "ADZ", 1.0
	Powerup.Duration 0x7FFFFFFF
	Inventory.Icon "MCHAICON"
}

Actor ManaChargeEffects
{
	+Missile
	+NoGravity
	+NoBlockmap
	+NoInteraction
	-Solid
	+CLIENTSIDEONLY +DONTBLAST
	VSpeed 6
	Radius 0
	Height 0
	RenderStyle Add
	Alpha 0.03
	Scale 0.37
	//translation "80:111=196:207"
	States
	{
	Spawn:
		SPFX B 0
		SPFX B 0 A_Jump(256,"Blue","Green")
	Blue:
		SPFX BBBBB 1 Bright A_FadeIn(0.2)
		SPFX BBBBBBBBBBBBBBBB 1 Bright A_FadeOut(0.06)
		Stop
	Green:
		SPFX CCCCC 1 Bright A_FadeIn(0.2)
		SPFX CCCCCCCCCCCCCCCC 1 Bright A_FadeOut(0.06)
		Stop
	}
}

Actor DeepFreeze : WoC_Skill {}

Actor UseDeepFreeze : CustomInventory
{
	Inventory.MaxAmount 0
	+Inventory.AUTOACTIVATE
	states
	{
		use:
		TNT1 A 0 A_PlaySound("Mage/DeepFreeze/Fire")
		TNT1 A 0 A_FireCustomMissile("DeepFreezeMissile",0,0)
		Stop
	}
}

ACTOR DeepFreezeMissile
{
	Speed 17
	Radius 6
	Height 8
	Damage 0
	DamageType Ice
	PROJECTILE
	+NOBLOCKMAP
	+NOGRAVITY
	+DROPOFF
	+MISSILE
	+NOTELEPORT
	+WINDTHRUST
	+THRUGHOST
	+RIPPER
	+NOBOSSRIP
	+BLOODLESSIMPACT
	+MTHRUSPECIES /*+NODAMAGETHRUST*/ +DONTBLAST
	+FORCERADIUSDMG
	//SeeSound "Mage/DeepFreeze/Fire"
	DeathSound "Mage/DeepFreeze/Impact"
	Obituary "%o was cooled off by %k"
	Renderstyle Add
	States
	{
	Spawn:
		TNT1 A 0
		TNT1 A 0 A_JumpIfInTargetInventory("IsIceborn",1,"Iceborn")
		TNT1 A 0 A_SpawnItemEx("FrostFangFog2", 0, 0, 0, frandom(1, 2), 0, frandom(-1, 1), frandom(-30, 30), 128)
		TNT1 A 1 A_SpawnItemEx("FrostFangBallParticle", 0, 0, 0, frandom(3, 4), 0, frandom(-0.5, 0.5), frandom(-15, 15), 128)
		goto Xplode
	Iceborn:
		TNT1 A 0 A_ChangeFlag("ForcePain", 1)
		TNT1 A 0 A_SpawnItemEx("FrostFangFog2", 0, 0, 0, frandom(1, 2), 0, frandom(-1, 1), frandom(-30, 30), 128)
		TNT1 A 1 A_SpawnItemEx("FrostFangBallParticle", 0, 0, 0, frandom(3, 4), 0, frandom(-0.5, 0.5), frandom(-15, 15), 128)
		goto Xplode
	Xplode:
		TNT1 A 0 A_SpawnItemEx("FrostFangFog2", 0, 0, 0, frandom(1, 2), 0, frandom(-1, 1), frandom(-30, 30), 128)
		TNT1 A 1 A_SpawnItemEx("FrostFangBallParticle", 0, 0, 0, frandom(3, 4), 0, frandom(-0.5, 0.5), frandom(-15, 15), 128)
		TNT1 A 0 A_SpawnItemEx("FrostFangFog2", 0, 0, 0, frandom(1, 2), 0, frandom(-1, 1), frandom(-30, 30), 128)
		TNT1 A 1 A_SpawnItemEx("FrostFangBallParticle", 0, 0, 0, frandom(3, 4), 0, frandom(-0.5, 0.5), frandom(-15, 15), 128)
		TNT1 A 0 A_SpawnItemEx("FrostFangFog2", 0, 0, 0, frandom(1, 2), 0, frandom(-1, 1), frandom(-30, 30), 128)
		TNT1 A 1 A_SpawnItemEx("FrostFangBallParticle", 0, 0, 0, frandom(3, 4), 0, frandom(-0.5, 0.5), frandom(-15, 15), 128)
		TNT1 A 0 A_SpawnItemEx("FrostFangFog2", 0, 0, 0, frandom(1, 2), 0, frandom(-1, 1), frandom(-30, 30), 128)
		TNT1 A 1 A_SpawnItemEx("FrostFangBallParticle", 0, 0, 0, frandom(3, 4), 0, frandom(-0.5, 0.5), frandom(-15, 15), 128)
		TNT1 A 0 A_Explode(ACS_NamedExecuteWithResult("WOC Player Scale", 20, INTELLECT, ABIL_DEEPFREEZE, WOCTARGET),150,0)
		loop
	Death:
		FFBL C 0 Bright A_Explode(ACS_NamedExecuteWithResult("WOC Player Scale", 60, INTELLECT, ABIL_DEEPFREEZE, WOCTARGET),150,0)
		FFBL CDEFG 4 Bright
		Stop
	}
}

Actor FrostFangBallParticle
{
	Radius 1
	Height 1
	+NoGravity
	+NoClip
	+CLIENTSIDEONLY +DONTBLAST
	+DONTSPLASH
	+NOINTERACTION
	RenderStyle Add
	Alpha 0.8
	Scale 0.6
	States
	{
	Spawn:
		FFFG A 4 BRIGHT A_FadeOut(0.2)
		Loop
	}
}

Actor FrostFangFog2
{
	Radius 1
	Height 1
	+NoGravity
	+NoClip
	+CLIENTSIDEONLY +DONTBLAST
	+DONTSPLASH
	+NOINTERACTION
	RenderStyle Add
	Alpha 0.2
	XScale 0.6
	YScale 0.4
	States
	{
	Spawn:
		FFFG A 4 BRIGHT A_FadeOut(0.03)
		Loop
	}
}

Actor EnergyAbsorb : WoC_Skill {}
	
Actor Meteor : WoC_Skill {}

ACTOR UseMeteor : CustomInventory
{
	+inventory.AUTOACTIVATE
	states
	{
	use:
		TNT1 A 0 A_PlaySound("Mage/Meteor/Fire")
		TNT1 A 0 A_FireCustomMissile("MeteorMissile",0,0,0,0)
		stop
	}
}

Actor MeteorMissile
{
	Radius 10
	Height 12
	Speed 35
	Damage (1)
	Scale 1
	Projectile
	Damagetype "Fire"
	+MTHRUSPECIES /*+NODAMAGETHRUST*/ +DONTBLAST
	+FORCERADIUSDMG
	//SeeSound "Mage/Meteor/Fire"
	DeathSound "Mage/Meteor/Impact"
	Decal Scorch
	States
	{
	Spawn:
		COMT AAAABBBBCCCC 1 Bright A_SpawnItemEx("MeteorMissileTrail", 0, 0, 0, 0, 0, 0, 0, 128)
		Loop
	Death:
		WRBL D 0 Radius_Quake(3,15,0,5,0)
		WRBL D 0 Radius_Quake(1,8,0,7,0)
		TNT1 A 0 Bright A_JumpIfInTargetInventory("Meteor",5,"SuperDeath")
		TNT1 A 0 Bright A_CustomMissile("MeteorMissileFlare",0,0,45,6,60)
		TNT1 A 0 Bright A_CustomMissile("MeteorMissileFlare",0,0,135,6,60)
		TNT1 A 0 Bright A_CustomMissile("MeteorMissileFlare",0,0,225,6,60)
		TNT1 A 0 Bright A_CustomMissile("MeteorMissileFlare",0,0,315,6,60)
		COMT D 3 Bright A_SpawnItemEx("MeteorMissileDeathGlow", 0, 0, 0, 0, 0, 0, 0, 128)
		COMT E 0 Bright A_JumpIfInTargetInventory("IsPyro",1,"Pyro")
		COMT E 3 Bright A_Explode (ACS_NamedExecuteWithResult("WOC Player Scale", 128, INTELLECT, ABIL_METEOR, WOCTARGET), 272, 0)
		TNT1 A 9 A_SpawnItemEx("MeteorMissileDeath", 0, 0, 0, 0, 0, 0, 0, 128)
		Stop
	Pyro:
		COMT E 3 Bright A_Explode (ACS_NamedExecuteWithResult("WOC Player Scale", 128, INTELLECT, ABIL_METEOR, WOCTARGET), 272, 0, 0, 272)
		TNT1 A 9 A_SpawnItemEx("MeteorMissileDeath", 0, 0, 0, 0, 0, 0, 0, 128)
		Stop
	SuperDeath:
		TNT1 A 0 Bright A_CustomMissile("MeteorMissileFlare",0,0,0,6,60)
		TNT1 A 0 Bright A_CustomMissile("MeteorMissileFlare",0,0,45,6,60)
		TNT1 A 0 Bright A_CustomMissile("MeteorMissileFlare",0,0,90,6,60)
		TNT1 A 0 Bright A_CustomMissile("MeteorMissileFlare",0,0,135,6,60)
		TNT1 A 0 Bright A_CustomMissile("MeteorMissileFlare",0,0,180,6,60)
		TNT1 A 0 Bright A_CustomMissile("MeteorMissileFlare",0,0,225,6,60)
		TNT1 A 0 Bright A_CustomMissile("MeteorMissileFlare",0,0,270,6,60)
		TNT1 A 0 Bright A_CustomMissile("MeteorMissileFlare",0,0,315,6,60)
		COMT D 3 Bright A_SpawnItemEx("MeteorMissileDeathGlow", 0, 0, 0, 0, 0, 0, 0, 128)
		COMT E 0 Bright A_JumpIfInTargetInventory("IsPyro",1,"Pyro")
		COMT E 3 Bright A_Explode (ACS_NamedExecuteWithResult("WOC Player Scale", 128, INTELLECT, ABIL_METEOR, WOCTARGET), 272, 0)
		TNT1 A 0 A_SpawnItemEx("MeteorMissileDeath", 0, 0, 0, 0, 0, 0, 0, 128)
		Stop
	}
}

Actor MeteorMissileTrail
{
	Projectile
	+NoClip
	+CLIENTSIDEONLY +DONTBLAST
	+DONTSPLASH
	+NOINTERACTION
	RenderStyle Add
	Alpha 0.4
	Scale 1.45
	States
	{
	Spawn:
		FRTB ABCDEFGHI 1 Bright
		Stop
	}
}

Actor MeteorMissileDeathGlow : MeteorMissileTrail
{
	Scale 2.0
	Alpha 0.6
	States
	{
	Spawn:
		FRTB ABCDEFGHI 3 Bright
		Stop
	}
}

Actor MeteorMissileDeath
{
	Projectile
	RenderStyle Add
	+NoClip
	Scale 1.45
	Alpha 0.7
	States
	{
	Spawn:
		COMT FGHI 3 Bright
		Stop
	}
}

ACTOR MeteorMissileFlare
{
	Radius 6
	Height 8
	Speed 12
	//Damage (random(1,8)*4+(ACS_ExecuteWithResult(WOC_DECORATE,STATS,INTELLECT,WOCTARGET))+(3*ACS_ExecuteWithResult(WOC_DECORATE,MAGESKILLS,ABIL_METEOR,WOCTARGET)))
	PROJECTILE
	RENDERSTYLE ADD
	DamageType Fire
	Decal DoomImpScorch
	ALPHA 0.95
	+MTHRUSPECIES /*+NODAMAGETHRUST*/ +DONTBLAST
	-NOGRAVITY
	+FORCERADIUSDMG
	Gravity 0.85
	DeathSound "Mage/MeteorSmall/Impact"
	States
	{
	Spawn:
		TNT1 A 1 Bright A_SpawnItemEx("MeteorMissileFlareFX",0,0,0,0,0,0,0,128)
		loop
	Death:
		MRFX J 0 Radius_Quake(1,8,0,2,0)
		MRFX J 0 Bright A_JumpIfInTargetInventory("IsPyro",1,"Pyro")
		MRFX J 0 A_Explode(ACS_NamedExecuteWithResult("WOC Player Scale", 32, INTELLECT, ABIL_METEOR, WOCTARGET), 64, 0)
		MRFX HIJ 2 Bright
		MRFX J 0 A_SpawnItem("MeteorMissileDropFire",0,0)
		MRFX KLMNO 2 Bright
		stop
	Pyro:
		MRFX J 0 A_Explode(ACS_NamedExecuteWithResult("WOC Player Scale", 32, INTELLECT, ABIL_METEOR, WOCTARGET), 64, 0, 0, 64)
		MRFX HIJ 2 Bright
		MRFX J 0 A_SpawnItem("MeteorMissileDropFire",0,0)
		MRFX KLMNO 2 Bright
		stop
	}
}

ACTOR MeteorMissileFlareFX
{
	Radius 0
	Height 1
	Speed 0
	PROJECTILE
	+CLIENTSIDEONLY +DONTBLAST
	+DONTSPLASH
	+NOINTERACTION
	RENDERSTYLE ADD
	ALPHA 0.85
	States
	{
	Spawn:
		TNT1 A 3 Bright
		MRFL ABCDE 3 Bright
		Stop
	}
}

ACTOR MeteorMissileDropFire
{
	Radius 8
	Height 40
	PROJECTILE
	RENDERSTYLE ADD
	DamageType Fire
	ALPHA 0.90
	-NOGRAVITY
	+LOWGRAVITY
	+NOEXPLODEFLOOR
	/*+NODAMAGETHRUST*/ +DONTBLAST
	+DONTSPLASH
	+MTHRUSPECIES /*+NODAMAGETHRUST*/ +DONTBLAST
	+FORCERADIUSDMG
	States
	{
	Spawn:
		FLME A 0
		FLME A 0 A_JumpIfInTargetInventory("IsPyro",1,"Pyro")
		FLME A 0 Bright A_Playsound("Mage/MeteorSmall/Flame", 4)
		FLME ABCDEFGHIJKLMN 2 Bright A_Explode(ACS_NamedExecuteWithResult("WOC Player Scale", 3, INTELLECT, ABIL_METEOR, WOCTARGET), 32, 0)
		FLME A 0 A_Jump(48,1)
		loop
		TNT1 A 0
		goto death
	Pyro:
		FLME A 0 Bright A_Playsound("Mage/MeteorSmall/Flame", 4)
		FLME ABCDEFGHIJKLMN 2 Bright A_Explode(ACS_NamedExecuteWithResult("WOC Player Scale", 3, INTELLECT, ABIL_METEOR, WOCTARGET), 32, 0, 0, 32)
		FLME A 0 A_Jump(48,1)
		loop
		TNT1 A 0
		goto death
	Death:
		TNT1 A 1 Bright A_StopSound(CHAN_BODY)
		stop
	}
}

Actor ArcaneBarrier : WoC_Skill {} //Arcane Armor

Actor ArcaneBarrierBonus : BasicArmorBonus
{
	Armor.SavePercent 100.0
	Armor.SaveAmount 1
	Armor.MaxSaveAmount 0x7FFFFFFF
}

Actor ArcaneBarrierMax : WoC_Stat {}

Actor ArcaneBarrierFlash : CustomInventory
{
	inventory.maxamount 0
	+AUTOACTIVATE
	+INVENTORY.ALWAYSPICKUP
	states
	{
	Spawn:
		TNT1 A 1
		Stop
	Use:
		TNT1 A 1 A_SetBlend("Blue",0.05,15)
		stop
	}
}

Actor ArcaneBarrierIcon : PowerupGiver
{
	Powerup.Type "ArcaneBarrierIcon"
	Powerup.Duration -10
	+INVENTORY.AUTOACTIVATE
	Inventory.MaxAmount 0
}

Actor PowerArcaneBarrierIcon : Powerup
{
	Powerup.Duration -10
	Inventory.Icon "MARMICON"
}

Actor Thunderstorm : WoC_Skill {}

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

Actor UseThunderStorm : CustomInventory
{
	Inventory.MaxAmount 0
	+Inventory.AutoActivate
	Inventory.Icon "TNT1A0"
	States
	{
	Use:
		TNT1 A 0 A_SpawnItemEx("ThunderStormSpawner",frandom(-200,200),frandom(-200,200),9999,0,0,0,0,SXF_NOCHECKPOSITION)
		Stop
	}
}

actor ThunderstormSpawner
{
	+SKYEXPLODE
	PROJECTILE
	-SOLID
	+NOGRAVITY
	+CEILINGHUGGER
	+DONTBLAST
	radius 1
	height 8
	speed 0
	DeathSound "weapons/lightfall"
	States
	{
	Spawn:
	Death:
		TNT1 A 0
		TNT1 A 3 A_SpawnItemEx("ThunderStormFX",1,0,-1,0,0,-35)
		TNT1 AAAAAAA 3 A_SpawnItemEx("ThunderStormFX",1,0,-1,0,0,-35)
		Stop
	}
}

Actor ThunderstormFX
{
	PROJECTILE
	Damage (ACS_NamedExecuteWithResult("WOC Player Scale", FRandom(3,24), INTELLECT, ABIL_THUNDERSTORM, WOCTARGET))
	Damagetype "Lightning"
	Radius 8
	+RANDOMIZE
	+MTHRUSPECIES +NODAMAGETHRUST +DONTBLAST
	-NOGRAVITY
	+FORCERADIUSDMG
	Height 8
	Renderstyle add
	Alpha 0.8
	DeathSound "Mage/Thunderstorm/Impact"
	States
	{
	Spawn:
		ZAP6 MNO 2 bright
		loop
	Death:
		TH16 A 0 //A_PlaySound("weapons/lighthit")
		TH16 A 0 A_Explode(ACS_NamedExecuteWithResult("WOC Player Scale", 10, INTELLECT, ABIL_THUNDERSTORM, WOCTARGET),125,0,0,125)
		TH16 GHIJK 2 BRIGHT
		stop
	}
}

Actor ThunderstormFXSilent : ThunderStormFX
{
	DeathSound ""
}

Actor Blizzard : WoC_Skill {}

Actor UseBlizzard : CustomInventory
{
	Inventory.MaxAmount 0
	+INVENTORY.AUTOACTIVATE
	Inventory.Icon "TNT1A0"
	States
	{
	Use:
		TNT1 A 0 A_GiveInventory("Blizzarding")
		TNT1 A 0 A_FireCustommissile("BlizzardMark",0,0)//A_SpawnItemEx("LightningSpawner",0,0,9999,0,0,0,0,SXF_NOCHECKPOSITION)
		Stop
	}
}

Actor BlizzardMark
{
	Radius 12
	Height 6
	Speed 45
	Renderstyle Add
	Damage (1)
	Renderstyle Add
	SeeSound "MageShardsFire"
	Projectile
	RenderStyle Add
	+WINDTHRUST
	+THRUGHOST
	+MTHRUSPECIES +NODAMAGETHRUST +DONTBLAST
	Damagetype "Ice"
	+EXPLODEONWATER
	+SKYEXPLODE
	States
	{
	Spawn:
		FX05 AAAAAABBBBBBCCCCCC 1 BRIGHT A_GiveToTarget("Blizzarding")
		Loop
	Death:
		FX05 D 0 BRIGHT A_GiveToTarget("Blizzarding")
		FX05 D 5 BRIGHT A_SpawnItemEx("BlizzardFXSpawner",0,0,9999,0,0,0,0,SXF_NOCHECKPOSITION)
		FX05 EFG 5 BRIGHT
		Stop
	}
}

actor BlizzardFXSpawner
{
	+SKYEXPLODE
	PROJECTILE
	-SOLID
	+NOGRAVITY
	+CEILINGHUGGER
	+DONTBLAST
	radius 1
	height 8
	speed 0
	States
	{
	Spawn:
	Death:
		TNT1 A 0
		TNT1 A 0 A_TakeFromTarget("Blizzarding")
		TNT1 A 0 A_JumpIfInTargetInventory("Blizzarding", 1, "Death2")
		TNT1 A 0 A_JumpIfInventory("BlizzardTimer",10+ACS_ExecuteWithResult(WOC_DECORATE,MAGESKILLS,ABIL_BLIZZARD,WOCTARGET),"Death2")
		TNT1 A 0 A_SpawnItemEx("BlizzardFX",frandom(-200,200),frandom(-200,200),-6,frandom(-1,1),frandom(-1,1),-20)
		TNT1 AAAAAAAAAAAAAAA 0 A_SpawnItemEx("BlizzardCloudFog",frandom(-210,210),frandom(-210,210),frandom(-2,0),frandom(-200,200)/100.0,frandom(-200,200)/100.0)
		TNT1 A 1 A_JumpIfInTargetInventory("Blizzarding", 1, "Death2")
		TNT1 A 0 A_SpawnItemEx("BlizzardFX",frandom(-200,200),frandom(-200,200),-6,frandom(-1,1),frandom(-1,1),-20)
		TNT1 AAAAAAAAAAAAAAA 0 A_SpawnItemEx("BlizzardCloudFog",frandom(-210,210),frandom(-210,210),frandom(-2,0),frandom(-200,200)/100.0,frandom(-200,200)/100.0)
		TNT1 A 1 A_JumpIfInTargetInventory("Blizzarding", 1, "Death2")
		TNT1 A 0 A_SpawnItemEx("BlizzardFX",frandom(-200,200),frandom(-200,200),-6,frandom(-1,1),frandom(-1,1),-20)
		TNT1 AAAAAAAAAAAAAAA 0 A_SpawnItemEx("BlizzardCloudFog",frandom(-210,210),frandom(-210,210),frandom(-2,0),frandom(-200,200)/100.0,frandom(-200,200)/100.0)
		TNT1 A 1 A_JumpIfInTargetInventory("Blizzarding", 1, "Death2")
		TNT1 A 0 A_SpawnItemEx("BlizzardFX",frandom(-200,200),frandom(-200,200),-6,frandom(-1,1),frandom(-1,1),-20)
		TNT1 AAAAAAAAAAAAAAA 0 A_SpawnItemEx("BlizzardCloudFog",frandom(-210,210),frandom(-210,210),frandom(-2,0),frandom(-200,200)/100.0,frandom(-200,200)/100.0)
		TNT1 A 1 A_JumpIfInTargetInventory("Blizzarding", 1, "Death2")
		TNT1 A 0 A_SpawnItemEx("BlizzardFX",frandom(-200,200),frandom(-200,200),-6,frandom(-1,1),frandom(-1,1),-20)
		TNT1 AAAAAAAAAAAAAAA 0 A_SpawnItemEx("BlizzardCloudFog",frandom(-210,210),frandom(-210,210),frandom(-2,0),frandom(-200,200)/100.0,frandom(-200,200)/100.0)
		TNT1 A 1 A_JumpIfInTargetInventory("Blizzarding", 1, "Death2")
		TNT1 A 0 A_SpawnItemEx("BlizzardFX",frandom(-200,200),frandom(-200,200),-6,frandom(-1,1),frandom(-1,1),-20)
		TNT1 AAAAAAAAAAAAAAA 0 A_SpawnItemEx("BlizzardCloudFog",frandom(-210,210),frandom(-210,210),frandom(-2,0),frandom(-200,200)/100.0,frandom(-200,200)/100.0)
		TNT1 A 1 A_JumpIfInTargetInventory("Blizzarding", 1, "Death2")
		TNT1 A 0 A_SpawnItemEx("BlizzardFX",frandom(-200,200),frandom(-200,200),-6,frandom(-1,1),frandom(-1,1),-20)
		TNT1 AAAAAAAAAAAAAAA 0 A_SpawnItemEx("BlizzardCloudFog",frandom(-210,210),frandom(-210,210),frandom(-2,0),frandom(-200,200)/100.0,frandom(-200,200)/100.0)
		TNT1 A 1 A_JumpIfInTargetInventory("Blizzarding", 1, "Death2")
		TNT1 A 0 A_SpawnItemEx("BlizzardFX",frandom(-200,200),frandom(-200,200),-6,frandom(-1,1),frandom(-1,1),-20)
		TNT1 AAAAAAAAAAAAAAA 0 A_SpawnItemEx("BlizzardCloudFog",frandom(-210,210),frandom(-210,210),frandom(-2,0),frandom(-200,200)/100.0,frandom(-200,200)/100.0)
		TNT1 A 1 A_JumpIfInTargetInventory("Blizzarding", 1, "Death2")
		TNT1 A 0 A_SpawnItemEx("BlizzardFX",frandom(-200,200),frandom(-200,200),-6,frandom(-1,1),frandom(-1,1),-20)
		TNT1 AAAAAAAAAAAAAAA 0 A_SpawnItemEx("BlizzardCloudFog",frandom(-210,210),frandom(-210,210),frandom(-2,0),frandom(-200,200)/100.0,frandom(-200,200)/100.0)
		TNT1 A 1 A_JumpIfInTargetInventory("Blizzarding", 1, "Death2")
		TNT1 A 0 A_SpawnItemEx("BlizzardFX",frandom(-200,200),frandom(-200,200),-6,frandom(-1,1),frandom(-1,1),-20)
		TNT1 AAAAAAAAAAAAAAA 0 A_SpawnItemEx("BlizzardCloudFog",frandom(-210,210),frandom(-210,210),frandom(-2,0),frandom(-200,200)/100.0,frandom(-200,200)/100.0)
		TNT1 A 1 A_JumpIfInTargetInventory("Blizzarding", 1, "Death2")
		TNT1 A 0 A_SpawnItemEx("BlizzardFX",frandom(-200,200),frandom(-200,200),-6,frandom(-1,1),frandom(-1,1),-20)
		TNT1 AAAAAAAAAAAAAAA 0 A_SpawnItemEx("BlizzardCloudFog",frandom(-210,210),frandom(-210,210),frandom(-2,0),frandom(-200,200)/100.0,frandom(-200,200)/100.0)
		TNT1 A 1 A_JumpIfInTargetInventory("Blizzarding", 1, "Death2")
		TNT1 A 0 A_SpawnItemEx("BlizzardFX",frandom(-200,200),frandom(-200,200),-6,frandom(-1,1),frandom(-1,1),-20)
		TNT1 AAAAAAAAAAAAAAA 0 A_SpawnItemEx("BlizzardCloudFog",frandom(-210,210),frandom(-210,210),frandom(-2,0),frandom(-200,200)/100.0,frandom(-200,200)/100.0)
		TNT1 A 1 A_JumpIfInTargetInventory("Blizzarding", 1, "Death2")
		TNT1 A 0 A_SpawnItemEx("BlizzardFX",frandom(-200,200),frandom(-200,200),-6,frandom(-1,1),frandom(-1,1),-20)
		TNT1 AAAAAAAAAAAAAAA 0 A_SpawnItemEx("BlizzardCloudFog",frandom(-210,210),frandom(-210,210),frandom(-2,0),frandom(-200,200)/100.0,frandom(-200,200)/100.0)
		TNT1 A 1 A_JumpIfInTargetInventory("Blizzarding", 1, "Death2")
		TNT1 A 0 A_SpawnItemEx("BlizzardFX",frandom(-200,200),frandom(-200,200),-6,frandom(-1,1),frandom(-1,1),-20)
		TNT1 AAAAAAAAAAAAAAA 0 A_SpawnItemEx("BlizzardCloudFog",frandom(-210,210),frandom(-210,210),frandom(-2,0),frandom(-200,200)/100.0,frandom(-200,200)/100.0)
		TNT1 A 1 A_JumpIfInTargetInventory("Blizzarding", 1, "Death2")
		TNT1 A 0 A_SpawnItemEx("BlizzardFX",frandom(-200,200),frandom(-200,200),-6,frandom(-1,1),frandom(-1,1),-20)
		TNT1 AAAAAAAAAAAAAAA 0 A_SpawnItemEx("BlizzardCloudFog",frandom(-210,210),frandom(-210,210),frandom(-2,0),frandom(-200,200)/100.0,frandom(-200,200)/100.0)
		TNT1 A 1 A_JumpIfInTargetInventory("Blizzarding", 1, "Death2")
		TNT1 A 0 A_SpawnItemEx("BlizzardFX",frandom(-200,200),frandom(-200,200),-6,frandom(-1,1),frandom(-1,1),-20)
		TNT1 AAAAAAAAAAAAAAA 0 A_SpawnItemEx("BlizzardCloudFog",frandom(-210,210),frandom(-210,210),frandom(-2,0),frandom(-200,200)/100.0,frandom(-200,200)/100.0)
		TNT1 A 1 A_JumpIfInTargetInventory("Blizzarding", 1, "Death2")
		TNT1 A 0 A_SpawnItemEx("BlizzardFX",frandom(-200,200),frandom(-200,200),-6,frandom(-1,1),frandom(-1,1),-20)
		TNT1 AAAAAAAAAAAAAAA 0 A_SpawnItemEx("BlizzardCloudFog",frandom(-210,210),frandom(-210,210),frandom(-2,0),frandom(-200,200)/100.0,frandom(-200,200)/100.0)
		TNT1 A 0 A_GiveInventory("BlizzardTimer")
		Goto Death+3
	Death2:
		TNT1 A 0
		Stop
	}
}

Actor Blizzarding : WoC_Boolean {}
Actor BlizzardTimer : WoC_Undroppable { Inventory.MaxAmount 100 }

Actor BlizzardFX
{
	PROJECTILE
	damage (0)
	radius 6
	+RANDOMIZE
	height 5
	renderstyle add
	Scale 0.5
	Damagetype "Ice"
	DeathSound "MageBlizzardExplode"
	+WINDTHRUST
	-NOGRAVITY
	+THRUGHOST
	+MTHRUSPECIES +NODAMAGETHRUST +DONTBLAST
	+SPAWNCEILING
	+CEILINGHUGGER
	+FORCERADIUSDMG
	States
	{
	Spawn:
		BRES A 0
		BRES A 0 A_ChangeFlag("CeilingHugger",0)
		BRES A 0 Bright A_JumpIfInTargetInventory("IsIceborn",1,"Iceborn")
	Animation:
		BRES AB 5 BRIGHT
		Loop
	Iceborn:
		BREA A 0 A_ChangeFlag("ForcePain", 1)
		Goto Animation
	Death:
		BRES C 0 BRIGHT A_ChangeFlag("NOGRAVITY",1)
		BRES C 0 BRIGHT A_Explode(ACS_NamedExecuteWithResult("WOC Player Scale", 11, INTELLECT, ABIL_BLIZZARD, WOCTARGET), 48, 0, 0, 48)
		BRES CDE 4 BRIGHT
		Stop
	}
}

ACTOR BlizzardCloudFog
{
	Damage 0
	YScale 0.8
	Speed 1
	Height 1
	Radius 1
	+NOBLOCKMAP
	+NOGRAVITY
	+NOCLIP
	+NOINTERACTION
	+CLIENTSIDEONLY +DONTBLAST
	+DONTSPLASH
	+CEILINGHUGGER
	+NOTELEPORT
	+RANDOMIZE
	+FORCEXYBILLBOARD
	PROJECTILE
	RenderStyle Add
	States
	{
	Spawn:
		FIB1 ABCDEFGHIJKL 1 BRIGHT
		stop
	Death:
		FIB1 L 1 BRIGHT
		Stop
	}
}

actor ArcaneBombMissile
{
	PROJECTILE
	scale 0.4
	+MTHRUSPECIES /*+NODAMAGETHRUST*/ +DONTBLAST
	+SEEKERMISSILE
	+FORCEPAIN
	+FORCERADIUSDMG
	Speed 25
	Height	7
	Radius	6
	renderstyle add
	SeeSound "DemonMissileFire"
	DeathSound "DemonMissileExplode"
	Damagetype "Arcane"
	Damage 0//(random(29,44)+(ACS_ExecuteWithResult(WOC_DECORATE,STATS,INTELLECT,WOCTARGET))+(ACS_ExecuteWithResult(599,17)*2)+(ACS_ExecuteWithResult(599,18)*11))
	states
	{
	Spawn:
		ABMB A 0 Bright A_CustomMissile("ArcaneBombTrail",0+frandom(10,-10),0+frandom(10,-10),frandom(15,-15),0)
		ABMB A 0 Bright A_SeekerMissile(90,90,SMF_PRECISE)
		ABMB A 1 Bright A_CustomMissile("ArcaneBombTrail",0+frandom(10,-10),0+frandom(10,-10),frandom(15,-15),0)
		Loop
		Death:
		TRNG CCCCCCCCCCC 0 bright A_SpawnItemEx("ArcaneBombBoom", 0, 0, 0, 0, 0, 0, 0, 160, 0)
		TRNG CCCCCCCCCCC 0 bright A_SpawnItemEx("ArcaneBombBoom", 0, 0, 0, 0, 0, 0, 0, 160, 0)
		TRNG CCCCCCCCCCC 0 bright A_SpawnItemEx("ArcaneBombBoom", 0, 0, 0, 0, 0, 0, 0, 160, 0)
		TRNG CCCCCCCCCCC 0 bright A_SpawnItemEx("ArcaneBombBoom", 0, 0, 0, 0, 0, 0, 0, 160, 0)
		TNT1 A 0 Bright A_Explode(ACS_NamedExecuteWithResult("WOC Player Scale", 80, CURRENTLEVEL, 0, WOCTARGET),162,0)
		TNT1 A 5 Bright
		stop
	}
}

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

ACTOR ArcaneBombTrail
{
    Mass 1
    Radius 8
    Height 6
    Speed 3
    Scale 0.6
    Alpha 0.3
    Damage 0
    RenderStyle Add
    PROJECTILE
	+NOINTERACTION
	+CLIENTSIDEONLY +DONTBLAST
	+DONTSPLASH
    States
    {
    Spawn:
	TNT1 A 0
        ABMB BCDEFGHIJKLMOPQ 2 Bright
        Stop
    }
}

ACTOR ArcaneBombTrail2
{
    Mass 1
    Radius 8
    Height 6
    Speed 5
    Scale 0.6
    Alpha 0.3
    Damage 0
    RenderStyle Add
    PROJECTILE
	+CLIENTSIDEONLY
	+DONTSPLASH
	+NOINTERACTION
	+NOCLIP
	+RIPPER
	+BLOODLESSIMPACT
	+PAINLESS
    States
    {
    Spawn:
	TNT1 A 0
        ABMB BCDEFGHIJKLMOPQ 1 Bright
        Stop
    }
}

Actor PillarOfFlame : WoC_Skill {}

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

ACTOR PillarOfFlamePuff : HornRodFX2
{
    Radius 1
    PROJECTILE
    Speed 0
    Damage 0
	+PUFFGETSOWNER
    +BLOODLESSIMPACT
    +CEILINGHUGGER
    +SPAWNCEILING
    +PAINLESS
    +THRUACTORS
    +NOCLIP
	+NOBLOCKMAP
	+NOGRAVITY
	+PUFFONACTORS
	+ALWAYSPUFF
	+MTHRUSPECIES
    RenderStyle None
    States
    {
    Spawn:
		TNT1 A 1
		TNT1 A 0 A_hideInCeiling
		TNT1 A 0 A_PlaySound("pillarflame/drop",CHAN_AUTO)
		TNT1 A 0 A_SpawnItemEx("PillarOfFlameMeteor",0,0,-16,0,0,-20,0,SXF_NOCHECKPOSITION)
		TNT1 A 30
		Stop
    }
}

ACTOR PillarOfFlameMeteor
{
    PROJECTILE
    Radius 1
    Height 12
    Speed 40
    +RIPPER
    +BLOODLESSIMPACT
    +EXTREMEDEATH
    /*+NODAMAGETHRUST*/ +DONTBLAST
    +NOEXTREMEDEATH
    +FORCERADIUSDMG
    +DONTREFLECT
    +PAINLESS
	-NOGRAVITY
	+FORCERADIUSDMG
    RenderStyle Add
    DamageType "Fire"
    States
    {
    Spawn:
		TNT1 A 0
		TNT1 A 0 Bright A_JumpIfInTargetInventory("IsPyro", 1, "PyroSpawn")
		TNT1 A 0 Bright A_Explode(ACS_NamedExecuteWithResult("WOC Player Scale", 10, INTELLECT, ABIL_PILLAROFFLAME, WOCTARGET),36,0)
		TMT1 A 1 Bright A_SpawnItemEx("MeteorTrail",0,0,0,0,0,0,0,32)
		Goto Spawn+1
	PyroSpawn:
		TNT1 A 0 Bright A_Explode(ACS_NamedExecuteWithResult("WOC Player Scale", 10, INTELLECT, ABIL_PILLAROFFLAME, WOCTARGET),36,0,0,36)
		TMT1 A 1 Bright A_SpawnItemEx("MeteorTrail",0,0,0,0,0,0,0,32)
		Goto PyroSpawn
    Death:
		TNT1 A 0 Bright A_JumpIfInTargetInventory("IsPyro", 1, "PyroDeath")
		TNT1 A 0 A_Explode(ACS_NamedExecuteWithResult("WOC Player Scale", 325, INTELLECT, ABIL_PILLAROFFLAME, WOCTARGET),250,0)
		TNT1 A 0 Radius_Quake(4,15,0,4,0)
		TNT1 A 0 Radius_Quake(2,8,0,6,0)
		TNT1 A 0 A_PlaySound("pillarflame/explosion",CHAN_AUTO)
		TNT1 A 0 A_SpawnItemEx("PillarOfFlameVolcano",0,0,0)
		TNT1 AAAAAAAAAAAAAAAA 0 A_SpawnItemEx("MeteorTrail",0,0,0,frandom(350,350)/100.0,frandom(-350,350)/100.0,frandom(15,150)/100.0,0,32)
		TNT1 A 0 A_SpawnItemEx("MeteorTrail",0,0,0,frandom(-250,250)/100.0,0,frandom(10,150)/100.0,0,32)
		TNT1 A 0 A_SpawnItemEx("MeteorTrail",0,0,0,frandom(-250,250)/100.0,0,frandom(10,150)/100.0,20,32)
		TNT1 A 0 A_SpawnItemEx("MeteorTrail",0,0,0,frandom(-250,250)/100.0,0,frandom(10,150)/100.0,40,32)
		TNT1 A 0 A_SpawnItemEx("MeteorTrail",0,0,0,frandom(-250,250)/100.0,0,frandom(10,150)/100.0,60,32)
		TNT1 A 0 A_SpawnItemEx("MeteorTrail",0,0,0,frandom(-250,250)/100.0,0,frandom(10,150)/100.0,80,32)
		TNT1 A 0 A_SpawnItemEx("MeteorTrail",0,0,0,frandom(-250,250)/100.0,0,frandom(10,150)/100.0,100,32)
		TNT1 A 0 A_SpawnItemEx("MeteorTrail",0,0,0,frandom(-250,250)/100.0,0,frandom(10,150)/100.0,120,32)
		TNT1 A 0 A_SpawnItemEx("MeteorTrail",0,0,0,frandom(-250,250)/100.0,0,frandom(10,150)/100.0,140,32)
		TNT1 A 0 A_SpawnItemEx("MeteorTrail",0,0,0,frandom(-250,250)/100.0,0,frandom(10,150)/100.0,160,32)
		TNT1 A 0 A_SpawnItemEx("MeteorTrail",0,0,0,frandom(-250,250)/100.0,0,frandom(10,150)/100.0,180,32)
		TNT1 A 0 A_SpawnItemEx("MeteorTrail",0,0,0,frandom(-250,250)/100.0,0,frandom(10,150)/100.0,-20,32)
		TNT1 A 0 A_SpawnItemEx("MeteorTrail",0,0,0,frandom(-250,250)/100.0,0,frandom(10,150)/100.0,-40,32)
		TNT1 A 0 A_SpawnItemEx("MeteorTrail",0,0,0,frandom(-250,250)/100.0,0,frandom(10,150)/100.0,-60,32)
		TNT1 A 0 A_SpawnItemEx("MeteorTrail",0,0,0,frandom(-250,250)/100.0,0,frandom(10,150)/100.0,-80,32)
		TNT1 A 0 A_SpawnItemEx("MeteorTrail",0,0,0,frandom(-250,250)/100.0,0,frandom(10,150)/100.0,-100,32)
		TNT1 A 0 A_SpawnItemEx("MeteorTrail",0,0,0,frandom(-250,250)/100.0,0,frandom(10,150)/100.0,-120,32)
		TNT1 A 0 A_SpawnItemEx("MeteorTrail",0,0,0,frandom(-250,250)/100.0,0,frandom(10,150)/100.0,-140,32)
		TNT1 A 0 A_SpawnItemEx("MeteorTrail",0,0,0,frandom(-250,250)/100.0,0,frandom(10,150)/100.0,-160,32)
		TNT1 A 0 A_JumpIfInTargetInventory("PillarofFlame", 7, "Death1")
		TNT1 A 0 A_JumpIfInTargetInventory("PillarofFlame", 4, "Death2")
		Stop
	PyroDeath:
		TNT1 A 0 A_Explode(ACS_NamedExecuteWithResult("WOC Player Scale", 325, INTELLECT, ABIL_PILLAROFFLAME, WOCTARGET),250,0,0,250)
		TNT1 A 0 Radius_Quake(4,15,0,4,0)
		TNT1 A 0 Radius_Quake(2,8,0,6,0)
		TNT1 A 0 A_PlaySound("pillarflame/explosion",CHAN_AUTO)
		TNT1 A 0 A_SpawnItemEx("PillarOfFlameVolcano",0,0,0)
		TNT1 AAAAAAAAAAAAAAAA 0 A_SpawnItemEx("MeteorTrail",0,0,0,frandom(350,350)/100.0,frandom(-350,350)/100.0,frandom(15,150)/100.0,0,32)
		TNT1 A 0 A_SpawnItemEx("MeteorTrail",0,0,0,frandom(-250,250)/100.0,0,frandom(10,150)/100.0,0,32)
		TNT1 A 0 A_SpawnItemEx("MeteorTrail",0,0,0,frandom(-250,250)/100.0,0,frandom(10,150)/100.0,20,32)
		TNT1 A 0 A_SpawnItemEx("MeteorTrail",0,0,0,frandom(-250,250)/100.0,0,frandom(10,150)/100.0,40,32)
		TNT1 A 0 A_SpawnItemEx("MeteorTrail",0,0,0,frandom(-250,250)/100.0,0,frandom(10,150)/100.0,60,32)
		TNT1 A 0 A_SpawnItemEx("MeteorTrail",0,0,0,frandom(-250,250)/100.0,0,frandom(10,150)/100.0,80,32)
		TNT1 A 0 A_SpawnItemEx("MeteorTrail",0,0,0,frandom(-250,250)/100.0,0,frandom(10,150)/100.0,100,32)
		TNT1 A 0 A_SpawnItemEx("MeteorTrail",0,0,0,frandom(-250,250)/100.0,0,frandom(10,150)/100.0,120,32)
		TNT1 A 0 A_SpawnItemEx("MeteorTrail",0,0,0,frandom(-250,250)/100.0,0,frandom(10,150)/100.0,140,32)
		TNT1 A 0 A_SpawnItemEx("MeteorTrail",0,0,0,frandom(-250,250)/100.0,0,frandom(10,150)/100.0,160,32)
		TNT1 A 0 A_SpawnItemEx("MeteorTrail",0,0,0,frandom(-250,250)/100.0,0,frandom(10,150)/100.0,180,32)
		TNT1 A 0 A_SpawnItemEx("MeteorTrail",0,0,0,frandom(-250,250)/100.0,0,frandom(10,150)/100.0,-20,32)
		TNT1 A 0 A_SpawnItemEx("MeteorTrail",0,0,0,frandom(-250,250)/100.0,0,frandom(10,150)/100.0,-40,32)
		TNT1 A 0 A_SpawnItemEx("MeteorTrail",0,0,0,frandom(-250,250)/100.0,0,frandom(10,150)/100.0,-60,32)
		TNT1 A 0 A_SpawnItemEx("MeteorTrail",0,0,0,frandom(-250,250)/100.0,0,frandom(10,150)/100.0,-80,32)
		TNT1 A 0 A_SpawnItemEx("MeteorTrail",0,0,0,frandom(-250,250)/100.0,0,frandom(10,150)/100.0,-100,32)
		TNT1 A 0 A_SpawnItemEx("MeteorTrail",0,0,0,frandom(-250,250)/100.0,0,frandom(10,150)/100.0,-120,32)
		TNT1 A 0 A_SpawnItemEx("MeteorTrail",0,0,0,frandom(-250,250)/100.0,0,frandom(10,150)/100.0,-140,32)
		TNT1 A 0 A_SpawnItemEx("MeteorTrail",0,0,0,frandom(-250,250)/100.0,0,frandom(10,150)/100.0,-160,32)
		TNT1 A 0 A_JumpIfInTargetInventory("PillarofFlame", 7, "Death1")
		TNT1 A 0 A_JumpIfInTargetInventory("PillarofFlame", 4, "Death2")
		Stop
	Death1:
		TNT1 AAAAAAAAAA 0 Bright A_SpawnItemEx ("PillarOfFlameFireball", frandom(-10,10), frandom(-10,10), 0.0, frandom(-10,10), frandom(-10,10), frandom(8,12),   0.0, 32, 0)
		TNT1 A 15 Bright
		Stop
	Death2:
		TNT1 AAAAAAAAAA 0 Bright A_SpawnItemEx ("PillarOfFlameFireball3", frandom(-10,10), frandom(-10,10), 0.0, frandom(-10,10), frandom(-10,10), frandom(8,12),   0.0, 32, 0)
		TNT1 A 15 Bright
		Stop
    }
}

ACTOR MeteorTrail
{
    +DONTSPLASH
    +NOINTERACTION
	+CLIENTSIDEONLY +DONTBLAST
    RenderStyle Add
    States
    {
    Spawn:
		X029 AABBCCDDEEFFGGHHIIJJKK 1 Bright A_FadeOut(0.03)
		Loop
    }
}

ACTOR PillarOfFlameVolcano
{
	Speed 1
	Damage 0
	PROJECTILE
	Radius 3
	Height 12
	+CLIENTSIDEONLY +DONTBLAST
	+NOCLIP
	+NOINTERACTION
	RENDERSTYLE ADD
	States
	{
	Spawn:
		NFPI A 3 Bright
		NFPI B 3 Bright
		NFPI CD 3 Bright
		NFPI BA 3 Bright
		Stop
		Death:
		TNT1 A 1
		Stop 
	} 
}


ACTOR PillarOfFlameSmallVolcano
{
    Speed 5
    Damage 0
    Radius 12
    Height 16
    RenderStyle Add
    Alpha 0.2
    Scale 0.5
    PROJECTILE
    +DROPOFF
    +BLOODLESSIMPACT
    +FLOORHUGGER
    +RIPPER
    +PAINLESS
    DamageType "Fire"
    States
    {
    Spawn:
		F2SX AAAABBBBCCCCDDDDEEEEFFFF 1 Bright A_Fadeout(0.01)
		Stop
    }
}

ACTOR PillarOfFlameFireball : FireBall
{
	Speed 24
	Damage (0)
	DamageType "Fire"
	-NOGRAVITY
	+MTHRUSPECIES /*+NODAMAGETHRUST*/ +DONTBLAST
	+DONTREFLECT
	+FORCERADIUSDMG
	Gravity 0.75
	RenderStyle Add
	Deathsound "Mage/PilarOfFlameBall/Impact"
	States
	{
	Spawn:
		FBL1 AAAABBBB 1 Bright A_SpawnItemEx("PillarOfFlameBallTrail", Random(-2, 2), Random(-2, 2), Random(-2, 2), 0, 0, 0, 0, 128)
		Loop
	Death:
		TNT1 A 0 Bright A_JumpIfInTargetInventory("IsPyro", 1, "Pyro")
		TNT1 A 0 A_Explode(ACS_NamedExecuteWithResult("WOC Player Scale", 30, INTELLECT, ABIL_PILLAROFFLAME, WOCTARGET),128,0)
		TNT1 A 0 Bright A_SpawnItemEx ("PillarOfFlameFireball2", 0, 0, 0, frandom(-10,10), frandom(-10,10), frandom(8,12),   0.0, 32, 0)
		XPL1 ABCDEF 2 Bright
		Stop
	Pyro:
		TNT1 A 0 A_Explode(ACS_NamedExecuteWithResult("WOC Player Scale", 30, INTELLECT, ABIL_PILLAROFFLAME, WOCTARGET),128,0,0,128)
		TNT1 A 0 Bright A_SpawnItemEx ("PillarOfFlameFireball2", 0, 0, 0, frandom(-10,10), frandom(-10,10), frandom(8,12),   0.0, 32, 0)
		XPL1 ABCDEF 2 Bright
		Stop
	}
}

Actor PillarofFlameFireball2 : PillarOfFlameFireball
{
	States
	{
	Spawn:
		FBL1 AAAABBBB 1 Bright A_SpawnItemEx("PillarOfFlameBallTrail", Random(-2, 2), Random(-2, 2), Random(-2, 2), 0, 0, 0, 0, 128)
		Loop
	Death:
		TNT1 A 0 Bright A_JumpIfInTargetInventory("IsPyro", 1, "Pyro")
		TNT1 A 0 A_Explode(ACS_NamedExecuteWithResult("WOC Player Scale", 20, INTELLECT, ABIL_PILLAROFFLAME, WOCTARGET),128,0)
		XPL1 ABCDEF 2 Bright
		Stop
	Pyro:
		TNT1 A 0 A_Explode(ACS_NamedExecuteWithResult("WOC Player Scale", 20, INTELLECT, ABIL_PILLAROFFLAME, WOCTARGET),128,0,0,128)
		XPL1 ABCDEF 2 Bright
		Stop
	}
}

Actor PillarofFlameFireball3 : PillarOfFlameFireball
{
	States
	{
	Spawn:
		FBL1 AAAABBBB 1 Bright A_SpawnItemEx("PillarOfFlameBallTrail", Random(-2, 2), Random(-2, 2), Random(-2, 2), 0, 0, 0, 0, 128)
		Loop
	Death:
		TNT1 A 0 Bright A_JumpIfInTargetInventory("IsPyro", 1, "Pyro")
		TNT1 A 0 A_Explode(ACS_NamedExecuteWithResult("WOC Player Scale", 30, INTELLECT, ABIL_PILLAROFFLAME, WOCTARGET),128,0)
		XPL1 ABCDEF 2 Bright
		Stop
	Pyro:
		TNT1 A 0 A_Explode(ACS_NamedExecuteWithResult("WOC Player Scale", 30, INTELLECT, ABIL_PILLAROFFLAME, WOCTARGET),128,0,0,128)
		XPL1 ABCDEF 2 Bright
		Stop
	}
}

Actor PillarOfFlameBallTrail
{   
  Radius 0
  Height 0
  +NoBlockMap
  +NoGravity
  +DontSplash
  +ForceXYBillBoard
  +NOINTERACTION
  +CLIENTSIDEONLY
  +DONTBLAST
  RenderStyle Add
  //Alpha 0.6
  Scale 1
  States
  {
  Spawn:
    TNT1 A 1
    LVBL JJKKLLMMMN 2 Bright A_JumpIf(WaterLevel > 1, "Disappear")
    Stop
  Disappear:
    TNT1 A 1
    Stop
  }
}

Actor PolyMorph : WoC_Skill {}

Actor UsePolyMorph : Custominventory
{
	Inventory.MaxAmount 0
	+Inventory.AUTOACTIVATE
	states
	{
	Use:
		TNT1 A 0 A_JumpIfInventory("PolyMorph", 10, 10)
		TNT1 A 0 A_JumpIfInventory("PolyMorph", 9, 11)
		TNT1 A 0 A_JumpIfInventory("PolyMorph", 8, 12)
		TNT1 A 0 A_JumpIfInventory("PolyMorph", 7, 13)
		TNT1 A 0 A_JumpIfInventory("PolyMorph", 6, 14)
		TNT1 A 0 A_JumpIfInventory("PolyMorph", 5, 15)
		TNT1 A 0 A_JumpIfInventory("PolyMorph", 4, 16)
		TNT1 A 0 A_JumpIfInventory("PolyMorph", 3, 17)
		TNT1 A 0 A_JumpIfInventory("PolyMorph", 2, 18)
		TNT1 A 0 A_JumpIfInventory("PolyMorph", 1, 19)
		TNT1 A 0 A_FireCustomMissile("PolymorphPorkFX", -90, 0, 0, 0, 1)
		TNT1 A 0 A_FireCustomMissile("PolymorphPorkFX", 90, 0, 0, 0, 1)
		TNT1 A 0 A_FireCustomMissile("PolymorphPorkFX", -80, 0, 0, 0, 1)
		TNT1 A 0 A_FireCustomMissile("PolymorphPorkFX", 80, 0, 0, 0, 1)
		TNT1 A 0 A_FireCustomMissile("PolymorphPorkFX", -70, 0, 0, 0, 1)
		TNT1 A 0 A_FireCustomMissile("PolymorphPorkFX", 70, 0, 0, 0, 1)
		TNT1 A 0 A_FireCustomMissile("PolymorphPorkFX", -60, 0, 0, 0, 1)
		TNT1 A 0 A_FireCustomMissile("PolymorphPorkFX", 60, 0, 0, 0, 1)
		TNT1 A 0 A_FireCustomMissile("PolymorphPorkFX", -50, 0, 0, 0, 1)
		TNT1 A 0 A_FireCustomMissile("PolymorphPorkFX", 50, 0, 0, 0, 1)
		TNT1 A 0 A_FireCustomMissile("PolymorphPorkFX", -40, 0, 0, 0, 1)
		TNT1 A 0 A_FireCustomMissile("PolymorphPorkFX", 40, 0, 0, 0, 1)
		TNT1 A 0 A_FireCustomMissile("PolymorphPorkFX", -30, 0, 0, 0, 1)
		TNT1 A 0 A_FireCustomMissile("PolymorphPorkFX", 30, 0, 0, 0, 1)
		TNT1 A 0 A_FireCustomMissile("PolymorphPorkFX", -20, 0, 0, 0, 1)
		TNT1 A 0 A_FireCustomMissile("PolymorphPorkFX", 20, 0, 0, 0, 1)
		TNT1 A 0 A_FireCustomMissile("PolymorphPorkFX", -10, 0, 0, 0, 1)
		TNT1 A 0 A_FireCustomMissile("PolymorphPorkFX", 10, 0, 0, 0, 1)
		TNT1 A 0 A_FireCustomMissile("PolymorphPorkFX", 0, 0, 0, 0, 1)
		Stop
	}
}

Actor ArticGlacier : WoC_Skill {}

Actor UseArticGlacier : Custominventory
{
	Inventory.MaxAmount 0
	+Inventory.AUTOACTIVATE
	States
	{
	Use:
		TNT1 A 0 A_GiveInventory("PowerArticGlacierCooldown")
		TNT1 A 0 A_PlaySound("misc/freeze")
		TNT1 A 0 A_FireCustomMissile("ArticGlacierFog",-8,-5,0)
		TNT1 A 0 A_FireCustomMissile("ArticGlacierFog",-16,-4,0)
		TNT1 A 0 A_FireCustomMissile("ArticGlacierFog",-24,-3,0)
		TNT1 A 0 A_FireCustomMissile("ArticGlacierFog",-32,-2,0)
		TNT1 A 0 A_FireCustomMissile("ArticGlacierFog",-40,-1,0)
		TNT1 A 0 A_FireCustomMissile("ArticGlacierFog",0,0,0)
		TNT1 A 0 A_FireCustomMissile("ArticGlacierFog",8,1,0)
		TNT1 A 0 A_FireCustomMissile("ArticGlacierFog",16,2,0)
		TNT1 A 0 A_FireCustomMissile("ArticGlacierFog",24,3,0)
		TNT1 A 0 A_FireCustomMissile("ArticGlacierFog",32,4,0)
		TNT1 A 0 A_FireCustomMissile("ArticGlacierFog",40,5,0)
		Stop
	}
}

Actor PowerArticGlacierCooldown : Powerup
{
	Powerup.Duration -10
}

actor ArticGlacierFog
{
    Radius 6
    Height 8
    Speed 40
	YScale 0.5
    Damage (ACS_NamedExecuteWithResult("WOC Player Scale", 1, INTELLECT, ABIL_ARTICGLACIER, WOCTARGET))
    PROJECTILE
    RENDERSTYLE ADD
    +Ripper
	+BLOODLESSIMPACT
	+WINDTHRUST
	+PAINLESS
	+FLOORHUGGER
	+NODAMAGETHRUST
	+DONTBLAST
	Damagetype Ice
    States
    {
    Spawn:
		ZKEX AAAAA 1 A_SPawnItemEx("ArticGlacierFogFX", frandom(-4,4), frandom(-4,4), 0, 0, 0, 1, 0, SXF_CLIENTSIDE, 200)
    	ZKEX AABBCCDDEEFFGGHHIIJJKK 1 Bright A_SpawnItemEx("ArticGlacierSpike",frandom(-10,10),frandom(-10,10),0,0,0,0,0)
        stop
    }
}

actor ArticGlacierSpike
{
	PROJECTILE
	+FLOORHUGGER
	+THRUGHOST
	+NODAMAGETHRUST +DONTBLAST
	+RIPPER
	+DONTSPLASH
	+FORCERADIUSDMG
	Obituary "%o was frozen by %k's ice spikes." 
	speed 0
	radius 3
	height 5
	DamageType "Ice"
	Renderstyle Add
	Var int user_count;
	Scale 1.25
	States
	{
	Spawn:
		TNT1 A 0
		TNT1 A 0 A_JumpIfInTargetInventory("IsIceborn",1,"Iceborn")
	Animation:
		TNT1 A 0 A_PlaySound("weapons/icespike")
		ICEP NMLKJIHGFEDCB 1 A_SPawnItemEx("ArticGlacierFogFX", frandom(-4,4), frandom(-4,4), 0, 0, 0, 1, 0, SXF_CLIENTSIDE, 200)
	Looper:
		ICEP AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 1 A_Explode (ACS_NamedExecuteWithResult("WOC Player Scale", 1, INTELLECT, ABIL_ARTICGLACIER, WOCTARGET)
			,4,0,0,4)
		ICEP A 0 A_SetUserVar("user_count", user_count + 1)
		ICEP A 0 A_JumpIf(user_count > 10, "Explode1")
		Loop
	Explode1:
		SHEX A 0 A_JumpIfInTargetInventory("ArticGlacier", 5, "Explode2")
		SHEX A 0 A_PlaySound("Mage/ArticGlacier/Explode")
		SHEX A 0 A_SetScale(0.4)
		SHEX A 0 A_Explode (ACS_NamedExecuteWithResult("WOC Player Scale", 24, INTELLECT, ABIL_ARTICGLACIER, WOCTARGET)
			,24,0,0,24)
		ICPR DEFGH 4 Bright
		Stop
	Explode2:
		SHEX A 0 A_PlaySound("Mage/ArticGlacier/Explode")
		SHEX A 0 A_SetScale(0.4)
		SHEX A 0 A_Explode (ACS_NamedExecuteWithResult("WOC Player Scale", 24, INTELLECT, ABIL_ARTICGLACIER, WOCTARGET)
			,24,0,0,24)
		SHEX A 0 Bright A_CustomMissile("ArticGlacierShot", 2, 0, 0, 6, -1)
		SHEX A 0 Bright A_CustomMissile("ArticGlacierShot", 2, 0, 90, 6, -1)
		SHEX A 0 Bright A_CustomMissile("ArticGlacierShot", 2, 0, 180, 6, -1)
		SHEX A 0 Bright A_CustomMissile("ArticGlacierShot", 2, 0, 270, 6, -1)
		ICPR DEFGH 4 Bright
		Stop
	Iceborn:
		ICEP A 0 A_ChangeFlag("ForcePain",1)
		Goto Animation
	}
}

actor ArticGlacierFogFX
{
	PROJECTILE
	+RIPPER
	+BLOODLESSIMPACT
	+DOOMBOUNCE
	+MTHRUSPECIES +NODAMAGETHRUST +DONTBLAST
	+CANNOTPUSH
	+PAINLESS
	+CLIENTSIDEONLY
	Damagetype "Ice"
	Damage 0
	renderstyle add
	alpha 1
	scale 0.2
	radius 3
	height 5
	States
	{
	Spawn:
		FRSS JKLMNOPQRSTUVWXYZ 1 A_FadeOut(0.05)
		FRST ABC 1 A_FadeOut(0.05)
		stop
	Death:
		TNT1 A 1
		stop
	}
}

ACTOR ArticGlacierShot
{
	Speed 10
	Radius 2
	Height 1
	Scale 0.4
	Damage (ACS_NamedExecuteWithResult("WOC Player Scale", 10, INTELLECT, ABIL_ARTICGLACIER, WOCTARGET))
	DamageType "Ice"

	PROJECTILE
	-NOGRAVITY
	+DONTSPLASH
	+DONTBLAST
	+NODAMAGETHRUST
	+THRUGHOST
	+MTHRUSPECIES
	Gravity 0.125
	States
	{
	Spawn:
		TNT1 A 0
		TNT1 A 0 A_JumpIfInTargetInventory("IsIceborn",1,"Iceborn")
	Animation:
		ICPR NOP 2 Bright
		Loop
	Iceborn:
		ICPR A 0 A_ChangeFlag("ForcePain",1)
		Goto Animation
	}
}

Actor LightningSurge : WoC_Skill {}

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

ACTOR LightningSurgeMissile
{
	Radius 12
	Height 6
	Speed 10
	//Damage (frandom(100,150)*(0.1*ACS_ExecuteWithResult(WOC_DECORATE,MAGESKILLS,ABIL_LIGHTNINGSURGE,WOCTARGET)+0.025*(30+ACS_ExecuteWithResult(WOC_DECORATE,STATS,INTELLECT,WOCTARGET))))
	/*+NODAMAGETHRUST*/ +DONTBLAST
	+MTHRUSPECIES /*+NODAMAGETHRUST*/ +DONTBLAST
	PROJECTILE
	RENDERSTYLE ADD
	Alpha 0.80
	+FORCEXYBILLBOARD
	+DOOMBOUNCE
	BounceFactor 1.0
	+RIPPER
	+BLOODLESSIMPACT
	+PAINLESS
	+SKYEXPLODE
	+DONTSPLASH
	SeeSound "weapons/shock"
	DeathSound "weapons/devexp"
	Obituary "%o was smitten by the Overlord and %k."
	Damagetype "Lightning"
	Var int user_count;
	states
	{
	Spawn:
		SRX1 S 1 BRIGHT A_CustomMissile("LightningSurgeMissileLightning", 0, 0, frandom(0,360), 6, frandom(-5,18))
		SRX1 T 1 BRIGHT A_CustomMissile("LightningSurgeMissileLightning", 0, 0, frandom(0,360), 6, frandom(-5,18))
		SRX1 U 1 BRIGHT A_CustomMissile("LightningSurgeMissileLightning", 0, 0, frandom(0,360), 6, frandom(-5,18))
		SRX1 V 1 BRIGHT A_CustomMissile("LightningSurgeMissileLightning", 0, 0, frandom(0,360), 6, frandom(-5,18))
		SRX1 W 1 BRIGHT A_CustomMissile("LightningSurgeMissileLightning", 0, 0, frandom(0,360), 6, frandom(-5,18))
		SRX1 W 0 A_SetUserVar("user_count", user_count + 1)
		SRX1 W 0 A_JumpIf(user_count > 30+ACS_ExecuteWithResult(WOC_DECORATE,MAGESKILLS,ABIL_LIGHTNINGSURGE,WOCTARGET)*2, "Gone")
		Loop
	Death:
		SRX1 S 1 BRIGHT A_CustomMissile("LightningSurgeMissileLightning", 0, 0, frandom(0,360), 6, frandom(-5,18))
		SRX1 T 1 BRIGHT A_CustomMissile("LightningSurgeMissileLightning", 0, 0, frandom(0,360), 6, frandom(-5,18))
		SRX1 U 1 BRIGHT A_CustomMissile("LightningSurgeMissileLightning", 0, 0, frandom(0,360), 6, frandom(-5,18))
		SRX1 V 1 BRIGHT A_CustomMissile("LightningSurgeMissileLightning", 0, 0, frandom(0,360), 6, frandom(-5,18))
		SRX1 W 1 BRIGHT A_CustomMissile("LightningSurgeMissileLightning", 0, 0, frandom(0,360), 6, frandom(-5,18))
		SRX1 W 0 BRIGHT A_SetUserVar("user_count", user_count + 1)
		SRX1 W 0 BRIGHT A_JumpIf(user_count > 30+ACS_ExecuteWithResult(WOC_DECORATE,MAGESKILLS,ABIL_LIGHTNINGSURGE,WOCTARGET)*2, "Gone")
		Loop
	Gone:
		TNT1 A 0 BRIGHT A_JumpIfInTargetInventory("LightningSurge", 7, "Gone3")
		TNT1 A 0 BRIGHT A_JumpIfInTargetInventory("LightningSurge", 4, "Gone2")
		TNT1 A 1
		Stop
	Gone2:
		TNT1 AAAAAAAAAAAAAAAAAA 0 Bright A_CustomMissile("LightningSurgeMissileLightning", 0, 0, frandom(0,360), 6, frandom(-5,18))
		TNT1 A 1
		Stop
	Gone3:
		TNT1 AAAAAAAAAAAAAAAAAA 0 Bright A_CustomMissile("LightningSurgeMissileLightning", 0, 0, frandom(0,360), 6, frandom(-5,18))
		TNT1 AAAAAAAAAAAAAAAAAA 0 Bright A_CustomMissile("LightningSurgeMissileLightning", 0, 0, frandom(0,360), 6, frandom(-5,18))
		TNT1 A 1
		Stop
	}
}
 
ACTOR LightningSurgeMissileLightning
{
	Speed 25
	Radius 6
	Height 8
	Damage (1)
	DamageType "Lightning"
	SeeSound "Mage/LightningSurge/Fire"
	DeathSound "Mage/LightningSurge/Impact"
	RenderStyle Add
	Projectile
	+MTHRUSPECIES /*+NODAMAGETHRUST*/ +DONTBLAST
	+SEEKERMISSILE
	+FORCERADIUSDMG
	ReactionTime 60
	States
	{
	Spawn:
		EALT AAAAAAA 0 A_SeekerMissile(90,90,SMF_LOOK|SMF_PRECISE)
	Looper:
		EALT ABC 1 Bright A_CountDown
		Loop
	Death:
		EALT D 0 Bright A_Explode(ACS_NamedExecuteWithResult("WOC Player Scale", FRandom(6,12), INTELLECT, ABIL_LIGHTNINGSURGE, WOCTARGET),24,0,0,24)
		EALT DEFGHIJKLMNO 1 Bright
		Stop
	}
}

Actor LightningSurgeCounter1 : PowerupGiver
{
	+INVENTORY.AUTOACTIVATE
	Inventory.MaxAmount 0
	Powerup.Type LightningSurgeCounter
	Powerup.Duration 160
}

Actor LightningSurgeCounter2 : PowerupGiver
{
	+INVENTORY.AUTOACTIVATE
	Inventory.MaxAmount 0
	Powerup.Type LightningSurgeCounter
	Powerup.Duration 170
}

Actor LightningSurgeCounter3 : PowerupGiver
{
	+INVENTORY.AUTOACTIVATE
	Inventory.MaxAmount 0
	Powerup.Type LightningSurgeCounter
	Powerup.Duration 180
}

Actor LightningSurgeCounter4 : PowerupGiver
{
	+INVENTORY.AUTOACTIVATE
	Inventory.MaxAmount 0
	Powerup.Type LightningSurgeCounter
	Powerup.Duration 190
}

Actor LightningSurgeCounter5 : PowerupGiver
{
	+INVENTORY.AUTOACTIVATE
	Inventory.MaxAmount 0
	Powerup.Type LightningSurgeCounter
	Powerup.Duration 200
}

Actor LightningSurgeCounter6 : PowerupGiver
{
	+INVENTORY.AUTOACTIVATE
	Inventory.MaxAmount 0
	Powerup.Type LightningSurgeCounter
	Powerup.Duration 210
}

Actor LightningSurgeCounter7 : PowerupGiver
{
	+INVENTORY.AUTOACTIVATE
	Inventory.MaxAmount 0
	Powerup.Type LightningSurgeCounter
	Powerup.Duration 220
}

Actor LightningSurgeCounter8 : PowerupGiver
{
	+INVENTORY.AUTOACTIVATE
	Inventory.MaxAmount 0
	Powerup.Type LightningSurgeCounter
	Powerup.Duration 230
}

Actor LightningSurgeCounter9 : PowerupGiver
{
	+INVENTORY.AUTOACTIVATE
	Inventory.MaxAmount 0
	Powerup.Type LightningSurgeCounter
	Powerup.Duration 240
}

Actor LightningSurgeCounter10 : PowerupGiver
{
	+INVENTORY.AUTOACTIVATE
	Inventory.MaxAmount 0
	Powerup.Type LightningSurgeCounter
	Powerup.Duration 250
}

Actor PowerLightningSurgeCounter : Powerup
{
	Powerup.Duration 0x7FFFFFFF
}

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

Actor PowerPyroDamage : PowerDamage
{
	DamageFactor "Fire", 1.15
	DamageFactor "FirePlayer", 1.15
	DamageFactor "FireTime", 1.15
	Powerup.Duration 0x7FFFFFFF
}

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

Actor PowerIcebornDamage : PowerDamage
{
	DamageFactor "Ice", 1.15
	DamageFactor "IcePlayer", 1.15
	DamageFactor "IceTime", 1.15
	Powerup.Duration 0x7FFFFFFF
}

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

Actor PowerArchonDamage : PowerDamage
{
	DamageFactor "Lightning", 1.15
	DamageFactor "LightningPlayer", 1.15
	DamageFactor "LightningTime", 1.15
	DamageFactor "Arcane", 1.15
	DamageFactor "ArcanePlayer", 1.15
	DamageFactor "ArcaneTime", 1.15
	Powerup.Duration 0x7FFFFFFF
}

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

Actor PowerPyroArmor : PowerProtection
{
	DamageFactor "Fire", 0.8
	DamageFactor "FireTime", 0.8
	Powerup.Duration 0x7FFFFFFF
}

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

Actor PowerIcebornArmor : PowerProtection
{
	DamageFactor "Normal", 0.9
	DamageFactor "Ice", 0.8
	DamageFactor "IceTime", 0.8
	Powerup.Duration 0x7FFFFFFF
}

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

Actor PowerArchonArmor : PowerProtection
{
	DamageFactor "Lightning", 0.8
	DamageFactor "LightningTime", 0.8
	DamageFactor "Arcane", 0.8
	DamageFactor "ArcaneTime", 0.8
	Powerup.Duration 0x7FFFFFFF
}

ACTOR PyroArmorBullet
{
	Damage (0)
	Speed 0
	Alpha 0.80
	+FORCEXYBILLBOARD
	Radius 1
	Height 1
	+NOBLOCKMAP
	+NOGRAVITY
	+SEEKERMISSILE
	+MTHRUSPECIES /*+NODAMAGETHRUST*/
	+DONTREFLECT
	+DONTBLAST
	+FORCERADIUSDMG
	RenderStyle Add
	Alpha 1
	Damagetype "Fire"
	states
	{
	Spawn:
		XPL1 A 0
		XPL1 AAAAAAA 0 A_SeekerMissile(90,90,SMF_LOOK|SMF_PRECISE)
		XPL1 A 0 A_Warp(AAPTR_TRACER, 0, 0, 32, 0, WARPF_NOCHECKPOSITION|WARPF_INTERPOLATE,"Warped")
		TNT1 A 1
		Stop
	Warped:
		XPL1 A 0 Bright A_PlaySound("Mage/PyroArmor/Hit")
		XPL1 A 0 BRIGHT A_Explode(ACS_NamedExecuteWithResult("WOC Player Scale", 25, INTELLECT, 0, WOCTARGET), 80, 0, 0, 80)
		XPL1 ABCDEF 3 Bright
		Stop
	}
}

Actor IcebornItem : Custominventory
{
	Inventory.MaxAmount 0
	+Inventory.AUTOACTIVATE
	states
	{
	Use:
		TNT1 A 0 A_JumpIfInTargetInventory("IsIceborn",1,"Iceborn")
		TNT1 A 0 A_RailWait
		Stop
	Iceborn:
		TNT1 A 0 A_SpawnItemEx("IcebornSpawner", 0, 0, 32, 0, 0, 0, 0, SXF_TRANSFERPOINTERS|SXF_NOCHECKPOSITION|SXF_SETMASTER)
		Stop
	}
}

actor IcebornSpawner
{
	height 3
	radius 3
	damage 0//(ACS_NamedExecuteWithResult("WOC Player Scale", FRandom(26,46), AGILITY, ABIL_RANGEDMASTERY, WOCTARGET))
	speed 45
	/*PROJECTILE
	+NODAMAGETHRUST
	+RIPPER
	+BLOODLESSIMPACT
	+NOGRAVITY
	+DONTBLAST
	+DONTSPLASH
	+NOEXPLODEFLOOR*/
	MONSTER
	-SHOOTABLE
	-COUNTKILL
	-SOLID
	-CANPUSHWALLS
	-CANUSEWALLS
	-ACTIVATEMCROSS
	+NOBLOCKMAP
	+NOTELEPORT
	Renderstyle None
	Damagetype "Ice"
	DeathSound "HunterIceCrossBowImpact"
	Var int user_mheight;
	Var int user_mradius;
	Var int user_repeat;
	states
	{
	Spawn:
		TNT1 A 0
		TNT1 A 0 A_SetUserVar(user_mheight,ACS_NamedExecuteWithResult("WOC GETMASTERHEIGHT"))
		TNT1 A 0 A_SetUserVar(user_mradius,ACS_NamedExecuteWithResult("WOC GETMASTERHEIGHT",1))
	Looping:
		TNT1 A 1 A_Warp(AAPTR_MASTER,0,0,0,0,WARPF_STOP)
		TNT1 A 0 //A_SetUserVar(user_mheight,ACS_NamedExecuteWithResult("WOC GETMASTERHEIGHT"))
		TNT1 A 0 A_CheckFlag("ICECORPSE", "Looping", AAPTR_MASTER)
	Death:
		TNT1 A 0 A_SpawnItemEx("IcebornWind", frandom(-user_mradius,user_mradius), frandom(-user_mradius,user_mradius), frandom(0,user_mheight), frandom((6+user_mradius/10)/2,6+user_mradius/10), 0, frandom(-user_mheight/15,user_mheight/15), Random(0,359), SXF_TRANSFERPOINTERS|SXF_NOCHECKPOSITION)
	Repeating:
		TNT1 A 0 A_SpawnItemEx("IcebornWind", frandom(-user_mradius,user_mradius), frandom(-user_mradius,user_mradius), frandom(0,user_mheight), frandom((6+user_mradius/10)/2,6+user_mradius/10), 0, frandom(-user_mheight/15,user_mheight/15), Random(0,359), SXF_TRANSFERPOINTERS|SXF_NOCHECKPOSITION)
		TNT1 A 0 A_SetUserVar(user_repeat, user_repeat+1)
		TNT1 A 0 A_JumpIf(user_repeat > (user_mradius/2 + user_mheight/5)-4, 1)
		Loop
		TNT1 A 1
		Stop
	}
}

actor IcebornWind
{
	PROJECTILE
	+RIPPER
	+BLOODLESSIMPACT
	+DOOMBOUNCE
	+MTHRUSPECIES +NODAMAGETHRUST +DONTBLAST
	+CANNOTPUSH
	+FORCEPAIN
	Damagetype "Ice"
	Damage (ACS_NamedExecuteWithResult("WOC Player Scale", FRandom(2,3), INTELLECT, 0, WOCTARGET))
	Radius 6
	renderstyle add
	alpha 1
	scale 0.6
	Height 8
	States
	{
	Spawn:
		FRSS JKLMNOPQRSTUVWXYZ 2 A_FadeOut(0.05)
		FRST ABC 2 A_FadeOut(0.05)
		stop
	Death:
		TNT1 A 1
		stop
	}
}