Actor "SapphireWand" : MWeapWand replaces MWeapWand
{
	Tag "Sapphire Wand"
	Weapon.YAdjust 0
	Weapon.Kickback 100
	+UNDROPPABLE
	+NOALERT
	Weapon.SelectionOrder 6
	Weapon.BobStyle InverseSmooth
	Weapon.BobSpeed 2.1
	Weapon.BobRangeY 0.4
	Weapon.BobRangeX 0.5
	States
	{
	Select:
		MWND A 1 A_Raise
		TNT1 A 0 A_Raise
		Loop
		Deselect:
		MWND A 1 A_Lower
		TNT1 A 0 A_Lower
		Loop
	Fire:
		MWND B 1 bright offset(0,33) A_FireCustomMissile ("NewMageWandMissile")
		MWND B 1 bright offset(0,42) A_SetPitch(Pitch-0.25)
		MWND A 1 offset(0,49) A_SetPitch(Pitch+0.125)
		MWND A 1 offset(0,50) A_SetPitch(Pitch+0.125)
		MWND A 1 offset(0,49)
		MWND A 1 offset(0,48)
		MWND A 1 offset(0,47)
		MWND A 1 offset(0,46)
		MWND A 1 offset(0,45)
		MWND A 1 offset(0,43)
		MWND A 1 offset(0,41)
		MWND A 1 offset(0,40)
		MWND A 1 offset(0,37)
		MWND A 1 offset(0,35)
		MWND A 0 offset(0,35)
		MWND A 0 offset(0,35) a_refire
		goto ready
	AltFire:
		MWND A 6
		MWND B 1 Bright Offset (0, 33) A_FireCustomMissile ("NewMageWandMissile", frandom(-6,6))
		MWND B 1 bright offset(0,40) A_SetPitch(Pitch-0.25)
		MWND A 1 offset(0,38) A_SetPitch(Pitch+0.125)
		MWND A 1 offset(0,35) A_SetPitch(Pitch+0.125)
		MWND B 1 Bright Offset (0, 33) A_FireCustomMissile ("NewMageWandMissile", frandom(-6,6))
		MWND B 1 bright offset(0,41) A_SetPitch(Pitch-0.25)
		MWND A 1 offset(0,38) A_SetPitch(Pitch+0.125)
		MWND A 1 offset(0,35) A_SetPitch(Pitch+0.125)
		MWND B 1 Bright Offset (0, 33) A_FireCustomMissile ("NewMageWandMissile", frandom(-6,6))
		MWND B 1 bright offset(0,42) A_SetPitch(Pitch-0.25)
		MWND A 1 offset(0,49) A_SetPitch(Pitch+0.125)
		MWND A 1 offset(0,50) A_SetPitch(Pitch+0.125)
		MWND A 1 offset(0,49)
		MWND A 1 offset(0,48)
		MWND A 1 offset(0,47)
		MWND A 1 offset(0,46)
		MWND A 1 offset(0,45)
		MWND A 1 offset(0,43)
		MWND A 1 offset(0,41)
		MWND A 1 offset(0,40)
		MWND A 1 offset(0,37)
		MWND A 1 offset(0,35)
		MWND A 0 offset(0,35)
		MWND A 0 offset(0,35) a_refire
		Goto Ready
	}
}

ACTOR NewMageWandMissile : MageWandMissile Replaces MageWandMissile
{
	Radius 1
	Height 1
	Renderstyle Add
	Damage (ACS_NamedExecuteWithResult("WOC Player Scale", FRandom(2,16), INTELLECT, 0, WOCTARGET))
	Damagetype "Arcane"
	+MTHRUSPECIES +NODAMAGETHRUST
	+SPAWNSOUNDSOURCE
	+DONTBLAST
	MissileHeight 8
	States
	{
	Spawn:
		MWND CCCCDDDD 1 Bright A_AlertMonsters(64)
		Loop
	Death:
		MWND E 4 Bright A_AlertMonsters(64)
		MWND F 3 Bright
		MWND G 4 Bright
		MWND H 3 Bright
		MWND I 4 Bright
		Stop
	}
}

Actor NewMageWandSmoke : MageWandSmoke Replaces MageWandSmoke
{
	+NOBLOCKMAP
	+NOGRAVITY
	+SHADOW
	+NOTELEPORT
	+CANNOTPUSH
	+NODAMAGETHRUST
	+CLIENTSIDEONLY +DONTBLAST
	+NOINTERACTION
	RenderStyle Add
	Alpha 0.6
	Scale 0.8
	States
	{
	Spawn:
		MWND C 0
		MWND C 0 A_Jump (80, "Spawn1", "Spawn2")
	Spawn1:
		MWND CCCC 1 BRIGHT A_FadeOut(0.05)
	Spawn2:
		MWND DDDD 1 BRIGHT A_FadeOut(0.05)
		Goto Spawn1
	}
}