ACTOR SD64_SuperShotgun : SuperShotgun replaces SuperShotgun
{
	Yscale 0.70
	XScale 0.75
	States
	{
	Hold:
		TNT1 A 0
		goto Fire
	Fire:
		SHT2 A 3
		SHT2 A 0 Radius_Quake(6, 3, 0, 1, 0)
		SHT2 A 0 A_FireBullets(11.2, 7.1, 20, 5, "SSGBulletPuff")
		SHT2 A 0 A_GunFlash
		SHT2 A 0 A_Recoil(2)
		SHT2 A 3 A_SetPitch(pitch-2)
		SHT2 A 1 A_SetPitch (pitch+0.8)
		SHT2 B 2 A_SetPitch (pitch+0.6)
		SHT2 B 1 A_SetPitch (pitch+0.4)
		SHT2 C 2
		SHT2 C 1 A_SetPitch (pitch+0.2)
		SHT2 A 4 A_CheckReload
		
		SHT2 D 1
		SHT2 E 2
		SHT2 F 4
		
		SHT2 G 3 A_PlaySoundEx("weapons/sshoto", "Auto")
		SHT2 H 2
		SHT2 I 2
		SHT2 J 2
		
		SHT2 K 2
		SHT2 L 2
		SHT2 M 1
		
		SHT2 N 2
		SHT2 O 4 A_PlaySoundEx("weapons/sshotl", "Auto")
		SHT2 P 3
		
		SHT2 Q 3
		SHT2 R 2
		SHT2 S 1
		
		SHT2 T 0 A_PlaySoundEx("weapons/sshotc", "Auto")
		SHT2 U 3 A_ReFire
		SHT2 V 3 A_ReFire
		
		SHT2 A 5 A_ReFire
		Goto Ready
	Flash:
		SHT2 X 3 Bright A_Light1
		TNT1 A 1 Bright A_Light2
		Goto LightDone
	}
}

ACTOR SD64_Chaingun : Chaingun replaces Chaingun
{
	Yscale 0.70
	XScale 0.75
	AttackSound ""
	States
	{
	Hold:
		CHGG E 0 A_Jump(232, "Hold2", "Hold3")
		goto Fire
	Hold2:
		CHGG E 0 A_GunFlash
		CHGG E 0 A_PlaySound("weapons/chngun", CHAN_AUTO)
		CHGG E 0 A_FireBullets (5.6, 0, 1, 6, "SD64BulletPuff")
		CHGG E 1 A_SetPitch (pitch-1)
		CHGG F 0 A_SetPitch (pitch+1)
		CHGG FGH 1
		CHGG E 0 A_GunFlash
		CHGG E 0 A_PlaySound("weapons/chngun", CHAN_AUTO)
		CHGG E 0 A_FireBullets (5.6, 0, 1, 6, "SD64BulletPuff")
		CHGG E 1 Offset(2, 34) A_SetPitch (pitch-1)
		CHGG F 0 Offset(2, 34) A_SetPitch (pitch+1)
		CHGG FGH 1 Offset(2, 34)
		CHGG H 0 A_WeaponReady(WRF_NOFIRE)
		CHGG A 1 A_ReFire
		CHGG B 2 A_Weaponready
		CHGG C 3 A_Weaponready
		CHGG D 3 A_Weaponready
		Goto Ready
	Hold3:
		CHGG E 0 A_GunFlash
		CHGG E 0 A_PlaySound("weapons/chngun", CHAN_AUTO)
		CHGG E 0 A_FireBullets (5.6, 0, 1, 6, "SD64BulletPuff")
		CHGG E 1 A_SetPitch (pitch-1)
		CHGG F 0 A_SetPitch (pitch+1)
		CHGG FGH 1
		CHGG E 0 A_GunFlash
		CHGG E 0 A_PlaySound("weapons/chngun", CHAN_AUTO)
		CHGG E 0 A_FireBullets (5.6, 0, 1, 6, "SD64BulletPuff")
		CHGG E 1 Offset(-2, 34) A_SetPitch (pitch-1)
		CHGG F 0 Offset(-2, 34) A_SetPitch (pitch+1)
		CHGG FGH 1 Offset(-2, 34)
		CHGG H 0 A_WeaponReady(WRF_NOFIRE)
		CHGG A 1 A_ReFire
		CHGG B 2 A_Weaponready
		CHGG C 3 A_Weaponready
		CHGG D 3 A_Weaponready
		Goto Ready
	
	Fire:
		CHGG E 0 A_GunFlash
		CHGG E 0 A_PlaySound("weapons/chngun", CHAN_AUTO)
		CHGG E 0 A_FireBullets (5.6, 0, 1, 6, "SD64BulletPuff")
		CHGG E 1 A_SetPitch (pitch-1)
		CHGG F 0 A_SetPitch (pitch+1)
		CHGG FGH 1
		CHGG E 0 A_GunFlash
		CHGG E 0 A_PlaySound("weapons/chngun", CHAN_AUTO)
		CHGG E 0 A_FireBullets (5.6, 0, 1, 6, "SD64BulletPuff")
		CHGG E 1 A_SetPitch (pitch-1)
		CHGG F 0 A_SetPitch (pitch+1)
		CHGG FGH 1
		CHGG A 1 A_ReFire
		CHGG B 2 A_Weaponready
		CHGG C 3 A_Weaponready
		CHGG D 3 A_Weaponready
		Goto Ready
	Flash:
		CHGF A 2 Bright A_Light2
		CHGF B 1 Bright A_Light1
		Goto LightDone
	}
}

actor SD64_ROTTMP40 : Chaingun 17531
{
	Scale 0.5
	Inventory.PickupMessage "You got the hidden Rise of the Triad MP-40!"
	Obituary "%o was perforated by %k's MP-40."
	AttackSound "MP40Fire"
	Tag "MP40"
	States
	{
	Spawn:
		MP4P A -1
		loop
	Select:
		MP40 A 1 A_Raise
		loop
	Deselect:
		MP40 A 1 A_Lower
		loop
	Ready:
		MP40 A 1 A_WeaponReady
		loop
	Hold:
	Fire:
		MP40 B 0 Radius_Quake(2, 2, 0, 1, 0)
		MP40 B 0 BRIGHT A_GunFlash
		MP40 B 1 BRIGHT A_FireBullets (5.6, 0, 1, 6, "SD64BulletPuff")
		MP40 C 2
		MP40 A 1
		MP40 B 0 Radius_Quake(2, 2, 0, 1, 0)
		MP40 B 0 BRIGHT A_GunFlash
		MP40 B 1 BRIGHT A_FireBullets (5.6, 0, 1, 6, "SD64BulletPuff")
		MP40 C 2
		MP40 A 1
		MP40 A 0 A_Refire
		goto Ready
	Flash:
		TNT1 A 2 Bright A_Light2
		TNT1 A 1 Bright A_Light1
		Goto LightDone
	}
}

actor SD64_Chainsaw : Chainsaw replaces Chainsaw
{
  Yscale 0.70
  XScale 0.75
  Weapon.UpSound ""
  +WEAPON.MELEEWEAPON
  States
  {
  Ready:
    SAWG AB 4 A_WeaponReady
    loop
  Deselect:
    SAWG A 1 A_Lower
    loop
  Select:
	SAWG A 0 A_PlaySoundEx("weapons/sawup", "Auto", 0)
    SAWG A 1 A_Raise
    goto Select+1
  Hold:
	TNT1 A 0
	goto Fire
  Fire:
    SAWG CD 2 A_Saw("weapons/sawfull", "weapons/sawhit", 2, "ChainsawPuff")
    SAWG D 0 A_ReFire
    goto Ready
  }
}

ACTOR SD64_Pistol : Pistol replaces Pistol
{
	-WEAPON.ALLOW_WITH_RESPAWN_INVUL
	+WEAPON.NOAUTOFIRE
	States
	{
	Deselect:
		PISG A 1 A_Lower
		PISG AA 0 A_Lower
		Loop
	Select:
		PISG A 1 A_Raise
		PISG AA 0 A_Raise
		Loop
	Fire:
		PISG B 0 A_GunFlash
		PISG B 2 BRIGHT A_FireBullets(2, 2, -1, 5, "SD64BulletPuff")
		PISG E 3
		PISG F 1 A_WeaponReady(WRF_NOBOB)
		PISG F 1 A_WeaponReady(WRF_NOBOB)
		PISG F 2 A_WeaponReady(WRF_NOBOB)
		PISG C 3 
		PISG B 1 A_Refire
		Goto Ready
	Flash:
		TNT1 A 0
		PISG D 2 Bright A_Light1
		Goto LightDone
 	Spawn:
		PIST A -1
		Stop
	}
}

ACTOR SD64_Shotgun : Shotgun replaces Shotgun
{
	Yscale 0.70
	XScale 0.75
	States
	{
	Ready:
		SHT1 A 1 A_WeaponReady
		Loop
	Deselect:
		SHT1 A 1 A_Lower
		SHT1 A 0 A_Lower
		Loop
	Select:
		SHT1 A 1 A_Raise
		SHT1 A 0 A_Raise
		Loop
	Fire:
		SHT1 A 3
		SHT1 A 0 A_GunFlash
		SHT1 A 0 A_FireBullets(5.6, 2, 10, 5, "SD64BulletPuff")
		SHT1 A 2 A_SetPitch (pitch-2)
		SHT1 B 1 A_SetPitch (pitch+0.8)
		SHT1 B 1 A_SetPitch (pitch+0.6)
		SHT1 C 2 A_SetPitch (pitch+0.4)
		SHT1 A 1 A_SetPitch (pitch+0.2)
		SHT1 DE 2
		SHT1 F 1
		SHT1 G 1
		SHT1 H 1
		SHT1 I 2
		SHT1 J 2
		SHT1 K 2 //
		SHT1 J 2
		SHT1 I 2
		SHT1 H 1
		SHT1 G 1
		SHT1 F 1
		SHT1 ED 2
		SHT1 A 3
		SHT1 A 7 A_ReFire
		Goto Ready
	Flash:
		SHT1 L 2 Bright A_Light2
		TNT1 A 1 Bright A_Light1
		Goto LightDone
	}
}

ACTOR SD64_PlasmaRifle : PlasmaRifle replaces PlasmaRifle
{
	Yscale 0.70
	XScale 0.75
	States
	{
	Select:
		PLSB A 0 Bright A_JumpIfInventory("RedTeam", 1, "RedSelect")
		PLSB A 0 Bright A_JumpIfInventory("GreenTeam", 1, "GreenSelect")
		PLSB A 0 Bright A_JumpIfInventory("GoldTeam", 1, "YellowSelect")
		goto BlueSelect
	Deselect:
		PLSB A 0 A_StopSoundEx("Weapon")
		PLSB A 0 Bright A_JumpIfInventory("RedTeam", 1, "RedDeselect")
		PLSB A 0 Bright A_JumpIfInventory("GreenTeam", 1, "GreenDeselect")
		PLSB A 0 Bright A_JumpIfInventory("GoldTeam", 1, "YellowDeselect")
		goto BlueDeselect
	BlueSelect:
		PLSB A 1 A_Raise
		loop
	BlueDeselect:
		PLSB A 0 A_StopSoundEx ("WEAPON")
		PLSB A 1 A_Lower
		loop
	RedSelect:
		PLSR A 1 A_Raise
		loop
	RedDeselect:
		PLSR A 0 A_StopSoundEx ("WEAPON")
		PLSR A 1 A_Lower
		loop
	GreenSelect:
		PLSG A 1 A_Raise
		loop
	GreenDeselect:
		PLSG A 0 A_StopSoundEx ("WEAPON")
		PLSG A 1 A_Lower
		loop
	YellowSelect:
		PLSY A 1 A_Raise
		loop
	YellowDeselect:
		PLSY A 0 A_StopSoundEx ("WEAPON")
		PLSY A 1 A_Lower
		loop
	Ready:
		PLSB A 0 Bright A_JumpIfInventory("RedTeam", 1, "RedReady")
		PLSB A 0 Bright A_JumpIfInventory("GreenTeam", 1, "GreenReady")
		PLSB A 0 Bright A_JumpIfInventory("GoldTeam", 1, "YellowReady")
		goto BlueReady
	BlueReady:
		PLSB A 0 A_PlaySoundEx("PlasmaIdle", "Weapon", 1)
		PLSB BBCCDD 1 A_WeaponReady
		loop
	RedReady:
		PLSR A 0 A_PlaySoundEx("PlasmaIdle", "Weapon", 1)
		PLSR BBCCDD 1 A_WeaponReady
		loop
	GreenReady:
		PLSG A 0 A_PlaySoundEx("PlasmaIdle", "Weapon", 1)
		PLSG BBCCDD 1 A_WeaponReady
		loop
	YellowReady:
		PLSY A 0 A_PlaySoundEx("PlasmaIdle", "Weapon", 1)
		PLSY BBCCDD 1 A_WeaponReady
		loop
	Hold:
		TNT1 A 0
		goto Fire
	Fire:
		PLSB A 0 A_StopSoundEx("Weapon")
		PLSB A 0 Bright A_JumpIfInventory("CoopCheck", 1, "CoopFire")
		PLSB A 0 Bright A_JumpIfInventory("BlueTeam", 1, "BlueFire")
		PLSB A 0 Bright A_JumpIfInventory("RedTeam", 1, "RedFire")
		PLSB A 0 Bright A_JumpIfInventory("GreenTeam", 1, "GreenFire")
		PLSB A 0 Bright A_JumpIfInventory("GoldTeam", 1, "YellowFire")
		PLSB E 2 Bright A_FireCustomMissile("SD64PlasmaBall_DM")
		PLSB A 2 Bright
		PLSB A 0 A_ReFire
		PLSB I 2 
		PLSB F 2 
		PLSB G 3 
		PLSB H 4 
		PLSB H 4 
		PLSB G 3 
		PLSB F 2 
		PLSB I 2 
		Goto BlueReady
	BlueFire:
		PLSB E 2 Bright A_FireCustomMissile("SD64PlasmaBall_Blue")
		PLSB A 2 Bright
		PLSB A 0 A_ReFire
		PLSB I 2 
		PLSB F 2 
		PLSB G 3 
		PLSB H 4 
		PLSB H 4 
		PLSB G 3 
		PLSB F 2 
		PLSB I 2 
		Goto BlueReady
	RedFire:
		PLSR E 2 Bright A_FireCustomMissile("SD64PlasmaBall_Red")
		PLSR A 2 Bright
		PLSR A 0 A_ReFire
		PLSR I 2 
		PLSR F 2 
		PLSR G 3 
		PLSR H 4 
		PLSR H 4 
		PLSR G 3 
		PLSR F 2 
		PLSR I 2 
		Goto RedReady
	GreenFire:
		PLSG E 2 Bright A_FireCustomMissile("SD64PlasmaBall_Green")
		PLSG A 2 Bright
		PLSG A 0 A_ReFire
		PLSG I 2 
		PLSG F 2 
		PLSG G 3 
		PLSG H 4 
		PLSG H 4 
		PLSG G 3 
		PLSG F 2 
		PLSG I 2 
		Goto GreenReady
	YellowFire:
		PLSY E 2 Bright A_FireCustomMissile("SD64PlasmaBall_Yellow")
		PLSY A 2 Bright
		PLSY A 0 A_ReFire
		PLSY I 2 
		PLSY F 2 
		PLSY G 3 
		PLSY H 4 
		PLSY H 4 
		PLSY G 3 
		PLSY F 2 
		PLSY I 2 
		Goto YellowReady
	CoopFire:
		PLSB E 2 Bright A_FireCustomMissile("SD64PlasmaBall_Coop")
		PLSB A 2 Bright
		PLSB A 0 A_ReFire
		PLSB I 2 
		PLSB F 2 
		PLSB G 3 
		PLSB H 4 
		PLSB H 4 
		PLSB G 3 
		PLSB F 2 
		PLSB I 2
		Goto Ready
	Flash:
		TNT1 AA 1
		stop
	}
}

ACTOR SD64_Fist : Fist replaces Fist
{
	attacksound "dspunch"
	States
	{
	Ready:
		PUNG A 1 A_WeaponReady
		Loop
	Deselect:
		PUNG A 1 A_Lower
		Loop
	Select:
		PUNG A 1 A_Raise
		Loop
	Fire:
		PUNG BCDEF 1
		PUNG G 6 A_Punch
		PUNG FEDCB 2
		PUNG A 2 A_ReFire
		Goto Ready
	}
}

// In cooperative games does not affect to the players!
// But you can get hurt in dm! watch out!
ACTOR SD64_BFG9000 : BFG9000 replaces BFG9000
{
	Yscale 0.70
	XScale 0.75
	States
	{
	Ready:
		BFGG A 1 A_WeaponReady
		TNT1 A 0 ACS_execute(641,0)
		loop
	Fire:
		BFGG B 0 a_JumpIfInventory("CoopCheck",1,"Fire_Coop")
		BFGG A 0 Bright A_JumpIfInventory("BlueTeam", 1, "BlueFire")
		BFGG A 0 Bright A_JumpIfInventory("RedTeam", 1, "RedFire")
		BFGG A 0 Bright A_JumpIfInventory("GreenTeam", 1, "GreenFire")
		BFGG A 0 Bright A_JumpIfInventory("GoldTeam", 1, "YellowFire")
		BFGG B 0 a_JumpIF((acs_ExecuteWithresult(649,0)) == 0, "Fire_Nofreeaim_DM")
		
		BFGG A 0 Radius_Quake(2, 30, 0, 1, 0)
		BFGG A 25 A_playsound("Weapons/Bfgf",CHAN_WEAPON,127) // A_bfgsound
		BFGG A 5 A_GunFlash
		BFGG B 0 Radius_Quake(9, 4, 0, 1, 0)
		BFGG B 0 A_SetBlend("00FF00",0.75,14)
		BFGG B 10 A_FireCustomMissile("SD64BFGBall_DM")
		BFGG B 20 A_ReFire
		Goto Ready
	Fire_Nofreeaim_DM:
		TNT1 A 0 ACS_execute(641,0)
		BFGG B 0 a_JumpIfInventory("CoopCheck",1,"Fire_Nofreeaim_Coop")
		BFGG B 0 A_takeinventory("Cell",40)
		BFGG A 0 Radius_Quake(2, 30, 0, 1, 0)
		BFGG A 25 A_playsound("Weapons/Bfgf",CHAN_WEAPON,127) // A_bfgsound
		BFGG A 5 A_GunFlash
		BFGG B 0 Radius_Quake(9, 4, 0, 1, 0)
		BFGG B 0 A_SetBlend("00FF00",0.75,14)
		BFGG B 0 A_playsound("BFGFIRE",CHAN_WEAPON,127) 
		BFGG B 10 A_Spawnitemex("SD64BFGBall_DM",0,0,30,25,0,0)
		BFGG B 20 A_ReFire
		Goto Ready
	Fire_Coop:
		BFGG A 0 a_JumpIF((acs_ExecuteWithresult(649,0)) == 0, "Fire_Nofreeaim_Coop")
		BFGG A 0 Radius_Quake(2, 30, 0, 1, 0)
		BFGG A 25 A_playsound("Weapons/Bfgf",CHAN_WEAPON,127) // A_bfgsound
		BFGG A 5 A_GunFlash
		BFGG B 0 Radius_Quake(9, 4, 0, 1, 0)
		BFGG B 0 A_SetBlend("00FF00",0.75,14)
		BFGG B 0 A_playsound("BFGFIRE",CHAN_WEAPON,127) 
		BFGG B 10 A_Firebfg
		BFGG B 20 A_ReFire
		Goto Ready
	Fire_Nofreeaim_Coop:
		BFGG B 0 A_takeinventory("Cell",40)
		BFGG A 0 Radius_Quake(2, 30, 0, 1, 0)
		BFGG A 25 A_playsound("Weapons/Bfgf",CHAN_WEAPON,127) // A_bfgsound
		BFGG A 5 A_GunFlash
		BFGG B 0 Radius_Quake(9, 4, 0, 1, 0)
		BFGG B 0 A_SetBlend("00FF00",0.75,14)
		BFGG B 0 A_playsound("BFGFIRE",CHAN_WEAPON,127) 
		BFGG B 10 A_Spawnitemex("SD64BFGBall",0,0,30,25,0,0)
		BFGG B 20 A_ReFire
		Goto Ready
	RedFire:
		BFGG B 0 a_JumpIF((acs_ExecuteWithresult(649,0)) == 0, "Fire_Nofreeaim_R")
		BFGG A 0 Radius_Quake(2, 30, 0, 1, 0)
		BFGG A 25 A_playsound("Weapons/Bfgf",CHAN_WEAPON,127)
		BFGG A 5 A_GunFlash
		BFGG B 0 Radius_Quake(9, 4, 0, 1, 0)
		BFGG B 0 A_SetBlend("FF5000",0.75,14)
		BFGG B 10 A_FireCustomMissile("SD64BFGBall_Red")
		BFGG B 20 A_ReFire
		Goto Ready
	Fire_Nofreeaim_R:
		BFGG B 0 A_takeinventory("Cell",40)
		BFGG A 0 Radius_Quake(2, 30, 0, 1, 0)
		BFGG A 25 A_playsound("Weapons/Bfgf",CHAN_WEAPON,127) // A_bfgsound
		BFGG A 5 A_GunFlash
		BFGG B 0 Radius_Quake(9, 4, 0, 1, 0)
		BFGG B 0 A_SetBlend("FF5000",0.75,14)
		BFGG B 0 A_playsound("BFGFIRE",CHAN_WEAPON,127) // A_bfgsound
		BFGG B 10 A_Spawnitemex("SD64BFGBall_Red",0,0,30,25,0,0)
		BFGG B 20 A_ReFire
		Goto Ready
	BlueFire:
		BFGG B 0 a_JumpIF((acs_ExecuteWithresult(649,0)) == 0, "Fire_Nofreeaim_B")
		BFGG A 0 Radius_Quake(2, 30, 0, 1, 0)
		BFGG A 25 A_playsound("Weapons/Bfgf",CHAN_WEAPON,127) // A_bfgsound
		BFGG A 5 A_GunFlash
		BFGG B 0 Radius_Quake(9, 4, 0, 1, 0)
		BFGG B 0 A_SetBlend("00AAFF",0.75,14)
		BFGG B 10 A_FireCustomMissile("SD64BFGBall_Blue")
		BFGG B 20 A_ReFire
		Goto Ready
	Fire_Nofreeaim_B:
		BFGG B 0 A_takeinventory("Cell",40)
		BFGG A 0 Radius_Quake(2, 30, 0, 1, 0)
		BFGG A 25 A_playsound("Weapons/Bfgf",CHAN_WEAPON,127) // A_bfgsound
		BFGG A 5 A_GunFlash
		BFGG B 0 Radius_Quake(9, 4, 0, 1, 0)
		BFGG B 0 A_SetBlend("00AAFF",0.75,14)
		BFGG B 0 A_playsound("BFGFIRE",CHAN_WEAPON,127) // A_bfgsound
		BFGG B 10 A_Spawnitemex("SD64BFGBall_Blue",0,0,30,25,0,0)
		BFGG B 20 A_ReFire
		Goto Ready
	GreenFire:
		BFGG B 0 a_JumpIF((acs_ExecuteWithresult(649,0)) == 0, "Fire_Nofreeaim_G")
		BFGG A 0 Radius_Quake(2, 30, 0, 1, 0)
		BFGG A 25 A_playsound("Weapons/Bfgf",CHAN_WEAPON,127) // A_bfgsound
		BFGG A 5 A_GunFlash
		BFGG B 0 Radius_Quake(9, 4, 0, 1, 0)
		BFGG B 0 A_SetBlend("00FF00",0.75,14)
		BFGG B 10 A_FireCustomMissile("SD64BFGBall_Green")
		BFGG B 20 A_ReFire
		Goto Ready
	Fire_Nofreeaim_G:
		BFGG B 0 A_takeinventory("Cell",40)
		BFGG A 0 Radius_Quake(2, 30, 0, 1, 0)
		BFGG A 25 A_playsound("Weapons/Bfgf",CHAN_WEAPON,127) // A_bfgsound
		BFGG A 5 A_GunFlash
		BFGG B 0 Radius_Quake(9, 4, 0, 1, 0)
		BFGG B 0 A_SetBlend("00FF00",0.75,14)
		BFGG B 0 A_playsound("BFGFIRE",CHAN_WEAPON,127) // A_bfgsound
		BFGG B 10 A_Spawnitemex("SD64BFGBall_Green",0,0,30,25,0,0)
		BFGG B 20 A_ReFire
		Goto Ready
	YellowFire:
		BFGG B 0 a_JumpIF((acs_ExecuteWithresult(649,0)) == 0, "Fire_Nofreeaim_R")
		BFGG A 0 Radius_Quake(2, 30, 0, 1, 0)
		BFGG A 25 A_playsound("Weapons/Bfgf",CHAN_WEAPON,127) // A_bfgsound
		BFGG A 5 A_GunFlash
		BFGG B 0 Radius_Quake(9, 4, 0, 1, 0)
		BFGG B 0 A_SetBlend("FFFF00",0.75,14)
		BFGG B 10 A_FireCustomMissile("SD64BFGBall_Gold")
		BFGG B 20 A_ReFire
		Goto Ready
	Fire_Nofreeaim_Y:
		BFGG B 0 A_takeinventory("Cell",40)
		BFGG A 0 Radius_Quake(2, 30, 0, 1, 0)
		BFGG A 25 A_playsound("Weapons/Bfgf",CHAN_WEAPON,127) // A_bfgsound
		BFGG A 5 A_GunFlash
		BFGG B 0 Radius_Quake(9, 4, 0, 1, 0)
		BFGG B 0 A_SetBlend("FFFF00",0.75,14)
		BFGG B 0 A_playsound("BFGFIRE",CHAN_WEAPON,127) // A_bfgsound
		BFGG B 10 A_Spawnitemex("SD64BFGBall_Gold",0,0,30,25,0,0)
		BFGG B 20 A_ReFire
		Goto Ready
	Flash:
		BFGG B 0 Bright A_JumpIfInventory("BlueTeam", 1, "BlueFlash")
		BFGG B 0 Bright A_JumpIfInventory("RedTeam", 1, "RedFlash")
		BFGG B 0 Bright A_JumpIfInventory("GoldTeam", 1, "YellowFlash")
		BFGG C 5 Bright A_Light1
		BFGG D 5 Bright A_Light2
		BFGG E 5 Bright
		Goto LightDone
	RedFlash:
		BFGR C 5 Bright A_Light1
		BFGR D 5 Bright A_Light2
		BFGR E 5 Bright
		Goto LightDone
	BlueFlash:
		BFGB C 5 Bright A_Light1
		BFGB D 5 Bright A_Light2
		BFGB E 5 Bright
		Goto LightDone
	YellowFlash:
		BFGY C 5 Bright A_Light1
		BFGY D 5 Bright A_Light2
		BFGY E 5 Bright
		Goto LightDone
	}
}

// Faster projectiles on deathmatch!
ACTOR SD64_RocketLauncher : RocketLauncher replaces RocketLauncher
{
	+WEAPON.NOAUTOAIM
	States
	{
	Ready:
		MISG A 1 A_WeaponReady
		TNT1 A 0 ACS_execute(641,0)
		loop
	Fire:
		MISG A 0 Bright A_JumpIfInventory("BlueTeam", 1, "BlueFire")
		MISG A 0 Bright A_JumpIfInventory("RedTeam", 1, "RedFire")
		MISG A 0 Bright A_JumpIfInventory("GreenTeam", 1, "GreenFire")
		MISG A 0 Bright A_JumpIfInventory("GoldTeam", 1, "YellowFire")
		MISG A 0 Bright A_JumpIfInventory("CoopCheck", 1, "CoopFire")
		// The difference is the rocket cannot teleport in the coop games
		MISG B 8 A_GunFlash
		MISG B 0 A_Recoil(2)
		MISG B 0 A_FireCustomMissile("DMRocket")
		MISG B 3 A_SetPitch (pitch-2)
		MISG B 1 A_SetPitch (pitch+0.8)
		MISG G 2 A_SetPitch (pitch+0.6)
		MISG G 3 A_SetPitch (pitch+0.4)
		MISG H 4 A_SetPitch (pitch+0.2)
		MISG H 1
		MISG B 0 A_ReFire
		Goto Ready
	BlueFire:
		MISG B 8 A_GunFlash
		MISG B 0 A_Recoil(2)
		MISG B 0 A_FireCustomMissile("BlueRocket")
		MISG B 3 A_SetPitch (pitch-2)
		MISG B 1 A_SetPitch (pitch+0.8)
		MISG G 2 A_SetPitch (pitch+0.6)
		MISG G 3 A_SetPitch (pitch+0.4)
		MISG H 4 A_SetPitch (pitch+0.2)
		MISG H 1
		MISG B 0 A_ReFire
		Goto Ready
	RedFire:
		MISG B 8 A_GunFlash
		MISG B 0 A_Recoil(2)
		MISG B 0 A_FireCustomMissile("RedRocket")
		MISG B 3 A_SetPitch (pitch-2)
		MISG B 1 A_SetPitch (pitch+0.8)
		MISG G 2 A_SetPitch (pitch+0.6)
		MISG G 3 A_SetPitch (pitch+0.4)
		MISG H 4 A_SetPitch (pitch+0.2)
		MISG H 1
		MISG B 0 A_ReFire
		Goto Ready
	GreenFire:
		MISG B 8 A_GunFlash
		MISG B 0 A_Recoil(2)
		MISG B 0 A_FireCustomMissile("GreenRocket")
		MISG B 3 A_SetPitch (pitch-2)
		MISG B 1 A_SetPitch (pitch+0.8)
		MISG G 2 A_SetPitch (pitch+0.6)
		MISG G 3 A_SetPitch (pitch+0.4)
		MISG H 4 A_SetPitch (pitch+0.2)
		MISG H 1
		MISG B 0 A_ReFire
		Goto Ready
	YellowFire:
		MISG B 8 A_GunFlash
		MISG B 0 A_Recoil(2)
		MISG B 0 A_FireCustomMissile("GoldRocket")
		MISG B 3 A_SetPitch (pitch-2)
		MISG B 1 A_SetPitch (pitch+0.8)
		MISG G 2 A_SetPitch (pitch+0.6)
		MISG G 3 A_SetPitch (pitch+0.4)
		MISG H 4 A_SetPitch (pitch+0.2)
		MISG H 1
		MISG B 0 A_ReFire
		Goto Ready
	CoopFire:
		MISG B 8 A_GunFlash
		MISG B 0 A_Recoil(2)
		MISG B 0 A_FireCustomMissile("CoopRocket")
		MISG B 3 A_SetPitch (pitch-2)
		MISG B 1 A_SetPitch (pitch+0.8)
		MISG G 2 A_SetPitch (pitch+0.6)
		MISG G 3 A_SetPitch (pitch+0.4)
		MISG H 4 A_SetPitch (pitch+0.2)
		MISG H 1
		MISG B 0 A_ReFire
		Goto Ready
	Flash:
		MISG C 4 Bright A_Light1
		MISG D 4 Bright
		MISG EF 4 Bright A_Light2
		Goto LightDone
	}
}

actor CoopCheck : Inventory {
+INVENTORY.UNDROPPABLE
Inventory.Maxamount 1}


// Now fully team coloured!
actor SD64_Unmaker : DoomWeapon 9901
{
  game Doom
  scale 0.82
  Weapon.SelectionOrder 2900
  Inventory.PickupMessage "What the !@# is this!"
  AttackSound "weapons/unmaker"
  Weapon.AmmoUse 1
  Weapon.AmmoGive 40
  Weapon.AmmoType "Cell"
  Inventory.Icon LGUNA0
  tag "Unmaker"
  States
  {
  Spawn:
    LGUN A -1
    loop
  Ready:
   UNMA A 0 Bright A_JumpIfInventory("BlueTeam", 1, "Ready_Blu")
	UNMA A 0 Bright A_JumpIfInventory("GreenTeam", 1, "Ready_Green")
	UNMA A 0 Bright A_JumpIfInventory("GoldTeam", 1, "Ready_Yellow")
    UNMA A 1 A_WeaponReady
    loop
  Deselect:
    UNMA A 0 Bright A_JumpIfInventory("BlueTeam", 1, "Deselect_Blu")
	UNMA A 0 Bright A_JumpIfInventory("GreenTeam", 1, "Deselect_Green")
	UNMA A 0 Bright A_JumpIfInventory("GoldTeam", 1, "Deselect_Yellow")
    UNMA A 1 A_Lower
    loop
  Select:
    UNMA A 0 Bright A_JumpIfInventory("BlueTeam", 1, "Select_Blu")
	UNMA A 0 Bright A_JumpIfInventory("GreenTeam", 1, "Select_Green")
	UNMA A 0 Bright A_JumpIfInventory("GoldTeam", 1, "Select_Yellow")
    UNMA A 1 A_Raise
    loop
   Fire:
    UNMA A 0 Bright A_JumpIfInventory("BlueTeam", 1, "Fire_Blu")
	UNMA A 0 Bright A_JumpIfInventory("GreenTeam", 1, "Fire_Green")
	UNMA A 0 Bright A_JumpIfInventory("GoldTeam", 1, "Fire_Yellow")
	  UNMA A 0 A_JumpIfInventory ("WeaponPower", 1, 6)
      UNMA A 0 A_GunFlash
      UNMA A 3 A_FireCustomMissile ("UnmakerLaser")
	  UNMA A 1
	  UNMA BC 3
      Goto Ready
	  UNMA A 0 A_JumpIfInventory ("WeaponPower", 2, 5)
      UNMA A 0 A_GunFlash
      UNMA A 3 A_FireCustomMissile("UnmakerLaser")
	  UNMA BC 1
      Goto Ready
	  UNMA A 0 A_JumpIfInventory ("WeaponPower", 3, 10)
      UNMA A 0 A_GunFlash
      UNMA A 0 A_FireCustomMissile ("UnmakerLaser", -1.5)
      UNMA A 0 A_JumpIfNoAmmo (3)
      UNMA A 0 A_FireCustomMissile ("UnmakerLaser", 1.5)
      UNMA A 3
	  UNMA BC 1
      UNMA A 0 A_Refire
      goto Ready
      UNMA A 0
      Goto Hold1
   Hold1:
	UNMA A 0 Bright A_JumpIfInventory("BlueTeam", 1, "Hold1_Blu")
	UNMA A 0 Bright A_JumpIfInventory("GreenTeam", 1, "Hold1_Green")
	UNMA A 0 Bright A_JumpIfInventory("GoldTeam", 1, "Hold1_Yellow")
	  TNT1 A 0 a_JumpifInventory("UnmakerLvl3Firecheck",1,"Hold2")
	  TNT1 A 0 a_JumpifInventory("UnmakerLvl3Firecheck",2,"Hold3")
	  TNT1 A 0 a_JumpifInventory("UnmakerLvl3Firecheck",3,"Hold4")
      UNMA A 0 A_GunFlash
      UNMA A 0 A_FireCustomMissile ("UnmakerLaser")
      UNMA A 0 A_JumpIfNoAmmo (6)
      UNMA A 0 A_FireCustomMissile ("UnmakerLaser", -4.5)
      UNMA A 0 A_JumpIfNoAmmo (4)
      UNMA A 0 A_FireCustomMissile ("UnmakerLaser", 4.5)
      UNMA A 3
	  UNMA BC 1
	  TNT1 A 0 a_Giveinventory("UnmakerLvl3Firecheck",1)
      UNMA A 0 A_Refire
      Goto Ready
   Hold2:
	UNMA A 0 Bright A_JumpIfInventory("BlueTeam", 1, "Hold2_Blu")
	UNMA A 0 Bright A_JumpIfInventory("GreenTeam", 1, "Hold2_Green")
	UNMA A 0 Bright A_JumpIfInventory("GoldTeam", 1, "Hold2_Yellow")
	  TNT1 A 0 a_JumpifInventory("UnmakerLvl3Firecheck",2,"Hold3")
	  TNT1 A 0 a_JumpifInventory("UnmakerLvl3Firecheck",3,"Hold4")
      UNMA A 0 A_GunFlash
      UNMA A 0 A_FireCustomMissile ("UnmakerLaser")
      UNMA A 0 A_JumpIfNoAmmo (6)
      UNMA A 0 A_FireCustomMissile ("UnmakerLaser", -6.0)
      UNMA A 0 A_JumpIfNoAmmo (4)
      UNMA A 0 A_FireCustomMissile ("UnmakerLaser", 6.0)
      UNMA A 3
	  UNMA BC 1
	  TNT1 A 0 a_Giveinventory("UnmakerLvl3Firecheck",1)
      UNMA A 0 A_Refire
      Goto Ready
   Hold3:
	UNMA A 0 Bright A_JumpIfInventory("BlueTeam", 1, "Hold3_Blu")
	UNMA A 0 Bright A_JumpIfInventory("GreenTeam", 1, "Hold3_Green")
	UNMA A 0 Bright A_JumpIfInventory("GoldTeam", 1, "Hold3_Yellow")
      TNT1 A 0 a_JumpifInventory("UnmakerLvl3Firecheck",3,"Hold4")
      UNMA A 0 A_GunFlash
      UNMA A 0 A_FireCustomMissile ("UnmakerLaser")
      UNMA A 0 A_JumpIfNoAmmo (6)
      UNMA A 0 A_FireCustomMissile ("UnmakerLaser", -7.5)
      UNMA A 0 A_JumpIfNoAmmo (4)
      UNMA A 0 A_FireCustomMissile ("UnmakerLaser", 7.5)
      UNMA A 3
	  UNMA BC 1
	  TNT1 A 0 a_Giveinventory("UnmakerLvl3Firecheck",1)
      UNMA A 0 A_Refire
      Goto Ready
   Hold4:
	UNMA A 0 Bright A_JumpIfInventory("BlueTeam", 1, "Hold4_Blu")
	UNMA A 0 Bright A_JumpIfInventory("GreenTeam", 1, "Hold4_Green")
	UNMA A 0 Bright A_JumpIfInventory("GoldTeam", 1, "Hold4_Yellow")
      UNMA A 0 A_GunFlash
      UNMA A 0 A_FireCustomMissile ("UnmakerLaser")
      UNMA A 0 A_JumpIfNoAmmo (5)
      UNMA A 0 A_FireCustomMissile ("UnmakerLaser", -9.0)
      UNMA A 0 A_JumpIfNoAmmo (3)
      UNMA A 0 A_FireCustomMissile ("UnmakerLaser", 9.0)
      UNMA A 3
	  UNMA BC 1
	  TNT1 A 0 a_Takeinventory("UnmakerLvl3Firecheck",4)
      Goto Ready
   Flash:
    UNMA A 0 Bright A_JumpIfInventory("BlueTeam", 1, "Flash_Blu")
	UNMA A 0 Bright A_JumpIfInventory("GreenTeam", 1, "Flash_Green")
	UNMA A 0 Bright A_JumpIfInventory("GoldTeam", 1, "Flash_Yellow")
      UNMA D 2 bright
      goto LightDone
	UNMA A 0 Bright A_JumpIfInventory("BlueTeam", 1, "Flash_Blu")
	UNMA A 0 Bright A_JumpIfInventory("GreenTeam", 1, "Flash_Green")
	UNMA A 0 Bright A_JumpIfInventory("GoldTeam", 1, "Flash_Yellow")
      UNMA D 2 bright
      goto LightDone
	  
	Ready_BLU:
    UNMB A 1 A_WeaponReady
    goto Ready
  Deselect_BLU:
    UNMB A 1 A_Lower
    loop
  Select_BLU:
    UNMB A 1 A_Raise
    loop
   Fire_BLU:
	  UNMB A 0 A_JumpIfInventory ("WeaponPower", 1, 6)
      UNMB A 0 A_GunFlash
      UNMB A 3 A_FireCustomMissile ("UNMKLazerBlueTeam")
	  UNMB A 1
	  UNMB BC 3
      Goto Ready
	  UNMB A 0 A_JumpIfInventory ("WeaponPower", 2, 5)
      UNMB A 0 A_GunFlash
      UNMB A 3 A_FireCustomMissile("UNMKLazerBlueTeam")
	  UNMB BC 1
      Goto Ready
	  UNMB A 0 A_JumpIfInventory ("WeaponPower", 3, 10)
      UNMB A 0 A_GunFlash
      UNMB A 0 A_FireCustomMissile ("UNMKLazerBlueTeam", -1.5)
      UNMB A 0 A_JumpIfNoAmmo (3)
      UNMB A 0 A_FireCustomMissile ("UNMKLazerBlueTeam", 1.5)
      UNMB A 3
	  UNMB BC 1
      UNMB A 0 A_Refire
      goto Ready
      UNMB A 0
      Goto Hold1
   Hold1_BLU:
	  TNT1 A 0 a_JumpifInventory("UnmakerLvl3Firecheck",1,"Hold2")
	  TNT1 A 0 a_JumpifInventory("UnmakerLvl3Firecheck",2,"Hold3")
	  TNT1 A 0 a_JumpifInventory("UnmakerLvl3Firecheck",3,"Hold4")
      UNMB A 0 A_GunFlash
      UNMB A 0 A_FireCustomMissile ("UNMKLazerBlueTeam")
      UNMB A 0 A_JumpIfNoAmmo (6)
      UNMB A 0 A_FireCustomMissile ("UNMKLazerBlueTeam", -4.5)
      UNMB A 0 A_JumpIfNoAmmo (4)
      UNMB A 0 A_FireCustomMissile ("UNMKLazerBlueTeam", 4.5)
      UNMB A 3
	  UNMB BC 1
	  TNT1 A 0 a_Giveinventory("UnmakerLvl3Firecheck",1)
      UNMB A 0 A_Refire
      Goto Ready
   Hold2_BLU:
	  TNT1 A 0 a_JumpifInventory("UnmakerLvl3Firecheck",2,"Hold3")
	  TNT1 A 0 a_JumpifInventory("UnmakerLvl3Firecheck",3,"Hold4")
      UNMB A 0 A_GunFlash
      UNMB A 0 A_FireCustomMissile ("UNMKLazerBlueTeam")
      UNMB A 0 A_JumpIfNoAmmo (6)
      UNMB A 0 A_FireCustomMissile ("UNMKLazerBlueTeam", -6.0)
      UNMB A 0 A_JumpIfNoAmmo (4)
      UNMB A 0 A_FireCustomMissile ("UNMKLazerBlueTeam", 6.0)
      UNMB A 3
	  UNMB BC 1
	  TNT1 A 0 a_Giveinventory("UnmakerLvl3Firecheck",1)
      UNMB A 0 A_Refire
      Goto Ready
   Hold3_BLU:
      TNT1 A 0 a_JumpifInventory("UnmakerLvl3Firecheck",3,"Hold4")
      UNNB A 0 A_GunFlash
      UNMB A 0 A_FireCustomMissile ("UNMKLazerBlueTeam")
      UNMB A 0 A_JumpIfNoAmmo (6)
      UNMB A 0 A_FireCustomMissile ("UNMKLazerBlueTeam", -7.5)
      UNMB A 0 A_JumpIfNoAmmo (4)
      UNMB A 0 A_FireCustomMissile ("UNMKLazerBlueTeam", 7.5)
      UNMB A 3
	  UNMB BC 1
	  TNT1 A 0 a_Giveinventory("UnmakerLvl3Firecheck",1)
      UNMB A 0 A_Refire
      Goto Ready
   Hold4_BLU:
      UNMB A 0 A_GunFlash
      UNMB A 0 A_FireCustomMissile ("UNMKLazerBlueTeam")
      UNMB A 0 A_JumpIfNoAmmo (5)
      UNMB A 0 A_FireCustomMissile ("UNMKLazerBlueTeam", -9.0)
      UNMB A 0 A_JumpIfNoAmmo (3)
      UNMB A 0 A_FireCustomMissile ("UNMKLazerBlueTeam", 9.0)
      UNMB A 3
	  UNMB BC 1
	  TNT1 A 0 a_Takeinventory("UnmakerLvl3Firecheck",4)
      Goto Ready
   Flash_BLU:
      UNMB D 2 bright
      goto LightDone
      UNMB D 2 bright
      goto LightDone
	  
   Ready_Yellow:
    UNMC A 1 A_WeaponReady
    loop
   Deselect_Yellow:
    UNMC A 1 A_Lower
    loop
   Select_Yellow:
    UNMC A 1 A_Raise
    loop
   Fire_Yellow:
	  UNMC A 0 A_JumpIfInventory ("WeaponPower", 1, 6)
      UNMC A 0 A_GunFlash
      UNMC A 3 A_FireCustomMissile ("UNMKLazerYellowTeam")
	  UNMC A 1
	  UNMC BC 3
      Goto Ready
	  UNMC A 0 A_JumpIfInventory ("WeaponPower", 2, 5)
      UNMC A 0 A_GunFlash
      UNMC A 3 A_FireCustomMissile("UNMKLazerYellowTeam")
	  UNMC BC 1
      Goto Ready
	  UNMC A 0 A_JumpIfInventory ("WeaponPower", 3, 10)
      UNMC A 0 A_GunFlash
      UNMC A 0 A_FireCustomMissile ("UNMKLazerYellowTeam", -1.5)
      UNMC A 0 A_JumpIfNoAmmo (3)
      UNMC A 0 A_FireCustomMissile ("UNMKLazerYellowTeam", 1.5)
      UNMC A 3
	  UNMC BC 1
      UNMC A 0 A_Refire
      goto Ready
      UNMC A 0
      Goto Hold1
   Hold1_Yellow:
	  TNT1 A 0 a_JumpifInventory("UnmakerLvl3Firecheck",1,"Hold2")
	  TNT1 A 0 a_JumpifInventory("UnmakerLvl3Firecheck",2,"Hold3")
	  TNT1 A 0 a_JumpifInventory("UnmakerLvl3Firecheck",3,"Hold4")
      UNMC A 0 A_GunFlash
      UNMC A 0 A_FireCustomMissile ("UNMKLazerYellowTeam")
      UNMC A 0 A_JumpIfNoAmmo (6)
      UNMC A 0 A_FireCustomMissile ("UNMKLazerYellowTeam", -4.5)
      UNMC A 0 A_JumpIfNoAmmo (4)
      UNMC A 0 A_FireCustomMissile ("UNMKLazerYellowTeam", 4.5)
      UNMC A 3
	  UNMC BC 1
	  TNT1 A 0 a_Giveinventory("UnmakerLvl3Firecheck",1)
      UNMC A 0 A_Refire
      Goto Ready
   Hold2_Yellow:
	  TNT1 A 0 a_JumpifInventory("UnmakerLvl3Firecheck",2,"Hold3")
	  TNT1 A 0 a_JumpifInventory("UnmakerLvl3Firecheck",3,"Hold4")
      UNMC A 0 A_GunFlash
      UNMC A 0 A_FireCustomMissile ("UNMKLazerYellowTeam")
      UNMC A 0 A_JumpIfNoAmmo (6)
      UNMC A 0 A_FireCustomMissile ("UNMKLazerYellowTeam", -6.0)
      UNMC A 0 A_JumpIfNoAmmo (4)
      UNMC A 0 A_FireCustomMissile ("UNMKLazerYellowTeam", 6.0)
      UNMC A 3
	  UNMC BC 1
	  TNT1 A 0 a_Giveinventory("UnmakerLvl3Firecheck",1)
      UNMC A 0 A_Refire
      Goto Ready
   Hold3_Yellow:
      TNT1 A 0 a_JumpifInventory("UnmakerLvl3Firecheck",3,"Hold4")
      UNNB A 0 A_GunFlash
      UNMC A 0 A_FireCustomMissile ("UNMKLazerYellowTeam")
      UNMC A 0 A_JumpIfNoAmmo (6)
      UNMC A 0 A_FireCustomMissile ("UNMKLazerYellowTeam", -7.5)
      UNMC A 0 A_JumpIfNoAmmo (4)
      UNMC A 0 A_FireCustomMissile ("UNMKLazerYellowTeam", 7.5)
      UNMC A 3
	  UNMC BC 1
	  TNT1 A 0 a_Giveinventory("UnmakerLvl3Firecheck",1)
      UNMC A 0 A_Refire
      Goto Ready
   Hold4_Yellow:
      UNMC A 0 A_GunFlash
      UNMC A 0 A_FireCustomMissile ("UNMKLazerYellowTeam")
      UNMC A 0 A_JumpIfNoAmmo (5)
      UNMC A 0 A_FireCustomMissile ("UNMKLazerYellowTeam", -9.0)
      UNMC A 0 A_JumpIfNoAmmo (3)
      UNMC A 0 A_FireCustomMissile ("UNMKLazerYellowTeam", 9.0)
      UNMC A 3
	  UNMC BC 1
	  TNT1 A 0 a_Takeinventory("UnmakerLvl3Firecheck",4)
      Goto Ready
   Flash_Yellow:
      UNMC D 2 bright
      goto LightDone
      UNMC D 2 bright
      goto LightDone
	  
  Ready_Green:
    UNMD A 1 A_WeaponReady
    loop
  Deselect_Green:
    UNMD A 1 A_Lower
    loop
  Select_Green:
    UNMD A 1 A_Raise
    loop
   Fire_Green:
	  UNMD A 0 A_JumpIfInventory ("WeaponPower", 1, 6)
      UNMD A 0 A_GunFlash
      UNMD A 3 A_FireCustomMissile ("UNMKLazerGreenTeam")
	  UNMD A 1
	  UNMD BC 3
      Goto Ready
	  UNMD A 0 A_JumpIfInventory ("WeaponPower", 2, 5)
      UNMD A 0 A_GunFlash
      UNMD A 3 A_FireCustomMissile("UNMKLazerGreenTeam")
	  UNMD BC 1
      Goto Ready
	  UNMD A 0 A_JumpIfInventory ("WeaponPower", 3, 10)
      UNMD A 0 A_GunFlash
      UNMD A 0 A_FireCustomMissile ("UNMKLazerGreenTeam", -1.5)
      UNMD A 0 A_JumpIfNoAmmo (3)
      UNMD A 0 A_FireCustomMissile ("UNMKLazerGreenTeam", 1.5)
      UNMD A 3
	  UNMD BC 1
      UNMD A 0 A_Refire
      goto Ready
      UNMD A 0
      Goto Hold1
   Hold1_Green:
	  TNT1 A 0 a_JumpifInventory("UnmakerLvl3Firecheck",1,"Hold2")
	  TNT1 A 0 a_JumpifInventory("UnmakerLvl3Firecheck",2,"Hold3")
	  TNT1 A 0 a_JumpifInventory("UnmakerLvl3Firecheck",3,"Hold4")
      UNMD A 0 A_GunFlash
      UNMD A 0 A_FireCustomMissile ("UNMKLazerGreenTeam")
      UNMD A 0 A_JumpIfNoAmmo (6)
      UNMD A 0 A_FireCustomMissile ("UNMKLazerGreenTeam", -4.5)
      UNMD A 0 A_JumpIfNoAmmo (4)
      UNMD A 0 A_FireCustomMissile ("UNMKLazerGreenTeam", 4.5)
      UNMD A 3
	  UNMD BC 1
	  TNT1 A 0 a_Giveinventory("UnmakerLvl3Firecheck",1)
      UNMD A 0 A_Refire
      Goto Ready
   Hold2_Green:
	  TNT1 A 0 a_JumpifInventory("UnmakerLvl3Firecheck",2,"Hold3")
	  TNT1 A 0 a_JumpifInventory("UnmakerLvl3Firecheck",3,"Hold4")
      UNMD A 0 A_GunFlash
      UNMD A 0 A_FireCustomMissile ("UNMKLazerGreenTeam")
      UNMD A 0 A_JumpIfNoAmmo (6)
      UNMD A 0 A_FireCustomMissile ("UNMKLazerGreenTeam", -6.0)
      UNMD A 0 A_JumpIfNoAmmo (4)
      UNMD A 0 A_FireCustomMissile ("UNMKLazerGreenTeam", 6.0)
      UNMD A 3
	  UNMD BC 1
	  TNT1 A 0 a_Giveinventory("UnmakerLvl3Firecheck",1)
      UNMD A 0 A_Refire
      Goto Ready
   Hold3_Green:
      TNT1 A 0 a_JumpifInventory("UnmakerLvl3Firecheck",3,"Hold4")
      UNNB A 0 A_GunFlash
      UNMD A 0 A_FireCustomMissile ("UNMKLazerGreenTeam")
      UNMD A 0 A_JumpIfNoAmmo (6)
      UNMD A 0 A_FireCustomMissile ("UNMKLazerGreenTeam", -7.5)
      UNMD A 0 A_JumpIfNoAmmo (4)
      UNMD A 0 A_FireCustomMissile ("UNMKLazerGreenTeam", 7.5)
      UNMD A 3
	  UNMD BC 1
	  TNT1 A 0 a_Giveinventory("UnmakerLvl3Firecheck",1)
      UNMD A 0 A_Refire
      Goto Ready
   Hold4_Green:
      UNMD A 0 A_GunFlash
      UNMD A 0 A_FireCustomMissile ("UNMKLazerGreenTeam")
      UNMD A 0 A_JumpIfNoAmmo (5)
      UNMD A 0 A_FireCustomMissile ("UNMKLazerGreenTeam", -9.0)
      UNMD A 0 A_JumpIfNoAmmo (3)
      UNMD A 0 A_FireCustomMissile ("UNMKLazerGreenTeam", 9.0)
      UNMD A 3
	  UNMD BC 1
	  TNT1 A 0 a_Takeinventory("UnmakerLvl3Firecheck",4)
      Goto Ready
   Flash_Green:
      UNMD D 2 bright
      goto LightDone
      UNMD D 2 bright
      goto LightDone
  }
}

actor UnmakerLvl3Firecheck : Inventory { Inventory.Maxamount 4 }
