ACTOR Blood64 : Blood Replaces Blood
{
  Mass 5
  +NOBLOCKMAP
  +NOTELEPORT
  -ALLOWPARTICLES
  XScale .8
  YScale .7
  States
  {
  Spawn:
    BLUD ABC 8
    Stop
  Spray:
    SPRY ABCDEF 3
    SPRY G 2
    Stop
  }
}

ACTOR BulletPuff64 : BulletPuff replaces BulletPuff
{
  Alpha 1
  Renderstyle Normal
  XScale .8
  YScale .7
  -ALLOWPARTICLES
  States
  {
  Spawn:
    PUFF AB 4 Bright
  Melee:
    PUFF CDEF 4
	Stop
	}
}

ACTOR ChainsawPuff : BulletPuff
{
    -ALLOWPARTICLES
	+PUFFONACTORS
    XScale .8
    YScale .7
    States
    {
    Spawn:
      TNT1 A 0
      TNT1 A 1 A_SpawnItem("ChainsawSound")
	  Stop
    Melee:
      TNT1 A 0
      TNT1 A 1 A_SpawnItem("ChainsawSound")
	  Stop
    Crash:
      PUFF AB 4 Bright
      PUFF CDEF 4
	  Stop
    }
}

ACTOR ChainsawSound
{
  +NOCLIP
  +CLIENTSIDEONLY
  +NOINTERACTION
  States
  {
  Spawn:
    TNT1 A 0
    TNT1 A 1 A_PlaySound("weapons/sawhit")
    Stop
  }
}

ACTOR Fist64 : Weapon
{
	Weapon.SelectionOrder 3700
	Weapon.Kickback 100
	Obituary "$OB_MPFIST"
	+WEAPON.WIMPY_WEAPON
	+WEAPON.MELEEWEAPON
	+WEAPON.ALLOW_WITH_RESPAWN_INVUL
    XScale .8
    YScale .7
    +INVENTORY.UNDROPPABLE
	States
	{
	Ready:
		PUNG A 1 A_WeaponReady
		Loop
	Deselect:
		PUNG A 1 A_Lower
		Loop
	Select:
		PUNG A 1 A_Raise
		Loop
	Fire:
		PUNG B 5
		PUNG C 4 A_Punch
		PUNG D 5
		PUNG C 4
		PUNG B 5 A_ReFire
		Goto Ready
	}
}

ACTOR Pistol64 : DoomWeapon Replaces Pistol
{
	Weapon.SelectionOrder 1900
	Weapon.AmmoUse 1
	Weapon.AmmoGive 20
	Weapon.AmmoType "Clip64"
	Obituary "$OB_MPPISTOL"
	+WEAPON.WIMPY_WEAPON
	+WEAPON.ALLOW_WITH_RESPAWN_INVUL
	Inventory.Pickupmessage "$PICKUP_PISTOL_DROPPED"
	Attacksound "weapons/pistol"
    XScale .8
    YScale .7
    +INVENTORY.UNDROPPABLE
	States
	{
	Ready:
		PISG A 1 A_WeaponReady
		Loop
	Deselect:
		PISG A 1 A_Lower
		Loop
	Select:
		PISG A 1 A_Raise
		Loop
	Fire:
		PISG C 6 A_FirePistol
		PISG B 7
		PISG A 1 A_ReFire
		Goto Ready
	Flash:
		PISG D 3 Bright
		Goto LightDone
		PISG D 3 Bright
		Goto LightDone
 	Spawn:
		PIST A -1
		Stop
	}
}

ACTOR Chainsaw64 : Weapon Replaces Chainsaw
{
	Weapon.Kickback 0
	Weapon.SelectionOrder 2200
	Weapon.ReadySound "weapons/sawidle"
	Inventory.PickupMessage "$GOTCHAINSAW"
	Obituary "$OB_MPCHAINSAW"
	+WEAPON.MELEEWEAPON		
	+WEAPON.ALLOW_WITH_RESPAWN_INVUL
    XScale .8
    YScale .7
	States
	{
	Ready:
		SAWG AB 5 A_WeaponReady
		Loop
	Deselect:
		SAWG A 1 A_Lower
		Loop
	Select:
	    SAWG A 0 A_PlaySound("weapons/sawup",1)
		SAWG A 1 A_Raise
		Goto Select+1
	Fire:
		SAWG CD 3 A_Saw("weapons/sawfull","jackfuckingshit",2,"ChainsawPuff")
		SAWG D 0 A_ReFire
		Goto Ready
	Spawn:
		CSAW A -1
		Stop
	}
}

ACTOR Shotgun64 : DoomWeapon Replaces Shotgun
{
	Weapon.SelectionOrder 1300
	Weapon.AmmoUse 1
	Weapon.AmmoGive 8
	Weapon.AmmoType "Shell64"
	Inventory.PickupMessage "$GOTSHOTGUN"
	Obituary "$OB_MPSHOTGUN"
	Attacksound "weapons/shotgf"
    XScale .8
    YScale .7
	States
	{
	Ready:
		SHT1 A 1 A_WeaponReady
		Loop
	Deselect:
		SHT1 A 1 A_Lower
		Loop
	Select:
		SHT1 A 1 A_Raise
		Loop
	Fire:
		SHT1 A 3
		SHT1 A 0 A_FireShotgun
	    SHT1 B 0 A_SetPitch(pitch-6)
	    SHT1 B 1 A_SetPitch(pitch+1)
	    SHT1 B 1 A_SetPitch(pitch+1)
	    SHT1 B 1 A_SetPitch(pitch+1)
	    SHT1 B 1 A_SetPitch(pitch+1)
	    SHT1 B 1 A_SetPitch(pitch+1)
	    SHT1 B 1 A_SetPitch(pitch+1)
		SHT1 B 15
		SHT1 C 6
		SHT1 A 6
		SHT1 A 7 A_ReFire
		Goto Ready
	Flash:
		SHT1 D 3 Bright
		Goto LightDone
	Spawn:
		SHOT A -1
		Stop
	}
}	

ACTOR SuperShotgun64 : DoomWeapon Replaces SuperShotgun
{
	Weapon.SelectionOrder 400
	Weapon.AmmoUse 2
	Weapon.AmmoGive 8
	Weapon.AmmoType "Shell64"
	Inventory.PickupMessage "$GOTSHOTGUN2"
	Obituary "$OB_MPSSHOTGUN"
	Attacksound "weapons/sshotf"
    XScale .8
    YScale .7
	States
	{
	Ready:
		SHT2 A 1 A_WeaponReady
		Loop
	Deselect:
		SHT2 A 1 A_Lower
		Loop
	Select:
		SHT2 A 1 A_Raise
		Loop
	Fire:
	    SHT2 A 0 A_Recoil(1.5)
		SHT2 A 0 A_FireShotgun2
	    SHT2 A 1 A_SetPitch(pitch-4)
		SHT2 A 1 A_SetPitch(pitch+2)
		SHT2 A 1 A_SetPitch(pitch+2)
		SHT2 B 33 A_CheckReload
		SHT2 B 6 A_PlayWeaponSound("weapons/sshoto")
		SHT2 C 6 A_PlayWeaponSound("weapons/sshotc")
		SHT2 A 2 
		SHT2 A 5 A_ReFire
		Goto Ready
	Flash:
		SHT2 D 3 Bright
		Goto LightDone
	Spawn:
		SGN2 A -1
		Stop
	}
}

ACTOR HeavyDoubleShotgun : DoomWeapon 21357
{
  Weapon.SelectionOrder 500
  Weapon.AmmoUse 2
  Weapon.AmmoGive 8
  Weapon.AmmoType "Shell64"
  Inventory.PickupMessage "You got the Heavy double shotgun!"
  States
  {
  Ready:
    DOUB A 1 A_WeaponReady
    Loop
  Deselect:
    DOUB A 1 A_Lower
    Loop
  Select:
    DOUB A 1 A_Raise
    Loop
  Fire:
    DOUB A 3
    DOUB C 0 A_Playsound("DSDUPER")
    DOUB C 6 A_FireBullets (11.2, 7.1, 20, 10, "BulletPuff")
    DOUB B 5
    DOUB D 1 A_CheckReload
    DOUB D 4 A_OpenShotgun2
    DOUB EFG 4
    DOUB H 4 A_LoadShotgun2
    DOUB IJK 3
    DOUB K 3 A_Playsound("weapons/sshotc")
    DOUB LD 3 
    DOUB A 4 A_ReFire
    Goto Ready
  Flash:
    Goto LightDone
  Spawn:
    DGUN A -1
    Stop
  }
}

ACTOR STMinigun : Minigun REPLACES Minigun
{
	Weapon.AmmoUse 1
	Weapon.AmmoGive 20
	Weapon.AmmoType "Clip64"
	Weapon.Selectionorder 700
	Weapon.Kickback 100
	Inventory.PickupMessage "$PICKUP_MINIGUN"
	Obituary "$OB_MINIGUN"
	AttackSound "weapons/minigun"
	SpawnID 214
	Radius 20
	Height 16
	States
	{
	Spawn:
		MNGN A -1
		Loop
	Ready:
		MNGG A 1 A_WeaponReady
		Loop
	Deselect:
		MNGG A 1 A_Lower
		Loop
	Select: 
		MNGG A 1 A_Raise 
		Loop 
	Fire: 
		MNGG A 0 A_GunFlash
		MNGG A 2 A_FireBullets(5.6, 0, 1, 5, "BulletPuff")
		MNGG B 2 A_FireBullets(5.6, 0, 1, 5, "BulletPuff")
		MNGG A 2 A_ReFire
		MNGG B 2
		MNGG A 4
		MNGG B 4
		MNGG A 8
		MNGG B 8
		goto Ready 
	Flash: 
		MNGF A 3 BRIGHT A_Light1 
		MNGF B 3 BRIGHT A_Light0
		Stop 
	}
}

ACTOR Chaingun64 : DoomWeapon Replaces Chaingun
{
	Weapon.SelectionOrder 700
	Weapon.AmmoUse 1
	Weapon.AmmoGive 20
	Weapon.AmmoType "Clip64"
	Inventory.PickupMessage "$GOTCHAINGUN"
	Obituary "$OB_MPCHAINGUN"
	Attacksound ""
    XScale .8
    YScale .7
	States
	{
	Ready:
	    CHGG A 0 A_TakeInventory("ChaingunSound",2)
		CHGG A 1 A_WeaponReady
		goto Ready+1
	Deselect:
	    CHGG A 0 A_TakeInventory("ChaingunSound",2)
		CHGG A 1 A_Lower
		goto Deselect+1
	Select:
	    CHGG A 0 A_TakeInventory("ChaingunSound",2)
		CHGG A 1 A_Raise
		goto Select+1
	Fire:
	    CHGG A 0 A_JumpIfInventory("ChaingunSound",2,"Fire3")
	    CHGG A 0 A_JumpIfInventory("ChaingunSound",1,"Fire2")
	    CHGG A 0 A_GiveInventory("ChaingunSound",1)
		CHGG A 0 A_PlaySound("weapons/chngun2",5)
		CHGG A 0 A_GunFlash
		CHGG A 0 A_FireBullets(5.6, 0, 1, 5, "BulletPuff")
	    CHGG A 1 A_SetPitch(pitch-2)
	    CHGG A 1 A_SetPitch(pitch+1)
	    CHGG A 2 A_SetPitch(pitch+1)
		CHGG B 0 A_FireBullets(5.6, 0, 1, 5, "BulletPuff")
	    CHGG B 1 A_SetPitch(pitch-2)
	    CHGG B 1 A_SetPitch(pitch+1)
	    CHGG B 1 A_SetPitch(pitch+1)
		CHGG B 0 A_ReFire
		Goto Ready
	Fire2:
	    CHGG A 0 A_GiveInventory("ChaingunSound",1)
		CHGG A 0 A_PlaySound("weapons/chngun2",6)
		CHGG A 0 A_GunFlash
		CHGG A 0 A_FireBullets(5.6, 0, 1, 5, "BulletPuff")
	    CHGG A 1 A_SetPitch(pitch-2)
	    CHGG A 1 A_SetPitch(pitch+1)
	    CHGG A 2 A_SetPitch(pitch+1)
		CHGG B 0 A_FireBullets(5.6, 0, 1, 5, "BulletPuff")
	    CHGG B 1 A_SetPitch(pitch-2)
	    CHGG B 1 A_SetPitch(pitch+1)
	    CHGG B 1 A_SetPitch(pitch+1)
		CHGG B 0 A_ReFire
		Goto Ready
	Fire3:
	    CHGG A 0 A_TakeInventory("ChaingunSound",2)
		CHGG A 0 A_PlaySound("weapons/chngun2",7)
		CHGG A 0 A_GunFlash
		CHGG A 0 A_FireBullets(5.6, 0, 1, 5, "BulletPuff")
	    CHGG A 1 A_SetPitch(pitch-2)
	    CHGG A 1 A_SetPitch(pitch+1)
	    CHGG A 2 A_SetPitch(pitch+1)
		CHGG B 0 A_FireBullets(5.6, 0, 1, 5, "BulletPuff")
	    CHGG B 1 A_SetPitch(pitch-2)
	    CHGG B 1 A_SetPitch(pitch+1)
	    CHGG B 1 A_SetPitch(pitch+1)
		CHGG B 0 A_ReFire
		Goto Ready
	Flash:
		CHGG C 3 Bright
		TNT1 A 1
		CHGG D 2 Bright
		Goto LightDone
	Spawn:
		MGUN A -1
		Stop
	}
}

ACTOR ChaingunSound : Inventory
{
  +INVENTORY.ALWAYSPICKUP
  Inventory.Amount 1
  Inventory.MaxAmount 2
  -INVENTORY.INVBAR
  +INVENTORY.UNDROPPABLE
  States
  {
  Spawn:
    TNT1 A -1
    stop
  }
}

ACTOR RocketLauncher64 : DoomWeapon Replaces Rocketlauncher
{
	Weapon.SelectionOrder 2500
	Weapon.AmmoUse 1
	Weapon.AmmoGive 2
	Weapon.AmmoType "RocketAmmo64"
	+WEAPON.NOAUTOFIRE
	Inventory.PickupMessage "$GOTLAUNCHER"
    XScale .8
    YScale .7
	States
	{
	Ready:
		ROCK A 1 A_WeaponReady
		Loop
	Deselect:
		ROCK A 1 A_Lower
		Loop
	Select:
		ROCK A 1 A_Raise
		Loop
	Fire:
		ROCK B 8 A_GunFlash
		ROCK B 0 A_Recoil(0.5)
		ROCK B 0 A_FireCustomMissile("Rocket64",0,1,0,-2,0,0)
	    ROCK B 1 A_SetPitch(pitch-4)
	    ROCK B 1 A_SetPitch(pitch+2)
	    ROCK B 10 A_SetPitch(pitch+2)
		ROCK B 0 A_ReFire
		Goto Ready
	Flash:
		ROCK C 3 Bright
		ROCK D 4 Bright
		ROCK EF 4 Bright
		Goto LightDone
	Spawn:
		LAUN A -1
		Stop
	}
}

actor Rocket64 : Rocket replaces Rocket
{
  Radius 11
  Height 8
  Speed 20
  Damage 20
  Projectile
  +RANDOMIZE
  +NOBLOCKMONST
  -DEHEXPLOSION
  -ROCKETTRAIL
  SeeSound "weapons/rocklf"
  DeathSound "weapons/rocklx"
  XScale .8
  YScale .7
  States
  {
  Spawn:
    MISL A 3 bright A_SpawnItem("RocketSmoke64")
	Loop
  Death:
		MISL B 0 Bright A_Explode(128,155)
		MISL B 8 Bright A_SetTranslucent(0.7,0)
		MISL C 6 Bright A_SetTranslucent(0.5,0)
		MISL D 4 Bright A_SetTranslucent(0.4,0)
		MISL E 3 Bright A_SetTranslucent(0.3,0)
		MISL F 2 Bright
		Stop
  }
}

actor RocketSmoke64
{
  +NOBLOCKMAP
  +NOGRAVITY
  +NOTELEPORT
  XScale .8
  YScale .7
  RenderStyle Translucent 
  Alpha 0.7
  States
  {	
  Spawn:
    PUF2 ABCDE 3 Bright
    Stop
  }
}

ACTOR STGrenadeLauncher : GrenadeLauncher REPLACES GrenadeLauncher
{
	SpawnID 163
	Radius 20
	Height 16
	Weapon.Selectionorder 2600
	+WEAPON.NOAUTOFIRE
	+WEAPON.NOAUTOAIM
	Weapon.AmmoUse 1
	Weapon.AmmoGive 2
	Weapon.AmmoType "RocketAmmo64"
	Weapon.Kickback 100
	Inventory.PickupMessage "$PICKUP_GRENADELAUNCHER"

	States
	{
	Spawn:
		GLAU A -1
		stop
	Ready:
		GRLG A 1 A_WeaponReady
		loop
	Deselect:
		GRLG A 1 A_Lower
		loop
	Select: 
		GRLG A 1 A_Raise
		loop
	Fire: 
		GRLG B 8 A_GunFlash
		GRLG B 12 A_FireCustomMissile ( "Grenade", 0, 1, 0, 0, 0, 6.328125 )
		GRLG B 0 A_ReFire
		goto Ready 
	Flash: 
		GRLF A	3 bright A_Light1
		GRLF B	4 bright
		GRLF C 4 bright A_Light2
		GRLF D 4 bright A_Light2
		Goto LightDone
	}
}

ACTOR PlasmaRifle64 : DoomWeapon Replaces Plasmarifle
{
	Weapon.SelectionOrder 100
	Weapon.AmmoUse 1
	Weapon.AmmoGive 40
	Weapon.AmmoType "Cell64"
	Inventory.PickupMessage "$GOTPLASMA"
    XScale .8
    YScale .7
	States
	{
	Ready:
	    PLAS A 0 A_PlaySound("weapons/plasmagunidleloop",1,1.0,1)
		PLAS AAABBBCCC 1 A_WeaponReady
		Goto Ready+1
	Deselect:
	    PLAS A 0 A_StopSound(1)
		PLAS A 1 A_Lower
		Loop
	Select:
		PLAS A 1 A_Raise
		Loop
	Fire:
	    PLAS D 0 A_GunFlash
		PLAS D 3 Bright A_FireCustomMissile("PlasmaBall64",0,1,0,-5,0,0)
		PLAS C 2
		PLAS E 1 A_ReFire
		Goto Ready
	Flash:
		DIXX A 1 Bright
		Goto LightDone
		DIXX A 1 Bright
		Goto LightDone
	Spawn:
		PLSM A -1
		Stop
	}
}

ACTOR PlasmaBall64 : PlasmaBall replaces PlasmaBall
{
  Speed 30
  Damage 5
  Projectile
  +RANDOMIZE
  RenderStyle Normal
  Alpha 1
  XScale .8
  YScale .7
  SeeSound "weapons/plasmaf"
  DeathSound "weapons/plasmax"
  States
  {
  Spawn:
    PLSS AB 6 Bright
    Loop
  Death:
    PLSS CD 2 Bright
    PLSS EFGH 3 Bright
    Stop
  }
}

ACTOR STRailGun : RailGun REPLACES RailGun
{
	SpawnID 164
	Radius 20
	Height 16
	Weapon.Selectionorder 200
	Weapon.AmmoUse 10
	Weapon.AmmoGive 40
	Weapon.AmmoType "Cell64"
	Inventory.Pickupmessage "$PICKUP_RAILGUN"
	Obituary "$OB_RAILGUN"
	States
	{
	Ready:
		RLGG A 1 A_WeaponReady
		loop
	Deselect:
		RLGG A 1 A_Lower
		loop
	Select:
		RLGG A 1 A_Raise
		loop
	Fire:
		RLGG E 12 A_FireRailgun
		RLGG F 6 A_CheckRailReload
		RLGG G 6
		RLGG H 6
		RLGG I 6
		RLGG J 6
		RLGG K 6
		RLGG L 6
		RLGG A 6
		RLGG M 0 A_ReFire
		goto Ready
	Flash:
		TNT1 A 5 bright A_Light1
		TNT1 A 5 bright A_Light2
		TNT1 A 0 bright A_Light0
		Goto LightDone
	Spawn:
		RAIL A -1
		stop
	}
}

ACTOR BFG900064 : DoomWeapon Replaces BFG9000
{
	Weapon.SelectionOrder 2800
	Weapon.AmmoUse 40
	Weapon.AmmoGive 40
	Weapon.AmmoType "Cell64"
	+WEAPON.NOAUTOFIRE
	+WEAPON.NOLMS
	Inventory.PickupMessage "$GOTBFG9000"
    XScale .8
    YScale .7
	States
	{
	Ready:
		BFGG A 1 A_WeaponReady
		Loop
	Deselect:
		BFGG A 1 A_Lower
		Loop
	Select:
		BFGG A 1 A_Raise
		Loop
	Fire:
		BFGG A 14 A_BFGsound
		BFGG A 6 A_GunFlash
		BFGG B 10
		BFGG B 0 A_SetBlend("00 FF 00",0.3,6)
		BFGG B 15 A_FireCustomMissile("BFGBall64",0,1,0,-6,0,0)
		BFGG B 20 A_ReFire
		Goto Ready
	Flash:
		BFGG C 6 Bright 
		BFGG D 5 Bright
		BFGG E 6 Bright
		Goto LightDone
	Spawn:
		BFUG A -1
		Stop
	}
}

ACTOR BFGBall64 : BFGBall replaces BFGBall
{
  Speed 30
  Damage 100
  Projectile
  +RANDOMIZE
  RenderStyle Normal
  Alpha 1
  XScale .8
  YScale .7
  DeathSound "weapons/bfgx"
  States
  {
  Spawn:
    BFS1 AB 4 Bright
    Loop
  Death:
    BFS1 C 8 Bright A_SetTranslucent(0.7,0)
	BFS1 D 8 Bright A_SetTranslucent(0.6,0)
    BFS1 E 4 Bright A_BFGSpray
    BFS1 F 4 Bright A_SetTranslucent(0.5,0)
	BFS1 G 4 Bright
	BFS1 H 4 Bright A_SetTranslucent(0.4,0)
    Stop
  }
}

ACTOR BFGExtra64 : BFGExtra replaces BFGExtra
{
  +NOBLOCKMAP
  +NOGRAVITY
  RenderStyle Normal
  Alpha 1
  XScale .8
  YScale .7
  DamageType "BFGSplash"
  States
  {
  Spawn:
    BFE2 ABCDEF 4 Bright
    Stop
  }
}

ACTOR STBFG10K : BFG10K REPLACES BFG10K
{
	SpawnID 165
	Radius 20
	Height 20
	Weapon.Selectionorder 2900
	Weapon.AmmoUse 5
	Weapon.AmmoGive 40
	Weapon.AmmoType "Cell64"
	Weapon.Kickback 100
	Inventory.Pickupmessage "$PICKUP_BFG10K"
	+WEAPON.NOAUTOFIRE
	+WEAPON.NOLMS
	States
	{
	Spawn:
		BFG2 A -1
		stop
	Ready:
		BG2G A 0 A_PlaySound ("weapons/bfg10kidle")
		BG2G A 1 A_WeaponReady
		BG2G A 1 A_WeaponReady
		BG2G A 1 A_WeaponReady
		BG2G B 1 A_WeaponReady
		BG2G B 1 A_WeaponReady
		BG2G B 1 A_WeaponReady
		BG2G C 1 A_WeaponReady
		BG2G C 1 A_WeaponReady
		BG2G C 1 A_WeaponReady
		BG2G D 1 A_WeaponReady
		BG2G D 1 A_WeaponReady
		BG2G D 1 A_WeaponReady
		loop
	Deselect:
		BG2G E 1 A_Lower
		loop
	Select:
		BG2G E 1 A_Raise
		loop
	Fire:
		BG2G E 20 A_PlaySound ("weapons/bfg10kf")
		BG2G F 4
		BG2G G 1
		BG2G H 1
		BG2G I 1
		BG2G J 1
		goto Hold
	Hold:
		BG2G K 2 A_GunFlash
		BG2G L 2 A_FireBullets(0,0,1,0,"BFG10kShot")
		BG2G M 2
		BG2G N 0 A_ReFire
		BG2G O 35 A_PlaySound ("weapons/bfg10kcool")
		goto Ready
	Flash:
		TNT1 A 2 bright A_Light1
		TNT1 A 3 bright
		Goto LightDone
		stop
	}
}

ACTOR Unmaker64 : DoomWeapon
{
	Weapon.SelectionOrder 1000
	Weapon.AmmoUse 1
	Weapon.AmmoGive 40
	Weapon.AmmoType "Cell64"
	Inventory.PickupMessage "What the !@#% is this!"
    XScale .8
    YScale .7
	States
	{
	Ready:
	    LASR A 0 A_TakeInventory("UnMakerFiredOrder",3)
		LASR AAA 3 A_WeaponReady
		goto Ready+1
	Deselect:
		LASR A 1 A_Lower
		Loop
	Select:
		LASR A 1 A_Raise
		Loop
	Fire: // no artifacts
	    LASR A 0 A_PlayWeaponSound("Weapons/Unmaker")
		LASR A 0 A_GunFlash
		LASR A 0 A_JumpIfInventory("Artifact1",1,"Fire1")
		LASR A 0 A_JumpIfInventory("Artifact2",1,"Fire2")
		LASR A 0 A_JumpIfInventory("Artifact3",1,"Fire3")
		LASR A 5 A_FireCustomMissile("UnmakerProjectile",0,1,0,0,0,0)
		LASR A 5
		LASR A 1 A_ReFire
		Goto Ready
	Fire1: // artifact 1
	    LASR A 0 A_JumpIfInventory("Artifact2",1,"Fire4")
		LASR A 0 A_JumpIfInventory("Artifact3",1,"Fire5")
		LASR A 3 A_FireCustomMissile("UnmakerProjectile",0,1,0,0,0,0)
		LASR A 2
		LASR A 1 A_ReFire
		Goto Ready
	Fire2: // artifact 2
	    LASR A 0 A_JumpIfInventory("Artifact1",1,"Fire4")
		LASR A 0 A_JumpIfInventory("Artifact3",1,"Fire6")
		LASR A 3 A_FireCustomMissile("UnmakerProjectile",0,1,0,0,0,0)
		LASR A 2
		LASR A 1 A_ReFire
		Goto Ready
	Fire3: // artifact 3
	    LASR A 0 A_JumpIfInventory("Artifact1",1,"Fire5")
		LASR A 0 A_JumpIfInventory("Artifact2",1,"Fire6")
		LASR A 3 A_FireCustomMissile("UnmakerProjectile",0,1,0,0,0,0)
		LASR A 2
		LASR A 1 A_ReFire
		Goto Ready
	Fire4: // artifacts 1 and 2
		LASR A 0 A_JumpIfInventory("Artifact3",1,"Fire7")
		LASR A 0 A_FireCustomMissile("UnmakerProjectile",-2,1,0,0,0,0)
		LASR A 2 A_FireCustomMissile("UnmakerProjectile",2,1,0,0,0,0)
		LASR A 2
		LASR A 1 A_ReFire
		Goto Ready
	Fire5: // artifacts 1 and 3
		LASR A 0 A_JumpIfInventory("Artifact2",1,"Fire7")
		LASR A 0 A_FireCustomMissile("UnmakerProjectile",-2,1,0,0,0,0)
		LASR A 2 A_FireCustomMissile("UnmakerProjectile",2,1,0,0,0,0)
		LASR A 2
		LASR A 1 A_ReFire
		Goto Ready
	Fire6: // artifacts 2 and 3
		LASR A 0 A_JumpIfInventory("Artifact1",1,"Fire7")
		LASR A 0 A_FireCustomMissile("UnmakerProjectile",-2,1,0,0,0,0)
		LASR A 2 A_FireCustomMissile("UnmakerProjectile",2,1,0,0,0,0)
		LASR A 2
		LASR A 1 A_ReFire
		Goto Ready
	Fire7: // all artifacts
		LASR A 0 A_JumpIfInventory("UnMakerFiredOrder",3,"Fire10")
		LASR A 0 A_JumpIfInventory("UnMakerFiredOrder",2,"Fire9")
		LASR A 0 A_JumpIfInventory("UnMakerFiredOrder",1,"Fire8")
		LASR A 0 A_FireCustomMissile("UnmakerProjectile",-2,1,0,0,0,0)
		LASR A 0 A_FireCustomMissile("UnmakerProjectile",0,1,0,0,0,0)
		LASR A 2 A_FireCustomMissile("UnmakerProjectile",2,1,0,0,0,0)
		LASR A 2 A_GiveInventory("UnMakerFiredOrder",1)
		LASR A 1 A_ReFire
		Goto Ready
	Fire8:
		LASR A 0 A_FireCustomMissile("UnmakerProjectile",-4,1,0,0,0,0)
		LASR A 0 A_FireCustomMissile("UnmakerProjectile",0,1,0,0,0,0)
		LASR A 2 A_FireCustomMissile("UnmakerProjectile",4,1,0,0,0,0)
		LASR A 2 A_GiveInventory("UnMakerFiredOrder",1)
		LASR A 1 A_ReFire
		Goto Ready
	Fire9:
		LASR A 0 A_FireCustomMissile("UnmakerProjectile",-6,1,0,0,0,0)
		LASR A 0 A_FireCustomMissile("UnmakerProjectile",0,1,0,0,0,0)
		LASR A 2 A_FireCustomMissile("UnmakerProjectile",6,1,0,0,0,0)
		LASR A 2 A_GiveInventory("UnMakerFiredOrder",1)
		LASR A 1 A_ReFire
		Goto Ready
	Fire10:
		LASR A 0 A_FireCustomMissile("UnmakerProjectile",-8,1,0,0,0,0)
		LASR A 0 A_FireCustomMissile("UnmakerProjectile",0,1,0,0,0,0)
		LASR A 2 A_FireCustomMissile("UnmakerProjectile",8,1,0,0,0,0)
		LASR A 2 A_TakeInventory("UnMakerFiredOrder",3)
		LASR A 1 A_ReFire
		Goto Ready
    Flash:
		LASR B 3 Bright 
		Goto LightDone
	Spawn:
		LSRG A -1
		Stop
	}
}

ACTOR UnMakerProjectile : MageWandMissile
{
  Alpha 1
  Renderstyle Normal
  -RIPPER
  Speed 234
  Damage 10
  Scale .75
  States
  {
  Spawn:
    LASS Z -1 bright
	stop
  Death:
    LASS AB 4 Bright A_FadeOut(0.1)
	Loop
	}
}

ACTOR UnMakerTrail : MageWandSmoke replaces MageWandSmoke
{
  Alpha 1
  Renderstyle Normal
  Scale .375
  States
  {
  Spawn:
	LASS CD 2 Bright A_FadeOut(0.375)
	Loop
	}
}

ACTOR Artifact1 : Inventory
{
  Inventory.Icon ART1A0
  Inventory.PickupMessage "You have a feeling that it wasn't to be touched..."
  XScale .8
  YScale .7
  Inventory.Amount 1
  Inventory.MaxAmount 1
  -INVENTORY.INVBAR
  States
  {
  Spawn:
    ART1 ABCDEDCB 4 Bright
    Loop
  }
}

ACTOR Artifact2 : Inventory
{
  Inventory.Icon ART2A0
  Inventory.PickupMessage "Whatever it is, it doesn't belong in this world..."
  XScale .8
  YScale .7
  Inventory.Amount 1
  Inventory.MaxAmount 1
  -INVENTORY.INVBAR
  States
  {
  Spawn:
    ART2 ABCDEDCB 4 Bright
    Loop
  }
}

ACTOR Artifact3 : Inventory
{
  Inventory.Icon ART3A0
  Inventory.PickupMessage "It must do something..."
  XScale .8
  YScale .7
  Inventory.Amount 1
  Inventory.MaxAmount 1
  -INVENTORY.INVBAR
  States
  {
  Spawn:
    ART3 ABCDEDCB 4 Bright
    Loop
  }
}

ACTOR UnMakerFiredOrder : Inventory
{
  +INVENTORY.ALWAYSPICKUP
  Inventory.Amount 1
  Inventory.MaxAmount 3
  -INVENTORY.INVBAR
  +INVENTORY.UNDROPPABLE
  States
  {
  Spawn:
    TNT1 A -1
    stop
  }
}

ACTOR UnmakerSpawner : RandomSpawner
{
DropItem "Unmaker64" 255 1
}
