// Blaster

ACTOR IDMBlaster : IDMWeapon
{
	Weapon.SelectionOrder 800
	//Weapon.PreferredSkin "PistolMarine"
	Weapon.Ammotype "IDMCell"
	Weapon.Ammouse 2
	Weapon.Ammogive 20
	Inventory.PickupMessage "Blaster! (Slot 2)"
	Tag "Blaster"
	+WEAPON.ALLOW_WITH_RESPAWN_INVUL
	+WEAPON.NOLMS
	States
	{
	Ready:
	  BLAS A 1 A_WeaponReady
	  Loop
	Deselect:
	  TNT1 A 0 A_Lower
	  TNT1 A 0 A_Lower
	  BLAS A 1 A_Lower
	  Loop
	Select:
	  TNT1 A 0 A_PlaySound("weapons/wswitch",CHAN_WEAPON)
	Sloop:
	  TNT1 A 0 A_Raise
	  TNT1 A 0 A_Raise
	  BLAS A 1 A_Raise
	  Loop
	Fire:
	  TNT1 A 0 A_GunFlash
	  TNT1 A 0 A_playsound("weapons/blasterf",CHAN_WEAPON)
	  TNT1 A 0 A_JumpIfInventory("PowerIDMWeaponLevel2",1,"Level2")
	  TNT1 A 0 A_JumpIfInventory("PowerQuadDamage",1,"Quad")
	  BLAS B 5 Bright A_FireCustomMissile("BlasterShot")
	  Goto FireEnd
	Quad:
	  TNT1 A 0 A_Playsound("misc/qdmg",CHAN_AUTO,1)
	  BLAS B 5 Bright A_FireCustomMissile("ExtremeBlasterShot")
	  Goto FireEnd
	Level2:
	  TNT1 A 0 A_JumpIfInventory("PowerQuadDamage",1,"QuadLevel2")
	  TNT1 A 0 A_FireCustomMissile("BlasterShot",-5)
	  TNT1 A 0 A_FireCustomMissile("BlasterShot",5)
	  BLAS B 5 Bright A_FireCustomMissile("BlasterShot")
	  Goto FireEnd
	QuadLevel2:
	  TNT1 A 0 A_Playsound("misc/qdmg",CHAN_AUTO,1)
	  TNT1 A 0 A_FireCustomMissile("ExtremeBlasterShot",-5)
	  TNT1 A 0 A_FireCustomMissile("ExtremeBlasterShot",5)
	  BLAS B 5 Bright A_FireCustomMissile("ExtremeBlasterShot")
	FireEnd:
	  BLAS C 5 Bright
	  BLAS A 4 Bright
	  TNT1 A 0 A_Refire
	  Goto Ready
	Flash:
	  BLAF A 2 A_Light1
	  BLAF A 2 A_Light2
	  Goto LightDone
	Spawn:
	  BLST A -1 Bright
	  Stop
	}
}

ACTOR BlasterShot : ArachnotronPlasma
{
	Speed 65
	Damage (40*random(1,3))
	Deathsound "weapons/blasterx"
	Obituary "%o was zorched by %k's blaster."
	Damagetype "Blaster"
    +SKYEXPLODE
    -NOTELEPORT
	States
	{
	Spawn:
	  BLSB AB 4 Bright
	  Loop
	Death:
	  TNT1 A 0
	  BLSX ABCDE 3 Bright
	  Stop
	}
}

ACTOR ExtremeBlasterShot : BlasterShot
{
	+EXTREMEDEATH
	States
	{
	XDeath:
	  TNT1 A 0 A_Playsound("misc/crit",CHAN_AUTO)
	  BLSX ABCDE 3 Bright
	  Stop
	 }
}