

ACTOR FreedoomPolaricEW : WEAPON
{
Weapon.Ammouse 2
Weapon.SlotNumber 6
Weapon.UpSound "doomguy/doomswitch"
Weapon.SelectionOrder 100
  Weapon.AmmoGive 40
  Weapon.AmmoType "Cell"
  Inventory.PickupMessage "You got the Polaric Energy Weapon! This oughta show them whose boss!"
  obituary "%o has been frozen by the icy flames of the Polaric Energy."
  Tag "Polaric Energy Weapon"
  Inventory.RestrictedTo "FreedoomGuyClass"
 States
   {
    Ready:
    PEWS A 1 A_WeaponReady
    Loop
    Deselect:
		PEWS A 1 A_Lower
		TNT1 A 0 A_Lower 
		TNT1 A 0 A_Lower 
		Loop
	Select:
		PEWS A 1 A_Raise
		TNT1 A 0 A_Raise 
		TNT1 A 0 A_Raise 
		Loop
   Fire:
		PEWF A 0 Bright A_FireCustomMissile("PolaricFume")
		PEWF A 0 Bright A_PlaySound("Polaric/Fire",1)
		TNT1 A 0 A_Quake(1, 4, 0, 128, "NOSOUND")
		PEWF A 2 A_GunFlash(0, 34)
		PEWF A 1 Offset(0, 34)
		PEWF A 1 Offset(0, 33)
		PEWF A 2 Offset(0, 32)
		TNT1 A 0 A_ReFire
		PEWS BCDEFGGFEDCB 2 
		Goto Ready
   }
}

Actor PolaricFume
{
	Projectile
	Damage 8
	Speed 40
	Radius 13
	Height 8
	Alpha .75
	RenderStyle Add
    DAMAGETYPE "FreezingPlasma"
	DeathType "Ice"
	+NOBLOCKMAP
	+NOGRAVITY
	+DROPOFF
	+MISSILE
	+FORCERADIUSDMG
	+RANDOMIZE

	states
	{
		spawn:
			PEWI A 1 Bright
			PEWI A 1 Bright
			PEWI B 1 Bright A_PlaySound("DSINCBRN",CHAN_AUTO)
			PEWI B 1 Bright
			loop
		death:
			PEWP A 0 Bright A_Jump(128,"deathSound2")
			PEWP A 0 Bright A_PlaySound("Polaric/EXP1")
			TNT1 A 0 a_giveinventory("Spotcripplingslowness",1,aaptr_tracer)
			goto burninate
		deathSound2:
		    PEWP A 0 Bright A_PlaySound("Polaric/EXP1")
			goto burninate
		burninate:
			PEWP I 2 bright A_Explode(6, 64)
			TNT1 A 0 a_giveinventory("Spotcripplingslowness",1,aaptr_tracer)
			TNT1 AAAAAAAA 0 a_spawnitemex("FeshSnowballParticlesbig",0,0,0,random(-5,5),random(-5,5),random(-5,5))
			PEWP J 2 bright
			PEWP I 2 bright
			PEWP J 2 bright A_Explode(6, 64)
			PEWP K 2 bright
			PEWP J 2 bright
			PEWP K 2 bright A_Explode(6, 64)
			PEWP L 2 bright
			PEWP L 2 bright A_Explode(6, 64)
			PEWP M 2 bright
			PEWP L 2 bright
			PEWP M 2 bright A_Explode(6, 64)
			PEWP N 2 bright
			PEWP M 2 bright
			PEWP N 2 bright A_Explode(6, 64)
			PEWP O 2 bright
			PEWP N 2 bright
			PEWP O 2 bright
			PEWP POP 2 bright
			stop
	}
}