Actor Mage : PlayerPawn
{
	Mass 700
	Player.ColorRange 112, 127
	Player.DisplayName "Mage"
	Player.SoundClass "Mage"
	Player.ForwardMove 1.1
	Player.SideMove 1.0
	scale 0.9
	Player.StartItem "IceWand", 1
	Player.StartItem "MageAmmo1", 50
	Player.StartItem "MageAmmo2", 5
	Player.StartItem "IceHands", 1
	Player.StartItem "BlizzardWand", 1
	Player.StartItem "MageAmmo3", 5
	Player.StartItem "MageAmmo4", 5
	Player.StartItem "MageAmmo5", 100
	Player.StartItem "IsHuman", 1
	Player.StartItem "Screamer", 0
	Player.ScoreIcon "MAGEST"
	DamageFactor "Fire2", 0.7
	DamageFactor "Grenade", 0.3
	DamageFactor "Ice2", 0.7
	DamageFactor "AltIce2", 0.7
	DamageFactor "GhostTrap", 0.0
	Damagefactor "normal", 1.0
	DamageFactor "AmperLightning", 0.8
	Damagefactor "Sentinel", 0.0
	Damagefactor "MechPewPews", 0.0
	Damagefactor "MacheteSlicerino", 0.0
    Damagefactor "GasterSmokeHurt", 0.0
	Damagefactor "StrifeSuit", 0.0
	Player.Maxhealth 100
	PainChance 192
	PainChance "CreepStun", 256
	PainChance "RavagerBall", 256
	LimitedToTeam 0
	+NOICEDEATH
	+NODAMAGETHRUST
	+QUICKTORETALIATE
	+GHOST
	+NOSKIN
	States
	{
	Spawn:
		TNT1 A 0 ACS_NamedExecute("PlayerSpawn")
		MAGE A 0 A_JumpIfInventory("GloomWatchStack",100,"GloomDeath")
		MAGE A 1 Setplayerproperty(0,0,0)
		Loop
	See:
		MAGE A 0 A_JumpIfInventory("GloomWatchStack",100,"GloomDeath")
		MAGE A 0 A_JumpIfHealthLower(50,"INeedHealingSee")
		MAGE ABCD 4
		Goto Spawn
	INeedHealingSee:
		MAGE A 0 A_JumpIfInventory("GloomWatchStack",100,"GloomDeath")
		MAGE A 0 A_SpawnItemEx("INeedHealingTrail",random(-20,20),random(-20,20),0,0,0,10)
		MAGE ABCD 4
		Goto Spawn
	Pain.TeleOtherPlant:
	TNT1 A 0 A_GiveInventory("TeleOtherPlanted",1)
	Goto Pain
	Pain.TeleOtherActivateDamage:
	TNT1 A 0 A_JumpIfInventory("TeleOtherPlanted",1,"TeleOtherSend")
	Goto Pain	
	TeleOtherSend:
	TNT1 A 0 A_TakeInventory("TeleOtherPlanted",1)
	TNT1 A 0 A_PlaySound("TeleOther/activate",CHAN_7,1)
	TNT1 A 0 A_SpawnItem("TeleOtherFog")
	TNT1 A 0 ACS_ExecuteAlways(466,0,2)
	MAGE G 1 A_PlaySound("TeleOther/activate",CHAN_6,1)
	TNT1 A 0 A_SpawnItem("TeleOtherFog")
	Goto Pain
	Death.TeleOtherActivateDamage:
	TNT1 A 0 A_JumpIfInventory("TeleOtherPlanted",1,"TeleOtherSplode")
	TNT1 A 0 A_TakeInventory("TeleOtherPlanted",1)
	TNT1 A 0 A_PlaySound("TeleOther/activate",CHAN_7,1)
	TNT1 A 0 A_SpawnItem("TeleOtherFog")
	TNT1 A 0 A_GiveToTarget("KilledMe",1)
	MAGE G 1 A_PlaySound("Gibbage/XSplat")
	NULL A 0 A_SpawnItemEx("Custom_MageBloodySkull", 0, 0, 48, 0.5, 0, 10, random(0,360), SXF_ABSOLUTEVELOCITY)
	NULL A 0 A_PlaySound("gibbage/playergib") 
	NULL A 0 A_NoBlocking 
	NULL A 0 A_SpawnItemEx("PLAYERBOOT", 0, 0, 11, 0, 0, 27, 33, 160, 0)
	NULL A 0 A_SpawnItemEx("PLAYERBOOT", 0, 0, 11, 0, 0, 27, -33, 160, 0)
	NULL A 0 A_SpawnItemEx("SHOTGUYARM", 0, 0, 25, 0, 0, 50, random(0,360), 160, 0)
	NULL A 0 A_SpawnItemEx("SHOTGUYARM", 0, 0, 36, 0, 0, 32, random(0,360), 160, 0)
	NULL A 1 A_SpawnItemEx("GIBBER", 0, 0, 0, 0, 0, 0, 0, 160, 0)
	NULL A -1
	Stop
	TeleOtherSplode:
	TNT1 A 0 A_TakeInventory("TeleOtherPlanted",1)
	TNT1 A 0 A_PlaySound("TeleOther/activate",CHAN_7,1)
	TNT1 A 0 A_SpawnItem("TeleOtherFog")
	TNT1 A 0 ACS_ExecuteAlways(466,0,2)
	TNT1 A 0 A_GiveToTarget("KilledMe",1)
	MAGE G 1 A_PlaySound("Gibbage/XSplat")
	TNT1 A 0 A_PlaySound("TeleOther/activate",CHAN_6,1)
	TNT1 A 0 A_SpawnItem("TeleOtherFog")
	NULL A 0 A_SpawnItemEx("Custom_MageBloodySkull", 0, 0, 48, 0.5, 0, 10, random(0,360), SXF_ABSOLUTEVELOCITY)
	NULL A 0 A_PlaySound("gibbage/playergib") 
	NULL A 0 A_NoBlocking 
	NULL A 0 A_SpawnItemEx("PLAYERBOOT", 0, 0, 11, 0, 0, 27, 33, 160, 0)
	NULL A 0 A_SpawnItemEx("PLAYERBOOT", 0, 0, 11, 0, 0, 27, -33, 160, 0)
	NULL A 0 A_SpawnItemEx("SHOTGUYARM", 0, 0, 25, 0, 0, 50, random(0,360), 160, 0)
	NULL A 0 A_SpawnItemEx("SHOTGUYARM", 0, 0, 36, 0, 0, 32, random(0,360), 160, 0)
	NULL A 1 A_SpawnItemEx("GIBBER", 0, 0, 0, 0, 0, 0, 0, 160, 0)
	NULL A -1
	Stop
	Pain.Choke:
		TNT1 A 0 A_GiveToTarget("Health",2)
		TNT1 A 0 A_GiveToTarget("ChokeCharging",1)
		Goto Pain
	Pain.JusticarSpike:
		TNT1 A 0 ACS_NamedExecuteAlways("ChangeActivator",0)
		TNT1 A 0 A_GiveToTarget("Health",2)
	Pain:
		MAGE A 0 A_JumpIfInventory("GloomWatchStack",100,"GloomDeath")
		MAGE G 0 A_JumpIfHealthLower(56,"PainGive")
		MAGE G 0 A_CustomMissile("MageIceFallSpawner", random(-200,200), random(-200,200), 9999)
		MAGE G 0 A_CustomMissile("MageIceFallSpawner", random(-200,200), random(-200,200), 9999)
		MAGE G 0 A_CustomMissile("MageIceFallSpawner", random(-200,200), random(-200,200), 9999)
		MAGE G 0 A_CustomMissile("MageIceFallSpawner", random(-200,200), random(-200,200), 9999)
		MAGE G 4
		MAGE G 4 A_Pain
		Goto Spawn
	Pain.GloomWatcherLure:
	TNT1 A 0 ACS_ExecuteAlways(134)
	TNT1 A 0 A_Playsound("GloomWatcher/FeintAttack",CHAN_7)
	Goto pain
	Death.GloomWatcherlure:
	TNT1 A 0 ACS_ExecuteAlways(134)
	TNT1 A 0 A_Playsound("GloomWatcher/FeintAttack",CHAN_7)
	Goto Death.Jitter
	GloomDeath:
	TNT1 A 1 Damagething(99999,18)
	Goto Death
	Death.Fleshbent:
	TNT1 A 0 A_GiveToTarget("TentacleAmmo",2)
	TNT1 A 0 A_GiveToTarget("Soulscepter1",15)
	TNT1 A 0 A_GiveToTarget("Soulscepter2",50)
	Goto Death.Jitter
	Pain.LoonaClawing:
	TNT1 A 0 A_GiveToTarget("Health",6)
	MAGE G 20 Setplayerproperty(0,1,0)
	MAGE G 2 Setplayerproperty(0,0,0)
	Goto Spawn
	Pain.LoonaClawingLightSFX:
	TNT1 A 0 A_PlaySound("Bastet/ClawHitLight",CHAN_6)
	TNT1 A 0 A_GiveToTarget("Health",5)
	MAGE G 20 Setplayerproperty(0,1,0)
	MAGE G 2 Setplayerproperty(0,0,0)
	Goto Spawn
	Pain.LoonaClawingHeavySFX:
	TNT1 A 0 A_PlaySound("Bastet/ClawHitHeavy",CHAN_6)
	TNT1 A 0 A_GiveToTarget("Health",8)
	MAGE G 20 Setplayerproperty(0,1,0)
	MAGE G 2 Setplayerproperty(0,0,0)
	Goto Spawn
	Death.LoonaClawing:
	TNT1 A 0 A_PlaySound("Bastet/ClawHitHeavy",CHAN_6)
	TNT1 A 0 A_GiveToTarget("Health",50)
	Goto Death.Jitter
	Death.LoonaClawingLightSFX:
	TNT1 A 0 A_PlaySound("Bastet/ClawHitLight",CHAN_6)
	TNT1 A 0 A_GiveToTarget("Health",50)
	Goto Death.Jitter
	Death.LoonaClawingHeavySFX:
	TNT1 A 0 A_PlaySound("Bastet/ClawHitHeavy",CHAN_6)
	TNT1 A 0 A_GiveToTarget("Health",50)
	Goto Death.Jitter
	Pain.BastetClawing:
		TNT1 A 0 A_GiveToTarget("Health",4)
		Goto Pain
	Pain.BastetClawingLightSFX:
		TNT1 A 0 A_PlaySound("Bastet/ClawHitLight",CHAN_5)
		TNT1 A 0 A_GiveToTarget("Health",3)
		Goto Pain
	Pain.BastetClawingHeavySFX:
		TNT1 A 0 A_PlaySound("Bastet/ClawHitHeavy",CHAN_5)
		TNT1 A 0 A_GiveToTarget("Health",6)
		Goto Pain
	Pain.Sickle:
		TNT1 A 0 ACS_NamedExecuteAlways("ChangeActivator",0)
	Pain.Wendigo:
		TNT1 A 0 A_PlaySound("RAVEN1",CHAN_5)
		TNT1 A 0 A_SpawnItemEx ("GIB4", 0, 0, random(0,42), 0, 0, random(2,4), random(0,360), 128)
		TNT1 A 0 A_SpawnItemEx ("GIB4", 0, 0, random(0,42), 0, 0, random(2,4), random(0,360), 128)
		Goto Pain
	Pain.CreepStun:
		MAGE G 0 A_JumpIfHealthLower(56,"PainGive.CreepStun")
        MAGE G 0 A_Pain
		MAGE G 0 A_CustomMissile("MageIceFallSpawner", random(-200,200), random(-200,200), 9999)
		MAGE G 0 A_CustomMissile("MageIceFallSpawner", random(-200,200), random(-200,200), 9999)
		MAGE G 0 A_CustomMissile("MageIceFallSpawner", random(-200,200), random(-200,200), 9999)
		MAGE G 0 A_CustomMissile("MageIceFallSpawner", random(-200,200), random(-200,200), 9999)
		MAGE G 0 A_GiveToTarget("health",5)
	    MAGE G 40 Setplayerproperty(0,1,0)
	    MAGE G 2 Setplayerproperty(0,0,0)
		Goto Spawn
		Pain.Justicar:
	TNT1 A 0 A_custommissile("Justicarattack",14,0,random(0,360))
	TNT1 A 0 A_GiveToTarget("Health",1)
	TNT1 A 0 A_GiveToTarget("JusticarSecondaryAmmo",1)
	Goto pain
	PainGive:
		MAGE G 0 A_JumpIfInventory("GloomWatchStack",100,"GloomDeath")
		MAGE G 0 ACS_ExecuteAlways(987,0)
		MAGE G 0 A_CustomMissile("MageIceFallSpawner", random(-200,200), random(-200,200), 9999)
		MAGE G 0 A_CustomMissile("MageIceFallSpawner", random(-200,200), random(-200,200), 9999)
		MAGE G 0 A_CustomMissile("MageIceFallSpawner", random(-200,200), random(-200,200), 9999)
		MAGE G 0 A_CustomMissile("MageIceFallSpawner", random(-200,200), random(-200,200), 9999)
		MAGE G 4
		MAGE G 4 A_Pain
		Goto Spawn
	PainGive.CreepStun:
		MAGE A 0 A_JumpIfInventory("GloomWatchStack",100,"GloomDeath")
		MAGE G 0 ACS_ExecuteAlways(987,0)
		MAGE G 0 A_CustomMissile("MageIceFallSpawner", random(-200,200), random(-200,200), 9999)
		MAGE G 0 A_CustomMissile("MageIceFallSpawner", random(-200,200), random(-200,200), 9999)
		MAGE G 0 A_CustomMissile("MageIceFallSpawner", random(-200,200), random(-200,200), 9999)
		MAGE G 0 A_CustomMissile("MageIceFallSpawner", random(-200,200), random(-200,200), 9999)
		MAGE G 0 A_Pain
		MAGE G 18 ACS_ExecuteAlways(986,0)
		Goto Spawn
	Missile:
		MAGE E 0 A_JumpIfInventory("GloomWatchStack",100,"GloomDeath")
		MAGE E 8
		MAGE F 8 bright
		Goto Spawn
	Death:
	DeathAnim:
		MAGE A 0 A_GiveToTarget("KillBeep",1)
		MAGE A 0 A_GiveInventory("ItemDeath",1)
		MAGE A 0 A_TakeInventory("KilledCount",999)
		MAGE A 0 A_GiveToTarget("KilledMe",1)
		MAGE A 0 A_GiveToTarget("KilledMage",1)
		MAGE H 6
		MAGE I 6 A_PlayerScream
		MAGE JK 6
		MAGE L 6 A_NoBlocking
		MAGE M 6
		MAGE N -1
		Stop
	DeathAnimAlt:
		MAGE A 0 A_GiveToTarget("KillIndicator",1)
		MAGE A 0 A_GiveInventory("ItemDeath",1)
		MAGE A 0 A_TakeInventory("KilledCount",999)
		MAGE A 0 A_GiveToTarget("KilledMe",1)
		MAGE A 0 A_GiveToTarget("KilledMage",1)
		MAGE H 6
		MAGE I 6 A_PlayerScream
		MAGE JK 6
		MAGE L 6 A_NoBlocking
		MAGE M 6
		MAGE N -1
		Stop
	Death.GhoulChainSaw:
	TNT1 A 0 A_GiveToTarget("Health",50)
	TNT1 A 0 A_GiveToTarget("BearTarpsAmmo",1)
	TNT1 A 0 A_GiveToTarget("SawyerRageammo",10)
	TNT1 A 0 A_GiveToTarget("DUMMY_SawyerBloodyChainsaw", 1)
	Goto Death.Jitter
	Death.SjasScream:
	Death.FrostbiteWind:
	Death.EmtalicSaw:
	Death.LichFire:
		MAGE A 0 A_GiveToTarget("KilledJ",1)
  		Goto DeathAnim
	Death.Creeper:
		MAGE A 0 A_PlaySoundEx("CreeperAttack","Body")
		MAGE A 0 A_SpawnItemEx("CreeperPopUp",0,0,10)
		TNT1 A 0 A_GiveToTarget("GhoulAmmo",1)
		MAGE A 0 A_GiveToTarget("CreeperHeal",1)
		MAGE A 0 ACS_ExecuteAlways(997,0,1)
		Goto DeathAnimAlt
	Death.CreepStun:
		MAGE A 0 A_GiveToTarget("Unlock13",1)
		MAGE A 0 A_GiveToTarget("CreepGotya",1)
		Goto DeathAnimAlt
	Death.BastetClawing:
	TNT1 A 0 A_PlaySound("Bastet/ClawHitHeavy",CHAN_6)
	TNT1 A 0 A_GiveToTarget("Health",30)
	Goto Death.Jitter
	Death.BastetClawingLightSFX:
	TNT1 A 0 A_PlaySound("Bastet/ClawHitLight",CHAN_6)
	TNT1 A 0 A_GiveToTarget("Health",30)
	Goto Death.Jitter
	Death.BastetClawingHeavySFX:
	TNT1 A 0 A_PlaySound("Bastet/ClawHitHeavy",CHAN_6)
	TNT1 A 0 A_GiveToTarget("Health",30)
	Goto Death.Jitter
	Death.Choke:
		TNT1 A 0 A_GiveToTarget("Health",25)
		TNT1 A 0 A_GiveToTarget("ChokeCharging",40)
	Goto Death.Jitter
	Death.JusticarSpike:
		TNT1 A 0 A_GiveToTarget("Health",15)
	Goto Death.Jitter
	Death.Sinistar:
		TNT1 A 0 A_GiveToTarget("SiniPrimary",1)
	Goto Death.Jitter
	Death.MapGibber:
		TNT1 A 0 A_PlaySound("car/hit",chan_auto)
	Death.MapGibber2:
	Death.Jitter:
		MAGE A 0 A_GiveToTarget("KillBeep",1)
		MAGE A 0 A_GiveInventory("ItemDeath",1)
		MAGE A 0 A_GiveToTarget("KilledMe",1)
		MAGE A 0 A_GiveToTarget("KilledMage",1)
		MAGE A 0 A_GiveToTarget("Crunched",1)
		MAGE G 1 A_PlaySound("Gibbage/XSplat")
		NULL A 0 A_SpawnItemEx("Custom_MageBloodySkull", 0, 0, 48, 0.5, 0, 10, random(0,360), SXF_ABSOLUTEVELOCITY)
		NULL A 0 A_PlaySound("Gibbage/PlayerGib") 
		NULL A 0 A_NoBlocking 
		NULL A 0 A_SpawnItemEx("PLAYERBOOT", 0, 0, 11, 0, 0, 27, 33, 160, 0)
		NULL A 0 A_SpawnItemEx("PLAYERBOOT", 0, 0, 11, 0, 0, 27, -33, 160, 0)
		NULL A 0 A_SpawnItemEx("SHOTGUYARM", 0, 0, 25, 0, 0, 50, random(0,360), 160, 0)
		NULL A 0 A_SpawnItemEx("SHOTGUYARM", 0, 0, 36, 0, 0, 32, random(0,360), 160, 0)
		NULL A 1 A_SpawnItemEx("GIBBER", 0, 0, 0, 0, 0, 0, 0, 160, 0)
		NULL A -1
		Stop
	Death.JitterAlt:
		MAGE A 0 A_GiveToTarget("KillIndicator",1)
		MAGE A 0 A_GiveInventory("ItemDeath",1)
		MAGE A 0 A_GiveToTarget("KilledMe",1)
		MAGE A 0 A_GiveToTarget("KilledMage",1)
		MAGE A 0 A_GiveToTarget("Crunched",1)
		MAGE G 1 A_PlaySound("Gibbage/XSplat")
		NULL A 0 A_SpawnItemEx("Custom_MageBloodySkull", 0, 0, 48, 0.5, 0, 10, random(0,360), SXF_ABSOLUTEVELOCITY)
		NULL A 0 A_PlaySound("Gibbage/PlayerGib") 
		NULL A 0 A_NoBlocking 
		NULL A 0 A_SpawnItemEx("PLAYERBOOT", 0, 0, 11, 0, 0, 27, 33, 160, 0)
		NULL A 0 A_SpawnItemEx("PLAYERBOOT", 0, 0, 11, 0, 0, 27, -33, 160, 0)
		NULL A 0 A_SpawnItemEx("SHOTGUYARM", 0, 0, 25, 0, 0, 50, random(0,360), 160, 0)
		NULL A 0 A_SpawnItemEx("SHOTGUYARM", 0, 0, 36, 0, 0, 32, random(0,360), 160, 0)
		NULL A 1 A_SpawnItemEx("GIBBER", 0, 0, 0, 0, 0, 0, 0, 160, 0)
		NULL A -1
		Stop
	Death.Harvester:
		TNT1 A 0 A_GiveToTarget("SoulHarvesterFragment",1)
		TNT1 A 0 A_GiveToTarget("KilledJ",1)
		Goto Death.Jitter
	Death.HarvesterRock:
		TNT1 A 0 ACS_NamedExecute("SilverFieldsBell",55)
		Goto DeathAnim
	Death.HarvesterAlt:
		TNT1 A 0 A_GiveToTarget("Crunched2",1)
		TNT1 A 0 ACS_NamedExecute("SilverFieldsBell",55)
		Goto Death.Jitter
	Death.Ravager:
		MAGE A 0 A_GiveToTarget("KilledR",1)
		MAGE A 0 A_GiveToTarget("Health",100)
		MAGE A 0 ACS_ExecuteAlways(997,0,2)
		MAGE A 0 A_PlaySoundEx("RavagerAttack","Body")
		MAGE A 0 A_SpawnItemEx("RavagerHit",0,0,32)
		Goto DeathAnimAlt
	Death.RavagerBall:
		MAGE A 0 A_GiveToTarget("RavagerGotYa",1)
		MAGE A 0 A_GiveToTarget("KilledJ",1)
		Goto DeathAnimAlt
	Death.Yurei:
		MAGE A 0 A_GiveToTarget("KilledY",1)
		MAGE A 0 A_PlaySoundEx("YureiKill1","Body",0,1)
		MAGE A 0 ACS_ExecuteAlways(997,0,3)
		Goto DeathAnimAlt
	Death.YureiBall:
		MAGE A 0 A_GiveToTarget("Health",10)
		MAGE A 0 A_SpawnItemEx("BallFire")
		Goto Death.SjasScream
	Death.UboaRawrScream:
		Goto DeathAnimAlt
	Death.Misty:
	Death.Whiteface:
		MAGE A 0 A_GiveToTarget("KillBeep",1)
		MAGE A 0 A_GiveInventory("ItemDeath",1)
		MAGE A 0 A_GiveToTarget("KilledMe",1)
		MAGE A 0 A_GiveToTarget("KilledM",1)
		MAGE HHHHHH 1 A_FadeOut(0.05)
		MAGE A 0 A_PlayerScream
		MAGE IIIIIIJJJJJJKK 1 A_FadeOut(0.05)
		MAGE A 0 A_NoBlocking
		NULL A -1
		Stop
	Death.Clowny:
		MAGE A 0 ACS_ExecuteAlways(997,0,4)
		MAGE A 0 A_GiveToTarget("KilledC",1)
		MAGE A 0 A_GiveToTarget("ClownyAmmo",5)
		Goto DeathAnim
	Death.Mohoph:
		MAGE A 0 A_GiveToTarget("TransMage",1)
		TNT1 A 0 A_GiveToTarget("MorphAmmo", 1)
		MAGE A 0 A_PlaySoundEx("MohophKill","Body")
		MAGE A 0 ACS_ExecuteAlways(997,0,5)
		Goto DeathAnim
	Death.EmtalicWeak:
		MAGE A 0 A_PlaySoundEx("RamSuccess","Body")
		Goto DeathAnim
	Death.Emtalic:
		MAGE A 0  A_PlaySoundEx("RamSuccess","Body")
		Goto Death.Jitter
	Death.I1:
		MAGE A 0 A_SpawnItemEx("Heart",0,0,32,random(2,3),momy,random(8,12),random(-180,180))
		MAGE A 0 A_GiveToTarget("KilledI1",1)
		Goto DeathAnim
	Death.I2:
		MAGE A 0 A_GiveToTarget("KillBeep",1)
		MAGE A 0 A_GiveInventory("ItemDeath",1)
		MAGE A 0 A_GiveToTarget("KilledMe",1)
		MAGE A 0 A_GiveToTarget("KilledI2",1)
		MAGE A 0 A_GiveToTarget("Clip",1)
		MAGE G 0 SetPlayerProperty(0,1,4)
		MAGE G 0 A_Stop
		MAGE GGGGGGGGGGGGGG 5 A_SpawnItemEx("PainSmoke",0,random(-22,22),random(-22,22),random(2,4),momy,random(8,12),random(-180,180))
		NULL A 0 A_PlayerScream
		NULL A 0 ACS_ExecuteAlways(997,0,6)
		NULL A 0 A_SpawnItemEx("PLAYERBOOT", 0, 0, 11, 0, 0, 27, 33, 160, 0)
		NULL A 0 A_SpawnItemEx("PLAYERBOOT", 0, 0, 11, 0, 0, 27, -33, 160, 0)
		NULL A 0 A_SpawnItemEx("SHOTGUYARM", 0, 0, 25, 0, 0, 50, random(0,360), 160, 0)
		NULL A 0 A_SpawnItemEx("SHOTGUYARM", 0, 0, 36, 0, 0, 32, random(0,360), 160, 0)
        NULL A 0 A_SpawnItemEx ("BoneShardSpawner1", 1, 1, random(8,32), random(0,5), random(0,5), random(8,18), random(0,360), SXF_NOCHECKPOSITION, 0)
        NULL A 0 A_SpawnItemEx ("BoneShardSpawner2", 1, 1, random(8,32), random(0,5), random(0,5), random(8,18), random(0,360), SXF_NOCHECKPOSITION, 0)
        NULL A 0 A_SpawnItemEx ("BoneShardSpawner3", 1, 1, random(8,32), random(0,5), random(0,5), random(8,18), random(0,360), SXF_NOCHECKPOSITION, 0)
        NULL A 0 A_SpawnItemEx ("BoneShardSpawner1", 1, 1, random(8,32), random(0,5), random(0,5), random(8,18), random(0,360), SXF_NOCHECKPOSITION, 0)
        NULL A 0 A_SpawnItemEx ("BoneShardSpawner2", 1, 1, random(8,32), random(0,5), random(0,5), random(8,18), random(0,360), SXF_NOCHECKPOSITION, 0)
        NULL A 0 A_SpawnItemEx ("BoneShardSpawner3", 1, 1, random(8,32), random(0,5), random(0,5), random(8,18), random(0,360), SXF_NOCHECKPOSITION, 0)
        NULL A 0 A_SpawnItemEx ("BoneShardSpawner1", 1, 1, random(8,32), random(0,5), random(0,5), random(8,18), random(0,360), SXF_NOCHECKPOSITION, 0)
        NULL A 0 A_SpawnItemEx ("BoneShardSpawner2", 1, 1, random(8,32), random(0,5), random(0,5), random(8,18), random(0,360), SXF_NOCHECKPOSITION, 0)
        NULL A 0 A_SpawnItemEx ("BoneShardSpawner3", 1, 1, random(8,32), random(0,5), random(0,5), random(8,18), random(0,360), SXF_NOCHECKPOSITION, 0)
        NULL A 0 A_SpawnItemEx ("BoneShardSpawner1", 1, 1, random(8,32), random(0,5), random(0,5), random(8,18), random(0,360), SXF_NOCHECKPOSITION, 0)
        NULL A 0 A_SpawnItemEx ("BoneShardSpawner2", 1, 1, random(8,32), random(0,5), random(0,5), random(8,18), random(0,360), SXF_NOCHECKPOSITION, 0)
        NULL A 0 A_SpawnItemEx ("BoneShardSpawner3", 1, 1, random(8,32), random(0,5), random(0,5), random(8,18), random(0,360), SXF_NOCHECKPOSITION, 0)
        NULL A 0 A_SpawnItemEx ("BoneShardSpawner1", 1, 1, random(8,32), random(0,5), random(0,5), random(8,18), random(0,360), SXF_NOCHECKPOSITION, 0)
        NULL A 0 A_SpawnItemEx ("BoneShardSpawner2", 1, 1, random(8,32), random(0,5), random(0,5), random(8,18), random(0,360), SXF_NOCHECKPOSITION, 0)
        NULL A 0 A_SpawnItemEx ("BoneShardSpawner3", 1, 1, random(8,32), random(0,5), random(0,5), random(8,18), random(0,360), SXF_NOCHECKPOSITION, 0)
        NULL A 0 A_SpawnItemEx ("BoneShardSpawner1", 1, 1, random(8,32), random(0,5), random(0,5), random(8,18), random(0,360), SXF_NOCHECKPOSITION, 0)
        NULL A 0 A_SpawnItemEx ("BoneShardSpawner2", 1, 1, random(8,32), random(0,5), random(0,5), random(8,18), random(0,360), SXF_NOCHECKPOSITION, 0)
        NULL A 0 A_SpawnItemEx ("BoneShardSpawner3", 1, 1, random(8,32), random(0,5), random(0,5), random(8,18), random(0,360), SXF_NOCHECKPOSITION, 0)
        NULL A 0 A_SpawnItemEx ("BoneShardSpawner1", 1, 1, random(8,32), random(0,5), random(0,5), random(8,18), random(0,360), SXF_NOCHECKPOSITION, 0)
        NULL A 0 A_SpawnItemEx ("BoneShardSpawner2", 1, 1, random(8,32), random(0,5), random(0,5), random(8,18), random(0,360), SXF_NOCHECKPOSITION, 0)
        NULL A 0 A_SpawnItemEx ("BoneShardSpawner3", 1, 1, random(8,32), random(0,5), random(0,5), random(8,18), random(0,360), SXF_NOCHECKPOSITION, 0)
        NULL A 0 A_SpawnItemEx ("BoneShardSpawner1", 1, 1, random(8,32), random(0,5), random(0,5), random(8,18), random(0,360), SXF_NOCHECKPOSITION, 0)
        NULL A 0 A_SpawnItemEx ("BoneShardSpawner2", 1, 1, random(8,32), random(0,5), random(0,5), random(8,18), random(0,360), SXF_NOCHECKPOSITION, 0)
        NULL A 0 A_SpawnItemEx ("BoneShardSpawner3", 1, 1, random(8,32), random(0,5), random(0,5), random(8,18), random(0,360), SXF_NOCHECKPOSITION, 0)
        NULL A 0 A_SpawnItemEx ("BoneShardSpawner1", 1, 1, random(8,32), random(0,5), random(0,5), random(8,18), random(0,360), SXF_NOCHECKPOSITION, 0)
        NULL A 0 A_SpawnItemEx ("BoneShardSpawner2", 1, 1, random(8,32), random(0,5), random(0,5), random(8,18), random(0,360), SXF_NOCHECKPOSITION, 0)
        NULL A 0 A_SpawnItemEx ("BoneShardSpawner3", 1, 1, random(8,32), random(0,5), random(0,5), random(8,18), random(0,360), SXF_NOCHECKPOSITION, 0)
        NULL A 0 A_SpawnItemEx ("BoneShardSpawner1", 1, 1, random(8,32), random(0,5), random(0,5), random(8,18), random(0,360), SXF_NOCHECKPOSITION, 0)
        NULL A 0 A_SpawnItemEx ("BoneShardSpawner2", 1, 1, random(8,32), random(0,5), random(0,5), random(8,18), random(0,360), SXF_NOCHECKPOSITION, 0)
        NULL A 0 A_SpawnItemEx ("BoneShardSpawner3", 1, 1, random(8,32), random(0,5), random(0,5), random(8,18), random(0,360), SXF_NOCHECKPOSITION, 0)
        NULL A 0 A_SpawnItemEx ("BoneShardSpawner1", 1, 1, random(8,32), random(0,5), random(0,5), random(8,18), random(0,360), SXF_NOCHECKPOSITION, 0)
        NULL A 0 A_SpawnItemEx ("BoneShardSpawner2", 1, 1, random(8,32), random(0,5), random(0,5), random(8,18), random(0,360), SXF_NOCHECKPOSITION, 0)
        NULL A 0 A_SpawnItemEx ("BoneShardSpawner3", 1, 1, random(8,32), random(0,5), random(0,5), random(8,18), random(0,360), SXF_NOCHECKPOSITION, 0)
        NULL A 0 A_SpawnItemEx ("BoneShardSpawner1", 1, 1, random(8,32), random(0,5), random(0,5), random(8,18), random(0,360), SXF_NOCHECKPOSITION, 0)
        NULL A 0 A_SpawnItemEx ("BoneShardSpawner2", 1, 1, random(8,32), random(0,5), random(0,5), random(8,18), random(0,360), SXF_NOCHECKPOSITION, 0)
        NULL A 0 A_SpawnItemEx ("BoneShardSpawner3", 1, 1, random(8,32), random(0,5), random(0,5), random(8,18), random(0,360), SXF_NOCHECKPOSITION, 0)
        NULL A 0 A_SpawnItemEx ("BoneShardSpawner1", 1, 1, random(8,32), random(0,5), random(0,5), random(8,18), random(0,360), SXF_NOCHECKPOSITION, 0)
        NULL A 0 A_SpawnItemEx ("BoneShardSpawner2", 1, 1, random(8,32), random(0,5), random(0,5), random(8,18), random(0,360), SXF_NOCHECKPOSITION, 0)
        NULL A 0 A_SpawnItemEx ("BoneShardSpawner3", 1, 1, random(8,32), random(0,5), random(0,5), random(8,18), random(0,360), SXF_NOCHECKPOSITION, 0)
        NULL A 0 A_SpawnItemEx ("BoneShardSpawner1", 1, 1, random(8,32), random(0,5), random(0,5), random(8,18), random(0,360), SXF_NOCHECKPOSITION, 0)
        NULL A 0 A_SpawnItemEx ("BoneShardSpawner2", 1, 1, random(8,32), random(0,5), random(0,5), random(8,18), random(0,360), SXF_NOCHECKPOSITION, 0)
        NULL A 0 A_SpawnItemEx ("BoneShardSpawner3", 1, 1, random(8,32), random(0,5), random(0,5), random(8,18), random(0,360), SXF_NOCHECKPOSITION, 0)
		NULL A 1 A_SpawnItemEx("GIBBER", 0, 0, 0, 0, 0, 0, 0, 160, 0)
		NULL A 1 A_SpawnItemEx("SkullGib",0,0,0,random(2,4),random(2,4),random(8,12),random(-180,180))
		NULL A 1 A_SpawnItemEx("ChestGib",0,0,0,random(2,4),random(2,4),random(8,12),random(-180,180))
		NULL AA 1 A_SpawnItemEx("ArmGib",0,0,0,random(2,4),random(2,4),random(8,12),random(-180,180))
		NULL AA 1 A_SpawnItemEx("HandGib",0,0,0,random(2,4),random(2,4),random(8,12),random(-180,180))
		NULL A 1 A_SpawnItemEx("CoccyxGib",0,0,0,random(2,4),random(2,4),random(8,12),random(-180,180))
		NULL AA 1 A_SpawnItemEx("LegGib",0,0,0,random(2,4),random(2,4),random(8,12),random(-180,180))
		NULL AAAAAA 1 A_SpawnItemEx("BoneGib",0,0,0,random(2,4),random(2,4),random(8,12),random(-180,180))
		NULL A -1 A_NoBlocking
		Stop
	Death.I3:
		MAGE A 0 A_GiveToTarget("KillBeep",1)
		MAGE A 0 A_GiveInventory("ItemDeath",1)
		MAGE A 0 A_GiveToTarget("KilledMe",1)
		MAGE A 0 A_GiveToTarget("KilledI3",1)
		MAGE HHHHHH 1 A_SpawnItemEx("PainSmoke",0,random(-22,22),random(-22,22),random(2,4),momy,random(8,12),random(-180,180))
		MAGE I 0 A_PlayerScream
		MAGE IIIIII 1 A_SpawnItemEx("PainSmoke",0,random(-22,22),random(-22,22),random(2,4),momy,random(8,12),random(-180,180))
		MAGE J 0 A_NoBlocking
		MAGE JJJJJJKKKKKKLLLLLLMMMMMM 1 A_SpawnItemEx("PainSmoke",0,random(-22,22),random(-22,22),random(2,4),momy,random(8,12),random(-180,180))
		MAGE NNNNNNN 3 A_SpawnItemEx("PainSmoke",0,random(-22,22),random(-22,22),random(2,4),momy,random(8,12),random(-180,180))
		MAGE N -1
		Stop
	Death.I4:
		MAGE A 0 A_GiveToTarget("KilledI4",1)
		Goto DeathAnim
	Death.I5:
		MAGE A 0 A_GiveToTarget("KilledI5",1)
		Goto DeathAnim
	Pain.RavagerBall:
		MAGE A 0 ACS_ExecuteAlways(920,0)
		Goto Pain
	Pain.YureiBall:
		MAGE A 0 A_GiveToTarget("Health",10)
		MAGE A 0 A_SpawnItemEx("BallFire")
		Goto Pain
	Pain.Emtalic:
		MAGE A 0 A_PlaySoundEx("RamSuccess","Body")
		Goto Pain
	Pain.EmtalicWeak:
		MAGE A 0 A_PlaySoundEx("RamSuccess","Body")
		Goto Pain
	Death.Tenebra:
		TNT1 A 0 A_GiveToTarget("Health",20)
		Goto DeathAnim
	Death.TenebraRail:
	Death.Telefrag:
	Death.Grenade:
	Death.Termissiles:
	Death.ChaosExpl12:
	Death.KarenExplo:
	Death.IlluNukeKABUUM:
	Death.CalebDynamite:
	Death.Wendigo:
	Death.MorphRipperGib:
	Death.DarkVortex:
	Death.ImpostorJitter:
	Death.PuppetStrings:
	Death.LichIce:
	Death.LichLightning:
	Death.AsylumCannonBall:
		Goto Death.Jitter
	Death.TrueDivine:
		TNT1 A 0 A_PlaySoundEx("SoulSnatchStinger",CHAN_AUTO,0,1)
		TNT1 A 0 A_SpawnItemEx("SoulSnatch")
		Goto Death.JitterAlt
	Death.Judgement:
		TNT1 A 0 A_SpawnItemEx("StellarisThunderFX")
		Goto Death.JitterAlt
	Death.VoltMelee:
	Death.AmperRail:
		TNT1 A 0 A_GiveToTarget("VoltRingAmmo",2)
		TNT1 A 0 A_GiveToTarget("AmperSpeedTokenCheck",1)
		Goto Death.Jitter
	Pain.FrostbiteWind:
	Pain.Ravager:
	Pain.Juglava:
	Pain.HarvesterRock:
	Pain.EmtalicSaw:
	Pain.MorphRipper:
	Pain.MorphRipperGib:
	Pain.I1:
	Pain.I3:
	Pain.ZombiePoison:
	Pain.Asylum:
	Pain.AsylumCannonBall:
	Pain.FleshlingMissile:
	Pain.DarkVortex:
	Pain.ImpostorJitter:
	Pain.BlueFire:
	Pain.PuppetStrings:
	Pain.LichFire:
	Pain.LichIce:
	Pain.LichLightning:
	Pain.Whiteface:
		TNT1 A 0 ACS_NamedExecuteAlways("ChangeActivator",0)
		Goto Pain
	}
}

Actor MageAmmo1 : Ammo
{
	Inventory.Icon "ISHTB0"
	Inventory.Amount 50
	Inventory.MaxAmount 50
	Ammo.BackPackAmount 50
	Ammo.BackPackMaxAmount 50
	+INVENTORY.IGNORESKILL
	States
	{
	Spawn:
		TNT1 A -1
		Stop
	}
}

Actor MageAmmo2 : Ammo
{
	Inventory.Amount 5
	Inventory.MaxAmount 5
	Inventory.Icon "ELECBLIZ"
	Ammo.BackPackAmount 5
	Ammo.BackPackMaxAmount 5
	+INVENTORY.IGNORESKILL
	States
	{
	Spawn:
		TNT1 A -1
		Stop
	}
}

Actor MageAmmo3 : Ammo
{
	Inventory.Icon "BLIZZATT"
	Inventory.Amount 5
	Inventory.MaxAmount 5
	Ammo.BackPackAmount 5
	Ammo.BackPackMaxAmount 5
	+INVENTORY.IGNORESKILL
	States
	{
	Spawn:
		TNT1 A -1
		Stop
	}
}

Actor MageAmmo4 : Ammo
{
	Inventory.Amount 5
	Inventory.MaxAmount 5
	Inventory.Icon "ICEWIND"
	Ammo.BackPackAmount 5
	Ammo.BackPackMaxAmount 5
	+INVENTORY.IGNORESKILL
	States
	{
	Spawn:
		TNT1 A -1
		Stop
	}
}

Actor MageAmmo5 : Ammo
{
	Inventory.Amount 5
	Inventory.MaxAmount 100
	Inventory.Icon "ICEWIND"
	Ammo.BackPackAmount 100
	Ammo.BackPackMaxAmount 100
	+INVENTORY.IGNORESKILL
	States
	{
	Spawn:
		TNT1 A -1
		Stop
	}
}


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

Actor IceHands : Weapon
{
	Weapon.SelectionOrder 3
	Weapon.SlotNumber 3
	Weapon.Ammotype "MageAmmo5"
	Weapon.Ammotype2 "MageAmmo5"
	Weapon.Ammouse 1
	Weapon.Ammouse2 10
	Inventory.Icon "MAGEATTK"
	+WEAPON.NOAUTOAIM
	+WEAPON.DONTBOB
	+INVENTORY.UNDROPPABLE
	+NOALERT 
	States
	{
	Ready:
		ICHN ABCD 5 bright A_WeaponReady
		Loop
	Deselect:
		ICHN A 1 bright A_Lower
		Loop
	Select:
		ICHN A 1 bright A_Raise
		Loop
	Fire:
		ICHN E 3 bright
        ICHN E 0 Bright A_SpawnItemEx("IceMageFog2", 16, 0, 32, 0.5, 0, Random(-0.5, 0.5), Random(-50, 50), 128)
        ICHN E 0 Bright A_SpawnItemEx("IceMageFog2", 16, 0, 32, 0.5, 0, Random(-0.5, 0.5), Random(-50, 50), 128)
        ICHN E 0 Bright A_SpawnItemEx("IceMageFog2", 16, 0, 32, 0.5, 0, Random(-0.5, 0.5), Random(-50, 50), 128)
        ICHN E 0 Bright A_SpawnItemEx("IceMageFog2", 16, 0, 32, 0.5, 0, Random(-0.5, 0.5), Random(-50, 50), 128)
		ICHN E 0 Bright A_Playweaponsound("MageMissileF")
		ICHN FGHI 3 bright A_FireCustomMissile("MageIceBall",0,1)
		TNT1 A 6
		ICHN D 1 Offset(0,62) bright
		ICHN D 1 Offset(0,52) bright
		ICHN D 1 Offset(0,42) bright
		Goto Ready
	AltFire:
	    ICHN A 0 ACS_ExecuteAlways(977)
		ICHN ABCDABCDABCD 3 bright A_SpawnItemEx("BlizzardExplode",random(-20,20),random(-20,20),random(0,56))
		ICHN E 3 bright
	    ICHN E 0 Bright A_SpawnItemEx("IceMageFog2", 16, 0, 32, 0.5, 0, Random(-0.5, 0.5), Random(-50, 50), 128)
        ICHN E 0 Bright A_SpawnItemEx("IceMageFog2", 16, 0, 32, 0.5, 0, Random(-0.5, 0.5), Random(-50, 50), 128)
        ICHN E 0 Bright A_SpawnItemEx("IceMageFog2", 16, 0, 32, 0.5, 0, Random(-0.5, 0.5), Random(-50, 50), 128)
        ICHN E 0 Bright A_SpawnItemEx("IceMageFog2", 16, 0, 32, 0.5, 0, Random(-0.5, 0.5), Random(-50, 50), 128)
		ICHN E 0 Bright A_PlayWeaponsound("MageBigBallFire")
		ICHN F 3 bright A_FireCustomMissile("MageBigIceBall",0,1)
		ICHN GHI 3 bright
		TNT1 A 15
		ICHN D 1 Offset(0,62) bright
		ICHN D 1 Offset(0,52) bright
		ICHN D 1 Offset(0,42) bright
		Goto Ready
	}
}

Actor MageIceBallParticle
{
  Radius 1
  Height 1
  +NoGravity
  +NoClip
  +CLIENTSIDEONLY
  RenderStyle Add
  Alpha 1.0
  Scale 0.6
  States
  {
  Spawn:
    FFFG A 4 A_FadeOut(0.2)
    Loop
  }
}

Actor MageIceBall
{
	Radius 10
	Height 10
	Speed 40
	Damage (7)
	DamageType "AltIce2"
	RenderStyle Translucent
	bouncecount 2
	Alpha 0.5
	Scale 1.0
	DeathSound "FSTFHIT2"
	Obituary "%k bombed %o to death."
	PROJECTILE
	+doombounce
	-nogravity
	+CANBOUNCEWATER
	+SKYEXPLODE
	gravity 0.8
	States
	{
  Spawn:
    TNT1 A 0 A_SpawnItemEx("Icemagefog2", 0, 0, 0, Random(1, 2), 0, Random(-1, 1), Random(-30, 30), 128)
    TNT1 A 1 A_SpawnItemEx("MageIceBallParticle", 0, 0, 0, Random(3, 4), 0, Random(-0.5, 0.5), Random(-15, 15), 128)
    Loop
  XDeath:
	TNT1 A 0 A_GiveToTarget("HitBeep",1)
    Goto Death
  Death:
    FFBL C 0 A_SpawnItemEx("HunterFreezeSlow",0,0,0,0,0,0,0,SXF_NOCHECKPOSITION)
    FFBL CDEFG 4 Bright
    Stop
  }
}

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

Actor MageIceBallParticle2
{
  Radius 1
  Height 1
  +NoGravity
  +NoClip
  +CLIENTSIDEONLY
  RenderStyle Add
  Alpha 1.0
  Scale 0.6
  States
  {
  Spawn:
    FFFG A 2 A_FadeOut(0.1)
    Loop
  }
}

Actor MageBigIceBall
{
	Radius 20
	Height 20
	Speed 26
	Scale 0.5
	Damage (25)
	projectile
	+doombounce
	-nogravity
	+CANBOUNCEWATER
	+SKYEXPLODE
	bouncecount 5
	seesound "MageBallBounce"
	gravity 0.9
	Obituary "%o is the eye of the storm."
	RenderStyle add
	Alpha 0.75
	States
	{
	Spawn:
		ICBL ABCDEF 2 bright A_SpawnItemEx("MageVFXLightningBallTrail")
		Loop
	XDeath:
	  TNT1 A 0 A_GiveToTarget("HitBeep",1)
      Goto Death
	Death:
      TNT1 A 0 A_Custommissile("MageLightningXPLBall",0,0,180)
	  TNT1 A 0 A_Custommissile("MageLightningXPLBall",0,0,160)
      TNT1 A 0 A_Custommissile("MageLightningXPLBall",0,0,140)
	  TNT1 A 0 A_Custommissile("MageLightningXPLBall",0,0,120)
	  TNT1 A 0 A_Custommissile("MageLightningXPLBall",0,0,100)
	  TNT1 A 0 A_Custommissile("MageLightningXPLBall",0,0,80)
	  TNT1 A 0 A_Custommissile("MageLightningXPLBall",0,0,60)
	  TNT1 A 0 A_Custommissile("MageLightningXPLBall",0,0,40)
	  TNT1 A 0 A_Custommissile("MageLightningXPLBall",0,0,20)
	  TNT1 A 0 A_Custommissile("MageLightningXPLBall",0,0,0)
	  TNT1 A 0 A_Custommissile("MageLightningXPLBall",0,0,-20)
	  TNT1 A 0 A_Custommissile("MageLightningXPLBall",0,0,-40)
	  TNT1 A 0 A_Custommissile("MageLightningXPLBall",0,0,-60)
	  TNT1 A 0 A_Custommissile("MageLightningXPLBall",0,0,-80)
	  TNT1 A 0 A_Custommissile("MageLightningXPLBall",0,0,-100)
	  TNT1 A 0 A_Custommissile("MageLightningXPLBall",0,0,-120)
	  TNT1 A 0 A_Custommissile("MageLightningXPLBall",0,0,-140)
	  TNT1 A 0 A_Custommissile("MageLightningXPLBall",0,0,-160)
	  TNT1 A 0 A_Custommissile("MageLightningXPLBall",0,0,-180)
	  TNT1 A 1 A_Playsound("MageBallXplode",CHAN_BODY)
	  Goto EndingFX
	  EndingFX:
	  METL B 2 Bright A_FadeOut(0.2)
	  loop
	}
}

Actor MageVFXLightningBallTrail
{
	Scale 0.5
	+nointeraction
	+CLIENTSIDEONLY
	RenderStyle add
	Alpha 0.75
	States
	{
	Spawn:
		ICBL ABCDEF 1 bright A_FadeOut(0.1)
		Loop
	Death:
		TNT1 A 0
		Stop
	}
}

Actor MageLightningXPLBall
{
  Radius 4
  Height 4
  Speed 30
  Damage (10)
  DamageType "Sentinel"
  Obituary "%o is the eye of the storm."
  RenderStyle Add
  Scale 0.75
  Projectile
  DeathSound "MageLightningMiniBallHit"
  States
  {
  Spawn:
	LAP6 A 0 bright A_SetTranslucent(0.95, 1)
    LAP6 ABC 1 bright
    loop
  XDeath:
	TNT1 A 0 A_GiveToTarget("HitBeep",1)
    Goto Death
  Death:
    LAP6 ABC 1 bright A_Fadeout(0.2)
    stop
  }
}

Actor IceWand : Weapon
{
	Weapon.SelectionOrder 1
	Weapon.SlotNumber 1
	Weapon.AmmoType "MageAmmo1"
	Weapon.AmmoGive 0
	Weapon.AmmoUse 1
	Weapon.AmmoType2 "MageAmmo2"
	Weapon.AmmoGive2 0
	Weapon.AmmoUse2 1
	Inventory.Icon "MAGEWAND"
	+WEAPON.NOAUTOAIM
	+WEAPON.ALT_AMMO_OPTIONAL
	+INVENTORY.UNDROPPABLE
	+NOALERT 
	States 
	{ 
	Spawn: 
		TNT1 A 1
		Stop 
	Ready: 
		IWND A 20 A_WeaponReady 
		IWND A 0 A_GiveInventory("MageAmmo1", 1)
		Goto Ready
	Deselect:
		IWND A 1 A_Lower
		Loop
	Select: 
		IWND A 1 A_Raise
		Loop
	Fire:
        IWND A 6
		IWND E 0 Bright A_SpawnItemEx("IceMageFog2", 16, 0, 32, 0.5, 0, Random(-0.5, 0.5), Random(-50, 50), 128)
        IWND E 0 Bright A_SpawnItemEx("IceMageFog2", 16, 0, 32, 0.5, 0, Random(-0.5, 0.5), Random(-50, 50), 128)
        IWND E 0 Bright A_SpawnItemEx("IceMageFog2", 16, 0, 32, 0.5, 0, Random(-0.5, 0.5), Random(-50, 50), 128)
        IWND E 0 Bright A_SpawnItemEx("IceMageFog2", 16, 0, 32, 0.5, 0, Random(-0.5, 0.5), Random(-50, 50), 128)
		INWD E 0 A_Playweaponsound("XWNDFR")
        IWND B 6 Bright Offset (0, 48) A_FireCustomMissile("MageWandMissile2",0,1)
        IWND A 3 Offset (0, 40)
        IWND A 3 Offset (0, 36) A_ReFire
        Goto Ready
	AltFire:
		IWND A 1 Offset(0,42) A_JumpIfNoAmmo("Ready")
		IWND A 0 offset(0,42) ACS_ExecuteAlways(955)
		IWND A 1 Offset(0,52)
		IWND A 1 Offset(0,62)
		TNT1 A 10 
		CONE A 1 Offset(0,62)
		CONE A 1 Offset(0,52)
		CONE A 1 Offset(0,42)
		CONE A 1 Offset(0,32)
		CONE B 5
		CONE C 5 bright
		CONE D 5 bright A_FireCustomMissile("ElectricalStormSpawner",0,1,9)
		CONE E 5 bright
		CONE FG 5
		CONE A 1 Offset(0,42)
		CONE A 1 Offset(0,52)
		CONE A 1 Offset(0,62)
		TNT1 A 10
		IWND A 1 Offset(0,62)
		IWND A 1 Offset(0,52)
		IWND A 1 Offset(0,42)
		Goto Ready
	}
}

actor MageWandMissile2 : fastprojectile
{
    Radius 3
    Height 2
    Obituary "%k has put the icing on the %o cake."
    Decal RailScorchLower
    Damage (10)
	speed 150
	Deathsound "XWNDFR"
	+RIPPER
    +STRIFEDAMAGE
    DamageType "Ice"
	States
	{
	Spawn:
	LWND CD 1 Bright
	TNT1 A 0 Bright A_SpawnItemEx("MageVFXIceTrail")
	TNT1 A 0 Bright A_SpawnItemEx("MageVFXIceTrail")
	TNT1 A 0 Bright A_SpawnItemEx("MageVFXIceTrail")
    TNT1 A 0 bright A_SpawnItemEx("Icescatterspark",random(-10,10),random(-10,10),random(-10,10),0,0,0)
	TNT1 A 0 bright A_SpawnItemEx("Icescatterspark",random(-10,10),random(-10,10),random(-10,10),0,0,0)
	TNT1 A 0 bright A_SpawnItemEx("Icescatterspark",random(-10,10),random(-10,10),random(-10,10),0,0,0)
	loop
	Death:
	TNT1 A 0 Bright A_SpawnItemEx("MageVFXIceTrail")
	TNT1 A 0 Bright A_SpawnItemEx("MageVFXIceTrail")
	LWND EFGHI 3
	Stop
	}
}


Actor ElectricalStormSpawner
{
	Speed 30
	Height 0
	Radius 0
	Alpha 0.8
	Damage (6)
	DamageType "ElecStorm"
	SeeSound "MageSeed"
	DeathSound "MageMissileX"
	RenderStyle Translucent
	PROJECTILE
	+seekermissile
	States
	{
	Spawn:
		MGSD A 1 bright A_SpawnItemEx("Icemagefog2", 0, 0, 0, Random(1, 2), 0, Random(-1, 1), Random(-30, 30), 128)
		MGSD A 0 bright A_SeekerMissile(45, 45,SMF_LOOK|SMF_PRECISE,256,3)
		MHSD B 1 bright A_SpawnItemEx("MageIceBallParticle", 0, 0, 0, Random(3, 4), 0, Random(-0.5, 0.5), Random(-15, 15), 128)
		MHSD B 0 bright A_SeekerMissile(45, 45,SMF_LOOK|SMF_PRECISE,256,3)
		MGSD A 1 bright A_SpawnItemEx("Icemagefog2", 0, 0, 0, Random(1, 2), 0, Random(-1, 1), Random(-30, 30), 128)
		MHSD B 1 bright A_SpawnItemEx("MageIceBallParticle", 0, 0, 0, Random(3, 4), 0, Random(-0.5, 0.5), Random(-15, 15), 128)
		MGSD A 1 bright A_SpawnItemEx("Icemagefog2", 0, 0, 0, Random(1, 2), 0, Random(-1, 1), Random(-30, 30), 128)
		Loop
	XDeath:
		TNT1 A 0 A_GiveToTarget("HitBeep",1)
		Goto Death
	Death:
		MGSD C 0 A_PlaySound("MageElectricalStorm")
		MGSD CDEFG 1 bright A_SpawnItemEx("ElectricalStorm",random(-75,75),random(-75,75),random(0,100),0,0,0,SXF_NOCHECKPOSITION)
		MGSD ZZZZZ 1 bright A_SpawnItemEx("ElectricalStorm",random(-75,75),random(-75,75),random(0,100),0,0,0,SXF_NOCHECKPOSITION)
		MGSD ZZZZZ 1 bright A_SpawnItemEx("ElectricalStorm",random(-75,75),random(-75,75),random(0,100),0,0,0,SXF_NOCHECKPOSITION)
		MGSD ZZZZZ 1 bright A_SpawnItemEx("ElectricalStorm",random(-75,75),random(-75,75),random(0,100),0,0,0,SXF_NOCHECKPOSITION)
		Stop
	}
}

Actor ElectricalStorm
{
	Height 0
	Radius 0
	BounceFactor 0.3
	BounceCount 4
	Speed 46
	Alpha 0.85
	ReactionTime 30
	Damage 0
	DamageType "ElecStorm"
	Obituary "%o stood in the middle of an electrical storm that %k has predicted."
	RenderStyle Add
	PROJECTILE
	+RIPPER
	+NOBLOCKMAP
	States
	{
	Spawn:
		FX16 ABCDE 2 bright A_Explode(6,75,1)
		Stop
	Death:
		TNT1 A 0
		Stop
	}
}

Actor BlizzardWand : Weapon
{
	Weapon.SelectionOrder 2
	Weapon.SlotNumber 2
	Weapon.AmmoType "MageAmmo3"
	Weapon.AmmoGive 0
	Weapon.AmmoUse 1
	Weapon.AmmoType2 "MageAmmo4"
	Weapon.AmmoGive2 0
	Weapon.AmmoUse2 0
	Inventory.Icon "MAGESTFF"
	+WEAPON.NOAUTOAIM
	+WEAPON.DONTBOB
	+WEAPON.ALT_AMMO_OPTIONAL
	+INVENTORY.UNDROPPABLE
	+NOALERT 
	States
	{
	Ready:
		BZWN A 0 A_TakeInventory("IcyChecker",999)
		BZWN A 1 A_WeaponReady
		Loop
	Deselect:
		BZWN A 1 A_Lower
		Loop
	Select:
		BZWN A 1 A_Raise
		Loop
	Fire:
		BZWN B 0 ACS_ExecuteAlways(983)
		BZWN BCD 3 bright
		BZWN D 0 A_PlayWeaponSound("MageBlizzard")
		BZWN E 0 Bright A_SpawnItemEx("IceMageFog2", 16, 0, 32, 0.5, 0, Random(-0.5, 0.5), Random(-50, 50), 128)
        BZWN E 0 Bright A_SpawnItemEx("IceMageFog2", 16, 0, 32, 0.5, 0, Random(-0.5, 0.5), Random(-50, 50), 128)
        BZWN E 0 Bright A_SpawnItemEx("IceMageFog2", 16, 0, 32, 0.5, 0, Random(-0.5, 0.5), Random(-50, 50), 128)
        BZWN E 0 Bright A_SpawnItemEx("IceMageFog2", 16, 0, 32, 0.5, 0, Random(-0.5, 0.5), Random(-50, 50), 128)
		BZWN B 3 Offset(0,62) bright A_FireCustomMissile("BlizzardSpawner")
		BZWN C 3 Offset(0,52) bright
		BZWN D 3 Offset(0,42) bright
		BZWN B 3 Offset(0,32) bright
		BZWN CD 3 bright
		BZWN BCDB 4
		Goto Ready
	AltFire:
		BZWN A 0 A_JumpIfInventory("MageAmmo4",1,"AltFireOk")
		BZWN A 1
		Goto Ready
	AltFireOk:
		BZWN A 0 ACS_ExecuteAlways(984)
		BZWN BBBCCCDDD 1 bright A_SpawnItemEx("IcyTrail",random(-20,20),random(-20,20),0,0,0,10)
		Goto AltHold
	AltHold:
		BZWN BBCCDD 1 bright A_SpawnItemEx("IcyTrail",random(-20,20),random(-20,20),0,0,0,10)
		BZWN B 0 A_GiveInventory("IcyChecker",1)
		BZWN B 0 A_ReFire
		BZWN B 0 A_TakeInventory("MageAmmo4",1)
		BZWN B 0 A_JumpIfInventory("IcyChecker",6,"Attack6")
		BZWN B 0 A_JumpIfInventory("IcyChecker",5,"Attack5")
		BZWN B 0 A_JumpIfInventory("IcyChecker",4,"Attack4")
		BZWN B 0 A_JumpIfInventory("IcyChecker",3,"Attack3")
		BZWN B 0 A_JumpIfInventory("IcyChecker",2,"Attack2")
	Attack1:
		BZWN D 0 A_PlayWeaponSound("FrostTwinkle")
		BZWN D 0 Bright A_SpawnItemEx("IceMageFog2", 16, 0, 32, 0.5, 0, Random(-0.5, 0.5), Random(-50, 50), 128)
        BZWN D 0 Bright A_SpawnItemEx("IceMageFog2", 16, 0, 32, 0.5, 0, Random(-0.5, 0.5), Random(-50, 50), 128)
        BZWN D 0 Bright A_SpawnItemEx("IceMageFog2", 16, 0, 32, 0.5, 0, Random(-0.5, 0.5), Random(-50, 50), 128)
        BZWN D 0 Bright A_SpawnItemEx("IceMageFog2", 16, 0, 32, 0.5, 0, Random(-0.5, 0.5), Random(-50, 50), 128)
		BZWN BCDBCD 1 bright A_FireCustomMissile("IcyWind",0,0,random(-8,8),random(-8,8))
		Goto Ready
	Attack2:
		BZWN D 0 A_PlayWeaponSound("FrostTwinkle")
	    BZWN D 0 Bright A_SpawnItemEx("IceMageFog2", 16, 0, 32, 0.5, 0, Random(-0.5, 0.5), Random(-50, 50), 128)
        BZWN D 0 Bright A_SpawnItemEx("IceMageFog2", 16, 0, 32, 0.5, 0, Random(-0.5, 0.5), Random(-50, 50), 128)
        BZWN D 0 Bright A_SpawnItemEx("IceMageFog2", 16, 0, 32, 0.5, 0, Random(-0.5, 0.5), Random(-50, 50), 128)
        BZWN D 0 Bright A_SpawnItemEx("IceMageFog2", 16, 0, 32, 0.5, 0, Random(-0.5, 0.5), Random(-50, 50), 128)
		BZWN BCDBCDBCD 1 bright A_FireCustomMissile("IcyWind",0,0,random(-12,12),random(-12,12))
		Goto Ready
	Attack3:
		BZWN D 0 A_PlayWeaponSound("FrostTwinkle")
	    BZWN D 0 Bright A_SpawnItemEx("IceMageFog2", 16, 0, 32, 0.5, 0, Random(-0.5, 0.5), Random(-50, 50), 128)
        BZWN D 0 Bright A_SpawnItemEx("IceMageFog2", 16, 0, 32, 0.5, 0, Random(-0.5, 0.5), Random(-50, 50), 128)
        BZWN D 0 Bright A_SpawnItemEx("IceMageFog2", 16, 0, 32, 0.5, 0, Random(-0.5, 0.5), Random(-50, 50), 128)
        BZWN D 0 Bright A_SpawnItemEx("IceMageFog2", 16, 0, 32, 0.5, 0, Random(-0.5, 0.5), Random(-50, 50), 128)
		BZWN BCDBCDBCDBCD 1 bright A_FireCustomMissile("IcyWind",0,0,random(-16,16),random(-16,16))
		Goto Ready
	Attack4:
		BZWN D 0 A_PlayWeaponSound("FrostTwinkle")
	    BZWN D 0 Bright A_SpawnItemEx("IceMageFog2", 16, 0, 32, 0.5, 0, Random(-0.5, 0.5), Random(-50, 50), 128)
        BZWN D 0 Bright A_SpawnItemEx("IceMageFog2", 16, 0, 32, 0.5, 0, Random(-0.5, 0.5), Random(-50, 50), 128)
        BZWN D 0 Bright A_SpawnItemEx("IceMageFog2", 16, 0, 32, 0.5, 0, Random(-0.5, 0.5), Random(-50, 50), 128)
        BZWN D 0 Bright A_SpawnItemEx("IceMageFog2", 16, 0, 32, 0.5, 0, Random(-0.5, 0.5), Random(-50, 50), 128)
		BZWN BCDBCDBCDBCDBCD 1 bright A_FireCustomMissile("IcyWind",0,0,random(-20,20),random(-20,20))
		Goto Ready
	Attack5:
		BZWN D 0 A_PlayWeaponSound("FrostTwinkle")
	    BZWN D 0 Bright A_SpawnItemEx("IceMageFog2", 16, 0, 32, 0.5, 0, Random(-0.5, 0.5), Random(-50, 50), 128)
        BZWN D 0 Bright A_SpawnItemEx("IceMageFog2", 16, 0, 32, 0.5, 0, Random(-0.5, 0.5), Random(-50, 50), 128)
        BZWN D 0 Bright A_SpawnItemEx("IceMageFog2", 16, 0, 32, 0.5, 0, Random(-0.5, 0.5), Random(-50, 50), 128)
        BZWN D 0 Bright A_SpawnItemEx("IceMageFog2", 16, 0, 32, 0.5, 0, Random(-0.5, 0.5), Random(-50, 50), 128)
		BZWN BCDBCDBCDBCDBCDBCD 1 bright A_FireCustomMissile("IcyWind",0,0,random(-24,24),random(-24,24))
		Goto Ready
	Attack6:
		BZWN D 0 A_PlayWeaponSound("FrostTwinkle")
	    BZWN D 0 Bright A_SpawnItemEx("IceMageFog2", 16, 0, 32, 0.5, 0, Random(-0.5, 0.5), Random(-50, 50), 128)
        BZWN D 0 Bright A_SpawnItemEx("IceMageFog2", 16, 0, 32, 0.5, 0, Random(-0.5, 0.5), Random(-50, 50), 128)
        BZWN D 0 Bright A_SpawnItemEx("IceMageFog2", 16, 0, 32, 0.5, 0, Random(-0.5, 0.5), Random(-50, 50), 128)
        BZWN D 0 Bright A_SpawnItemEx("IceMageFog2", 16, 0, 32, 0.5, 0, Random(-0.5, 0.5), Random(-50, 50), 128)
		BZWN BCDBCDBCDBCDBCDBCDBCDBCDBCDBCDBCDBCD 2 bright A_FireCustomMissile("IcyWind",0,0,random(-28,28),random(-28,28))
		Goto Ready
	}
}

Actor BlizzardSpawner
{
	Speed 4
	Height 5
	Radius 5
	Alpha 0.5
	scale 2.0
	ReactionTime 120
	Damage 1
	DamageType "Ice"
	DeathSound "StarHit"
	Obituary "%o felt a cold demise from %k's blizzard."
	RenderStyle Add
	PROJECTILE
	+RIPPER
	+SKYEXPLODE
	States
	{
	Spawn:
		ICSP A 0 A_PlaySound("MageWind")
		ICSP A 1 bright A_SpawnItemEx("IceDrop",0,0,0,random(5,15),random(5,15),random(-15,15),random(0,360))
		ICSP A 0 bright A_SpawnItemEx("IceDrop",0,0,0,random(5,15),random(5,15),random(-15,15),random(0,360))
		TNT1 A 0 A_CustomMissile("BigIceScatterSpark",0,0,random(0,360),CMF_AIMDIRECTION,random(0,12))
		TNT1 A 0 A_CustomMissile("BigIceScatterSpark",0,0,random(0,360),CMF_AIMDIRECTION,random(0,12))
		TNT1 A 0 A_CustomMissile("BigIceScatterSpark",0,0,random(0,360),CMF_AIMDIRECTION,random(0,12))
		TNT1 A 0 A_CustomMissile("BigIceScatterSpark",0,0,random(0,360),CMF_AIMDIRECTION,random(0,12))
		ICSP AA 0 bright A_SpawnItemEx("IceMist",0,0,0,random(5,15),random(5,15),random(-15,15),random(0,360))
		ICSP A 0 A_CountDown
		ICSP B 1 bright A_SpawnItemEx("IceDrop",0,0,0,random(5,15),random(5,15),random(-15,15),random(0,360))
		ICSP B 0 bright A_SpawnItemEx("IceDrop",0,0,0,random(5,15),random(5,15),random(-15,15),random(0,360))
		TNT1 A 0 A_CustomMissile("BigIceScatterSpark",0,0,random(0,360),CMF_AIMDIRECTION,random(0,12))
		TNT1 A 0 A_CustomMissile("BigIceScatterSpark",0,0,random(0,360),CMF_AIMDIRECTION,random(0,12))
		TNT1 A 0 A_CustomMissile("BigIceScatterSpark",0,0,random(0,360),CMF_AIMDIRECTION,random(0,12))
		TNT1 A 0 A_CustomMissile("BigIceScatterSpark",0,0,random(0,360),CMF_AIMDIRECTION,random(0,12))
		ICSP BB 0 bright A_SpawnItemEx("IceMist",0,0,0,random(5,15),random(5,15),random(-15,15),random(0,360))
		ICSP B 0 A_CountDown
		ICSP C 1 bright A_SpawnItemEx("IceDrop",0,0,0,random(5,15),random(5,15),random(-15,15),random(0,360))
		ICSP C 0 bright A_SpawnItemEx("IceDrop",0,0,0,random(5,15),random(5,15),random(-15,15),random(0,360))
		TNT1 A 0 A_CustomMissile("BigIceScatterSpark",0,0,random(0,360),CMF_AIMDIRECTION,random(0,12))
		TNT1 A 0 A_CustomMissile("BigIceScatterSpark",0,0,random(0,360),CMF_AIMDIRECTION,random(0,12))
		TNT1 A 0 A_CustomMissile("BigIceScatterSpark",0,0,random(0,360),CMF_AIMDIRECTION,random(0,12))
		TNT1 A 0 A_CustomMissile("BigIceScatterSpark",0,0,random(0,360),CMF_AIMDIRECTION,random(0,12))
		ICSP CC 0 bright A_SpawnItemEx("IceMist",0,0,0,random(5,15),random(5,15),random(-15,15),random(0,360))
		ICSP C 0 A_CountDown
		ICSP D 1 bright A_SpawnItemEx("IceDrop",0,0,0,random(5,15),random(5,15),random(-15,15),random(0,360))
		ICSP D 0 bright A_SpawnItemEx("IceDrop",0,0,0,random(5,15),random(5,15),random(-15,15),random(0,360))
		TNT1 A 0 A_CustomMissile("BigIceScatterSpark",0,0,random(0,360),CMF_AIMDIRECTION,random(0,12))
		TNT1 A 0 A_CustomMissile("BigIceScatterSpark",0,0,random(0,360),CMF_AIMDIRECTION,random(0,12))
		TNT1 A 0 A_CustomMissile("BigIceScatterSpark",0,0,random(0,360),CMF_AIMDIRECTION,random(0,12))
		TNT1 A 0 A_CustomMissile("BigIceScatterSpark",0,0,random(0,360),CMF_AIMDIRECTION,random(0,12))
		ICSP DD 0 bright A_SpawnItemEx("IceMist",0,0,0,random(5,15),random(5,15),random(-15,15),random(0,360))
		ICSP D 0 A_CountDown
	Restart:
		ICSP E 1 bright A_SpawnItemEx("IceDrop",0,0,0,random(5,15),random(5,15),random(-15,15),random(0,360))
		ICSP E 0 bright A_SpawnItemEx("IceDrop",0,0,0,random(5,15),random(5,15),random(-15,15),random(0,360))
		TNT1 A 0 A_CustomMissile("BigIceScatterSpark",0,0,random(0,360),CMF_AIMDIRECTION,random(0,12))
		TNT1 A 0 A_CustomMissile("BigIceScatterSpark",0,0,random(0,360),CMF_AIMDIRECTION,random(0,12))
		TNT1 A 0 A_CustomMissile("BigIceScatterSpark",0,0,random(0,360),CMF_AIMDIRECTION,random(0,12))
		TNT1 A 0 A_CustomMissile("BigIceScatterSpark",0,0,random(0,360),CMF_AIMDIRECTION,random(0,12))
		ICSP EE 0 bright A_SpawnItemEx("IceMist",0,0,0,random(5,15),random(5,15),random(-15,15),random(0,360))
		ICSP E 0 A_CountDown
		ICSP F 1 bright A_SpawnItemEx("IceDrop",0,0,0,random(5,15),random(5,15),random(-15,15),random(0,360))
		ICSP F 0 bright A_SpawnItemEx("IceDrop",0,0,0,random(5,15),random(5,15),random(-15,15),random(0,360))
		TNT1 A 0 A_CustomMissile("BigIceScatterSpark",0,0,random(0,360),CMF_AIMDIRECTION,random(0,12))
		TNT1 A 0 A_CustomMissile("BigIceScatterSpark",0,0,random(0,360),CMF_AIMDIRECTION,random(0,12))
		TNT1 A 0 A_CustomMissile("BigIceScatterSpark",0,0,random(0,360),CMF_AIMDIRECTION,random(0,12))
		TNT1 A 0 A_CustomMissile("BigIceScatterSpark",0,0,random(0,360),CMF_AIMDIRECTION,random(0,12))
		ICSP FF 0 bright A_SpawnItemEx("IceMist",0,0,0,random(5,15),random(5,15),random(-15,15),random(0,360))
		ICSP F 0 A_CountDown
		Goto Restart
	Death:
		TNT1 A 0 A_SpawnItem("BlizzardExplode")
		TNT1 A 0
		TNT1 A 1 A_Explode(5,100,1)
		TNT1 A 0 A_FadeOut(0.1)
		Goto Death+1
	}
}

Actor BlizzardExplode
{
	Radius 1
	Height 1
	Alpha 0.5
	scale 2.0
	RenderStyle Add
	DamageType "Ice"	
	+NOINTERACTION
	+NOGRAVITY
	-CLIENTSIDEONLY
	-SOLID
	States
	{
	Spawn:
		ICSP G 6 bright A_PlaySound("FrostTwinkle")
		ICSP H 6 bright A_PlaySound("FrostTwinkle") 
		ICSP IJKL 6 bright A_PlaySound("FrostTwinkle")
		Stop
	}
}

Actor IceDrop
{
	Height 3
	Radius 3
	Speed 8	
	scale 2.0
	BounceCount 5
	BounceFactor 0.5
	Damage 0
	DamageType "Ice"
	RenderStyle Add
	PROJECTILE
	+DOOMBOUNCE
	+NOINTERACTION
	+NOBLOCKMAP
	-CLIENTSIDEONLY
	-NOGRAVITY
	States
	{
	Spawn:
		TNT1 A 2
		TGLT F 0 A_SpawnItemEx("FallingIceDamage")
		TGLT FGHIFGHIFGHIFGHI 2 bright A_FadeOut(0.2)
		Goto Spawn+1
	}
}

Actor FallingIceDamage
{
	Radius 4
	Height 4
	DamageType "Ice"
	Damage 0
	Obituary "%o felt a cold demise from %k's blizzard."
	PROJECTILE
	-NOBLOCKMAP
	States
	{
	Spawn:
		TNT1 A 0
		TNT1 A 2 A_Explode(5,158,0)
		Stop
	}
}

Actor IceMist : FrozenWind
{
	Damage 0
	scale 2.0
	DamageType "Ice"
	+CLIENTSIDEONLY
	States
	{
	Spawn:
		PLSS A 0 A_PlaySoundEx("MageWind","Body")
		PLSS JKLMNOPQRSTUVWX 3 A_FadeOut(0.05)
		Stop
	}
}

Actor IcyWind
{
	Speed 100
	Radius 5
	Height 5
	Scale 0.2
	Damage (6)
	seesound "MageShardsFire"
	DamageType "Ice2"
	Obituary "%k invoked an Icy Storm to stop %o."
	PROJECTILE
	+SEEKERMISSILE
	States
	{
	Spawn:
		XCES A 2 bright A_SeekerMissile(10,20)
		TGLT F 0 A_SpawnItemEx("IcyTrail")
		XCES A 2 bright A_SeekerMissile(10,20)
		TGLT F 0 A_SpawnItemEx("IcyTrail")
		XCES A 2 bright A_SeekerMissile(10,20)
		TGLT F 0 A_SpawnItemEx("IcyTrail")
		XCES A 2 bright A_SeekerMissile(10,20)
		TGLT F 0 A_SpawnItemEx("IcyTrail")
		XCES A 2 bright A_SeekerMissile(10,20)
		TGLT F 0 A_SpawnItemEx("IcyTrail")
		XCES A 2 bright A_SeekerMissile(10,20)
		TGLT F 0 A_SpawnItemEx("IcyTrail")
		XCES A 2 bright A_SeekerMissile(10,20)
		TGLT F 0 A_SpawnItemEx("IcyTrail")
		XCES A 2 bright A_SeekerMissile(10,20)
		TGLT F 0 A_SpawnItemEx("IcyTrail")
		XCES A 2 bright A_SeekerMissile(10,20)
		TGLT F 0 A_SpawnItemEx("IcyTrail")
		XCES A 2 bright A_SeekerMissile(10,20)
		TGLT F 0 A_SpawnItemEx("IcyTrail")
		XCES A 2 bright A_SeekerMissile(10,20)
		TGLT F 0 A_SpawnItemEx("IcyTrail")
		XCES A 2 bright A_SeekerMissile(10,20)
		TGLT F 0 A_SpawnItemEx("IcyTrail")
		XCES A 2 bright A_SeekerMissile(10,20)
		TGLT F 0 A_SpawnItemEx("IcyTrail")
		Loop
	XDeath:
		TNT1 A 0 A_GiveToTarget("HitBeep",1)
		Goto Death
	Death:
		TGLT F 0 A_PlaySound("MageShardsImpact")
		XCES BCD 2 bright A_FadeOut(0.2)
		Stop
	}
}



Actor IcyTrail
{
	Radius 0
	Height 0
	Damage 0
	Alpha 0.75
	RenderStyle Add
	PROJECTILE
	+RIPPER
	+NOBLOCKMAP
	-NOGRAVITY
	-SOLID
	-SHOOTABLE
	+CLIENTSIDEONLY
	
	States
	{
	Spawn:
		TGLT FFFFFFFFFFFFFFFF 3 bright A_FadeOut(0.2)
	}
}

Actor IcyChecker : Inventory
{
	Inventory.Amount 1
	Inventory.MaxAmount 6
}

actor MageIceFallSpawner
{
+SKYEXPLODE
PROJECTILE
-SOLID
+NOGRAVITY
+CEILINGHUGGER
radius 1
height 8
speed 0
States
{
Spawn:
Death:
TNT1 A 0 
TNT1 AA 1 A_SpawnItemEx("MageIceFall",1,0,-1,0,0,-22)
stop
}
}

actor MageIceFall
{
Height 5
Radius 5
scale 0.4
BounceFactor 0.3
BounceCount 4
PROJECTILE
Damage (5)
Damagetype "Ice"
-NOGRAVITY
Speed 46
reactiontime 30
States
{
Spawn:
BNT2 G 1 bright A_SpawnItemEx("MageIceFallTrail",0,0,0,0,0,0,0,SXF_NOCHECKPOSITION)
BNT2 H 1 bright A_SpawnItemEx("MageIceFallTrail2",0,0,0,0,0,0,0,SXF_NOCHECKPOSITION)
loop
XDeath:
TNT1 A 0 A_GiveToTarget("HitBeep",1)
TNT1 A 0 A_Jump(256,"DeathCont")
Goto DeathCont
Death:
TNT1 A 0 A_ChangeFlag("NOINTERACTION",1)
TNT1 A 0 A_Stop
TNT1 A 0 A_SeekerMissile(0,0,SMF_LOOK|SMF_CURSPEED,256)
TNT1 A 0 A_JumpIfTargetInLOS("SplashBeep",360,JLOSF_PROJECTILE,127)
TNT1 A 0 A_Jump(256,"DeathCont")
Goto DeathCont
SplashBeep:
TNT1 A 0 A_GiveToTarget("HitBeep",1)
TNT1 A 0 A_Jump(256,"DeathCont")
Goto DeathCont
DeathCont:
TNT1 A 0 A_CustomMissile("BigIceScatterSpark",0,0,random(0,360),CMF_AIMDIRECTION,random(0,12))
TNT1 A 0 A_CustomMissile("BigIceScatterSpark",0,0,random(0,360),CMF_AIMDIRECTION,random(0,12))
TNT1 A 0 A_CustomMissile("BigIceScatterSpark",0,0,random(0,360),CMF_AIMDIRECTION,random(0,12))
TNT1 A 0 A_CustomMissile("BigIceScatterSpark",0,0,random(0,360),CMF_AIMDIRECTION,random(0,12))
TNT1 A 0 A_CustomMissile("BigIceScatterSpark",0,0,random(0,360),CMF_AIMDIRECTION,random(0,12))
TNT1 A 0 A_CustomMissile("BigIceScatterSpark",0,0,random(0,360),CMF_AIMDIRECTION,random(0,12))
TNT1 A 0 A_CustomMissile("BigIceScatterSpark",0,0,random(0,360),CMF_AIMDIRECTION,random(0,12))
TNT1 A 0 A_CustomMissile("BigIceScatterSpark",0,0,random(0,360),CMF_AIMDIRECTION,random(0,12))
TNT1 A 0 A_CustomMissile("BigIceScatterSpark",0,0,random(0,360),CMF_AIMDIRECTION,random(0,12))
TNT1 A 0 A_CustomMissile("BigIceScatterSpark",0,0,random(0,360),CMF_AIMDIRECTION,random(0,12))
TNT1 A 0 A_CustomMissile("BigIceScatterSpark",0,0,random(0,360),CMF_AIMDIRECTION,random(0,12))
TNT1 A 0 A_CustomMissile("BigIceScatterSpark",0,0,random(0,360),CMF_AIMDIRECTION,random(0,12))
TNT1 A 0 A_CustomMissile("BigIceScatterSpark",0,0,random(0,360),CMF_AIMDIRECTION,random(0,12))
TNT1 A 0 A_CustomMissile("BigIceScatterSpark",0,0,random(0,360),CMF_AIMDIRECTION,random(0,12))
TNT1 A 0 A_CustomMissile("BigIceScatterSpark",0,0,random(0,360),CMF_AIMDIRECTION,random(0,12))
BNT2 A 0 A_PlaySound("imp/shotx")
BNT2 A 0 A_Explode(5, 90, 0)
BNT2 ABCDEF 3 bright
stop
}
}

actor MageIceFallTrail
{

-SOLID
scale 0.4
+NOGRAVITY
+BRIGHT
+CLIENTSIDEONLY
Height 0
Radius 0
renderstyle add
alpha 0.8
States
{
Spawn:
BNT2 G 1 A_FadeOut(0.15)
loop
}
}

actor MageIceFallTrail2 : MageIceFallTrail
{
States
{
Spawn:
BNT2 H 1 A_FadeOut(0.1)
stop
}
}

ACTOR BigIceScatterSpark
{
   Speed 10
   Radius 4
   Height 4
   Scale 0.4
   Gravity 0.3
   PROJECTILE
   +BRIGHT
   -NOGRAVITY
   +DROPOFF 
   +THRUACTORS
   +CLIENTSIDEONLY
   RenderStyle Add
   States
   {
   Spawn:
      PAO3 A 1 Bright
      Loop
   Death:
      TNT1 A 0
	  TNT1 A 0
      PAO3 A 1 bright A_FadeOut(0.1)
      Stop
   }
}

ACTOR IceScatterSpark
{
   Speed 10
   Radius 4
   Height 4
   Scale 0.15
   Gravity 0.3
   PROJECTILE
   +BRIGHT
   -NOGRAVITY
   +DROPOFF 
   +THRUACTORS
   +CLIENTSIDEONLY
   RenderStyle Add
   States
   {
   Spawn:
      PAO3 A 1 Bright
      Loop
   Death:
      TNT1 A 0
	  TNT1 A 0
      PAO3 A 1 bright A_FadeOut(0.1)
      Stop
   }
}

Actor MageVFXIceTrail
{
	RenderStyle Add
	Alpha 0.7
	Scale 0.4
	+NOINTERACTION
	+CLIENTSIDEONLY
	States
	{
	Spawn:
		PAO3 A 1 bright A_FadeOut(0.1)
		Loop
	Death:
		TNT1 A 0
		Stop
	}
}