Actor "FrostShards" : MWeapFrost// replaces MWeapFrost
{
	Tag "Frost Shards"
	Weapon.KickBack 100
	Weapon.YAdjust 0
	Weapon.AmmoGive1 0
	Weapon.AmmoGive2 0
	Weapon.AmmoType2 "mana1"
	Weapon.AmmoUse2 1
	Weapon.SelectionOrder 4
	+UNDROPPABLE
	+MELEEWEAPON
	Weapon.BobStyle InverseSmooth
	Weapon.BobSpeed 2.1
	Weapon.BobRangeY 0.4
	Weapon.BobRangeX 0.5
	States
	{
	Select:
		CONE A 1 A_Raise
		TNT1 A 0 A_Raise
		Loop
	Deselect:
		CONE A 1 A_Lower
		TNT1 A 0 A_Lower
		Loop
	Fire:
		CONE B 3
	Hold:
		CONE C 1 offset(-1,31)
		CONE C 1 offset(-2,39)
		CONE C 1 offset(-1,31)
		CONE D 1 offset(2,31)
		CONE D 1 offset(-1,39)
		CONE D 1 offset(1,34)
		CONE E 0 A_FireConePL1
		CONE E 0 A_JumpIfInventory("IsIceborn",1,"Iceborn")
		CONE E 1 offset(2,31) A_FireBullets(0,0,1,ACS_NamedExecuteWithResult("WOC Player Scale", FRandom(90,110), INTELLECT, 0, ACTIVATOR)-90,"FrostShardMeleePuff",FBF_NORANDOM,64)
		CONE E 1 offset(-1,39) A_SetPitch(Pitch-0.6)
		CONE E 1 offset(1,34) A_SetPitch(Pitch+0.2)
		CONE F 1 offset(-1,31) A_SetPitch(Pitch+0.2)
		CONE F 1 offset(-2,39) A_SetPitch(Pitch+0.2)
		CONE F 1 offset(-1,31)
		CONE G 1 offset(2,33)
		CONE G 1 offset(-1,31)
		CONE G 1 offset(1,32)
		CONE G 1 offset(-1,33)
		CONE A 2 offset(0,32)
		CONE A 2
		goto ready
	Iceborn:
		CONE E 1 offset(2,31) A_FireBullets(0,0,1,ACS_NamedExecuteWithResult("WOC Player Scale", FRandom(90,110), INTELLECT, 0, ACTIVATOR)-90,"FrostShardMeleePuffPain",FBF_NORANDOM,64)
		CONE E 1 offset(-1,39) A_SetPitch(Pitch-0.6)
		CONE E 1 offset(1,34) A_SetPitch(Pitch+0.2)
		CONE F 1 offset(-1,31) A_SetPitch(Pitch+0.2)
		CONE F 1 offset(-2,39) A_SetPitch(Pitch+0.2)
		CONE F 1 offset(-1,31)
		CONE G 1 offset(2,33)
		CONE G 1 offset(-1,31)
		CONE G 1 offset(1,32)
		CONE G 1 offset(-1,33)
		CONE A 2 offset(0,32)
		CONE A 2
		goto ready
	AltFire:
		CONE B 3
		CONE C 1 offset(-1,31)
		CONE C 1 offset(-2,39)
		CONE C 1 offset(-1,31)
		CONE D 1 offset(2,31)
		CONE D 1 offset(-1,39)
		CONE D 1 offset(1,34)
	AltHold:
		CONE E 1 offset(-2,31) a_firecustommissile("NewFrostMissile2",frandom(-3,3),1,2)
		CONE E 1 offset(1,35) A_SetPitch(Pitch-0.25)
		CONE E 1 offset(-1,34) A_SetPitch(Pitch+0.25)
		CONE E 1 offset(1,31) a_firecustommissile("NewFrostMissile2",frandom(-3,3),0,2)
		CONE E 1 offset(2,35) A_SetPitch(Pitch-0.25)
		CONE E 1 offset(1,31) A_SetPitch(Pitch+0.25)
		CONE E 1 offset(-1,31) a_firecustommissile("NewFrostMissile2",frandom(-3,3),0,2)
		CONE E 1 offset(-2,35) A_SetPitch(Pitch-0.25)
		CONE E 1 offset(1,31) A_SetPitch(Pitch+0.25)
		CONE F 1 offset(-1,31) A_Refire
		CONE F 1 offset(-2,39)
		CONE F 1 offset(-1,31)
		CONE G 1 offset(2,33)
		CONE G 1 offset(-1,31)
		CONE G 1 offset(1,32)
		CONE G 1 offset(-1,33)
		goto ready
	}
}

Actor FrostShardMeleePuff
{
	Mass 5
	+NOBLOCKMAP
	+NOGRAVITY
	+DONTSPLASH
	+BLOODLESSIMPACT
	+MTHRUSPECIES
	Damagetype "Ice"
	States
	{
	Spawn:
		TNT1 A 1 Bright
		Stop
	}
}

Actor FrostShardMeleePuffPain : FrostShardMeleePuff { +FORCEPAIN }

ACTOR IceComet
{
    PROJECTILE
    /*+NODAMAGETHRUST*/
    Speed 20
    Damage (ACS_NamedExecuteWithResult("WOC Player Scale", FRandom(57,67), INTELLECT, 0, WOCTARGET))
    Radius 10
    Height 14
    RenderStyle Add
	+THRUGHOST
	+WINDTHRUST
	+MTHRUSPECIES /*+NODAMAGETHRUST*/
    DamageType "Ice"
    DeathSound "absolutezero/explode"
    States
    {
    Spawn:
		FX05 AAABBBCCC 1 Bright A_SpawnItemEx("IceCometTrail",0,0,0,0,0,0,0,128)
		Loop
    Death:
		TNT1 A 0 A_CustomMissile("ZeroKExplosion",0,0,0,6,0)
		TNT1 A 0 A_CustomMissile("ZeroKExplosion",0,0,8,6,0)
		TNT1 A 0 A_CustomMissile("ZeroKExplosion",0,0,16,6,0)
		TNT1 A 0 A_CustomMissile("ZeroKExplosion",0,0,24,6,0)
		TNT1 A 0 A_CustomMissile("ZeroKExplosion",0,0,32,6,0)
		TNT1 A 0 A_CustomMissile("ZeroKExplosion",0,0,40,6,0)
		TNT1 A 0 A_CustomMissile("ZeroKExplosion",0,0,48,6,0)
		TNT1 A 0 A_CustomMissile("ZeroKExplosion",0,0,56,6,0)
		TNT1 A 0 A_CustomMissile("ZeroKExplosion",0,0,64,6,0)
		TNT1 A 0 A_CustomMissile("ZeroKExplosion",0,0,72,6,0)
		TNT1 A 0 A_CustomMissile("ZeroKExplosion",0,0,80,6,0)
		TNT1 A 0 A_CustomMissile("ZeroKExplosion",0,0,88,6,0)
		TNT1 A 0 A_CustomMissile("ZeroKExplosion",0,0,96,6,0)
		TNT1 A 0 A_CustomMissile("ZeroKExplosion",0,0,104,6,0)
		TNT1 A 0 A_CustomMissile("ZeroKExplosion",0,0,112,6,0)
		TNT1 A 0 A_CustomMissile("ZeroKExplosion",0,0,120,6,0)
		TNT1 A 0 A_CustomMissile("ZeroKExplosion",0,0,128,6,0)
		TNT1 A 0 A_CustomMissile("ZeroKExplosion",0,0,136,6,0)
		TNT1 A 0 A_CustomMissile("ZeroKExplosion",0,0,144,6,0)
		TNT1 A 0 A_CustomMissile("ZeroKExplosion",0,0,152,6,0)
		TNT1 A 0 A_CustomMissile("ZeroKExplosion",0,0,160,6,0)
		TNT1 A 0 A_CustomMissile("ZeroKExplosion",0,0,168,6,0)
		TNT1 A 0 A_CustomMissile("ZeroKExplosion",0,0,176,6,0)
		TNT1 A 0 A_CustomMissile("ZeroKExplosion",0,0,184,6,0)
		TNT1 A 0 A_CustomMissile("ZeroKExplosion",0,0,192,6,0)
		TNT1 A 0 A_CustomMissile("ZeroKExplosion",0,0,200,6,0)
		TNT1 A 0 A_CustomMissile("ZeroKExplosion",0,0,208,6,0)
		TNT1 A 0 A_CustomMissile("ZeroKExplosion",0,0,216,6,0)
		TNT1 A 0 A_CustomMissile("ZeroKExplosion",0,0,224,6,0)
		TNT1 A 0 A_CustomMissile("ZeroKExplosion",0,0,232,6,0)
		TNT1 A 0 A_CustomMissile("ZeroKExplosion",0,0,240,6,0)
		TNT1 A 0 A_CustomMissile("ZeroKExplosion",0,0,248,6,0)
		TNT1 A 0 A_CustomMissile("ZeroKExplosion",0,0,256,6,0)
		TNT1 A 0 A_CustomMissile("ZeroKExplosion",0,0,264,6,0)
		TNT1 A 0 A_CustomMissile("ZeroKExplosion",0,0,272,6,0)
		TNT1 A 0 A_CustomMissile("ZeroKExplosion",0,0,280,6,0)
		TNT1 A 0 A_CustomMissile("ZeroKExplosion",0,0,288,6,0)
		TNT1 A 0 A_CustomMissile("ZeroKExplosion",0,0,296,6,0)
		TNT1 A 0 A_CustomMissile("ZeroKExplosion",0,0,304,6,0)
		TNT1 A 0 A_CustomMissile("ZeroKExplosion",0,0,312,6,0)
		TNT1 A 0 A_CustomMissile("ZeroKExplosion",0,0,320,6,0)
		TNT1 A 0 A_CustomMissile("ZeroKExplosion",0,0,328,6,0)
		TNT1 A 0 A_CustomMissile("ZeroKExplosion",0,0,336,6,0)
		TNT1 A 0 A_CustomMissile("ZeroKExplosion",0,0,344,6,0)
		TNT1 A 0 A_CustomMissile("ZeroKExplosion",0,0,352,6,0)
		TNT1 DEFG 4
		Stop
    }
}

ACTOR iceCometTrail
{       
   	PROJECTILE
   	+NOCLIP
	+NOINTERACTION
	Renderstyle ADD
	Alpha 0.6
	States
	{   
	Spawn:
	    ICTR ABCDEFGHI 4 Bright 
	    Stop
	}
}

Actor NewFrostMissile : FrostMissile replaces FrostMissile
{
	Damage (ACS_NamedExecuteWithResult("WOC Player Scale", FRandom(2,16), INTELLECT, 0, WOCTARGET))
	Radius 6
	Renderstyle Add
	Damagetype "Ice"
	+THRUGHOST
	+WINDTHRUST
	+MTHRUSPECIES /*+NODAMAGETHRUST*/
	+DONTBLAST
	ProjectileKickBack 50
	States
	{
	Spawn:
		SHRD A 0 Bright
		SHRD A 0 Bright A_JumpIfInTargetInventory("IsIceborn",1,"Iceborn")
	Animation:
		SHRD AA 1 Bright A_SpawnItemEx("FrostMissileFog", 0, 0, 1, 4, 0, frandom(-0.5, 0.5), frandom(-10, 10), 128)
		SHRD A 0 Bright A_ShedShard
		SHRD AAA 1 Bright A_SpawnItemEx("FrostMissileFog", 0, 0, 1, 4, 0, frandom(-0.5, 0.5), frandom(-10, 10), 128)
		SHRD BBB 1 Bright A_SpawnItemEx("FrostMissileFog", 0, 0, 1, 4, 0, frandom(-0.5, 0.5), frandom(-10, 10), 128)
		SHRD CCC 1 Bright A_SpawnItemEx("FrostMissileFog", 0, 0, 1, 4, 0, frandom(-0.5, 0.5), frandom(-10, 10), 128)
		Loop
	Iceborn:
		SHRD A 0 Bright A_ChangeFlag("ForcePain", 1)
		Goto Animation
	}
}

Actor NewFrostMissile2 : FrostMissile
{
	Damage (ACS_NamedExecuteWithResult("WOC Player Scale", FRandom(3,24), INTELLECT, 0, WOCTARGET))
	Radius 6
	Speed 30
	Renderstyle Add
	Damagetype "Ice"
	SeeSound "Icicle/Fire/Small"
	DeathSound "MageShardsAltExplode"
	+THRUGHOST
	+WINDTHRUST
	+MTHRUSPECIES /*+NODAMAGETHRUST*/
	+DONTBLAST
	ProjectileKickBack 50
	States
	{
	Spawn:
		SHRD A 0 Bright
		SHRD A 0 Bright A_JumpIfInTargetInventory("IsIceborn",1,"Iceborn")
	Animation:
		SHRD AA 1 Bright A_SpawnItemEx("FrostMissileFog", 0, 0, 1, 4, 0, frandom(-0.5, 0.5), frandom(-10, 10), 128)
		SHRD AAA 1 Bright A_SpawnItemEx("FrostMissileFog", 0, 0, 1, 4, 0, frandom(-0.5, 0.5), frandom(-10, 10), 128)
		SHRD BBB 1 Bright A_SpawnItemEx("FrostMissileFog", 0, 0, 1, 4, 0, frandom(-0.5, 0.5), frandom(-10, 10), 128)
		SHRD CCC 1 Bright A_SpawnItemEx("FrostMissileFog", 0, 0, 1, 4, 0, frandom(-0.5, 0.5), frandom(-10, 10), 128)
		Loop
	Iceborn:
		SHRD A 0 Bright A_ChangeFlag("ForcePain", 1)
		Goto Animation
	}
}

Actor FrostMissileFog
{
	Radius 1
	Height 1
	+NoGravity
	+NoClip
	+CLIENTSIDEONLY +DONTBLAST
	RenderStyle Add
	Alpha 0.2
	XScale 0.4
	YScale 0.2
	States
	{
	Spawn:
		FFFG A 4 A_FadeOut(0.1)
		Loop
	}
}

actor ZeroKExplosion
{
    Radius 6
    Height 8
    Speed 5
    Damage (ACS_NamedExecuteWithResult("WOC Player Scale", 1, INTELLECT, 0, WOCTARGET))
    PROJECTILE
    RENDERSTYLE ADD
    +Ripper
	+BLOODLESSIMPACT
	+THRUGHOST
	+WINDTHRUST
	+PAINLESS
	Damagetype Ice
    States
    {
    Spawn:
    	ZKEX ABCDEFGHIJK 2 Bright
        stop
    }
}