Actor NewScriptedMarine : ScriptedMarine replaces ScriptedMarine
{
  Speed 8
  DeathSound "ScriptedMarine/Death"
  PainSound "ScriptedMarine/Pain"
  States
  {
  Spawn:
    MARR A 4 A_MarineLook
    MARR A 4 A_MarineNoise
    Loop
  Idle:
    "####" A 4 A_MarineLook
    "####" A 4 A_MarineNoise
    "####" A 4 A_MarineLook
    "####" A 4 A_MarineNoise
    "####" A 4 A_MarineLook
    "####" A 4 A_MarineNoise
    Loop
  See:
    "####" AAAABBBBCCCCDDDD 2 A_MarineChase
    Loop

  Melee.Fist:
    "####" E 4 A_FaceTarget
	"####" E 0 A_PlaySound("fist/normalthrow")
    "####" E 4 A_CustomMeleeAttack(random(1, 10) * 2, "Fist/Hit")
    "####" A 9
    "####" A 0 A_M_Refire(1)
    Loop
    "####" A 5 A_FaceTarget
    Goto See
  Melee.Berserk:
    "####" E 4 A_FaceTarget
	"####" E 0 A_PlaySound("fist/normalthrow")
    "####" E 4 A_CustomMeleeAttack(random(1, 10) * 20, "Fist/Hit")
    "####" A 9
    "####" A 0 A_M_Refire(1)
    Loop
    "####" A 5 A_FaceTarget
    Goto See
  Melee.Chainsaw:
    "####" E 3 A_MarineNoise
    "####" E 3 A_M_Saw
    "####" E 0 A_M_SawRefire
    Goto Melee.Chainsaw+1
    "####" A 0
    Goto See

  Missile:
  Missile.None:
    "####" E 12 A_FaceTarget
    Goto Idle
    "####" F 6 Bright
    Loop
  Missile.Pistol:
    "####" E 9 A_FaceTarget
	"####" F 0 A_PlaySound("rifle/fire", CHAN_WEAPON)
    "####" F 6 Bright A_CustomBulletAttack (22.5, 0, 1, random(1,5) * 3, "XaserPuff_NoTaunt", 0, CBAF_NORANDOM)
    "####" E 9 A_FaceTarget
	"####" F 0 A_PlaySound("rifle/fire", CHAN_WEAPON)
    "####" F 6 Bright A_CustomBulletAttack (22.5, 0, 1, random(1,5) * 3, "XaserPuff_NoTaunt", 0, CBAF_NORANDOM)
    "####" E 9 A_FaceTarget
	"####" F 0 A_PlaySound("rifle/fire", CHAN_WEAPON)
    "####" F 6 Bright A_CustomBulletAttack (22.5, 0, 1, random(1,5) * 3, "XaserPuff_NoTaunt", 0, CBAF_NORANDOM)
    "####" E 9 A_FaceTarget
	"####" F 0 A_PlaySound("rifle/fire", CHAN_WEAPON)
    "####" F 6 Bright A_CustomBulletAttack (22.5, 0, 1, random(1,5) * 3, "XaserPuff_NoTaunt", 0, CBAF_NORANDOM)
    "####" E 9 A_FaceTarget
    "####" A 0 A_M_Refire
    Goto See
  Fireloop.Pistol:
	"####" F 0 A_FaceTarget
	"####" F 0 A_PlaySound("rifle/fire", CHAN_WEAPON)
    "####" F 6 Bright A_CustomBulletAttack (22.5, 0, 1, random(1,5) * 3, "XaserPuff_NoTaunt", 0, CBAF_NORANDOM)
    "####" E 6 A_FaceTarget
    "####" A 0 A_M_Refire
    Goto Fireloop.Pistol
    TNT1 A 0
    Goto See
  Missile.Shotgun:
    "####" E 3 A_M_CheckAttack
	"####" F 0 A_PlaySound("weapons/GMSHOTGN", CHAN_WEAPON)
    "####" F 7 Bright A_CustomBulletAttack(22.5, 0, 3, random(1,5)*3, "XaserPuff_NoTaunt", 0, CBAF_NORANDOM)
	"####" E 14
	"####" A 0 A_PlaySound("Shotgun/Pump1", CHAN_AUTO)
	"####" A 3
	"####" A 0 A_PlaySound("Shotgun/Pump2", CHAN_AUTO)
	"####" A 9
    Goto See
  Missile.SSG:
    "####" E 10 A_FaceTarget
	"####" F 0 A_PlaySound("weapons/DSDSHTGN", CHAN_WEAPON)
    "####" F 8 A_CustomBulletAttack(22.5, 0, 3, random(1,5)*3, "XaserPuff_NoTaunt", 0, CBAF_NORANDOM)
    "####" E 10 A_FaceTarget
	"####" F 0 A_PlaySound("weapons/DSDSHTGN", CHAN_WEAPON)
    "####" F 8 A_CustomBulletAttack(22.5, 0, 3, random(1,5)*3, "XaserPuff_NoTaunt", 0, CBAF_NORANDOM)
    "####" E 8
	"####" A 7 A_PlaySound("weapons/ssg1")
	"####" A 7
	"####" A 7 A_PlaySound("weapons/DSDBLOAD")
	"####" A 6
	"####" A 6 A_PlaySound("weapons/sshotc")
	"####" A 5
    goto See
    Goto See
  Missile.Chaingun:
	"####" E 10 A_FaceTarget
	"####" G 0 A_PlaySound("weapons/UZIFIRE1", CHAN_WEAPON)
	"####" G 1 bright A_CustomBulletAttack(22.5, 0, 3, random(1,5)*3, "XaserPuff_NoTaunt", 0, CBAF_NORANDOM)
	"####" E 1
	"####" G 0 A_PlaySound("weapons/UZIFIRE1", CHAN_WEAPON)
	"####" G 1 bright A_CustomBulletAttack(22.5, 0, 3, random(1,5)*3, "XaserPuff_NoTaunt", 0, CBAF_NORANDOM)
	"####" E 1
	"####" G 0 A_PlaySound("weapons/UZIFIRE1", CHAN_WEAPON)
	"####" G 1 bright A_CustomBulletAttack(22.5, 0, 3, random(1,5)*3, "XaserPuff_NoTaunt", 0, CBAF_NORANDOM)
	"####" E 1
	"####" G 0 A_PlaySound("weapons/UZIFIRE1", CHAN_WEAPON)
	"####" G 1 bright A_CustomBulletAttack(22.5, 0, 3, random(1,5)*3, "XaserPuff_NoTaunt", 0, CBAF_NORANDOM)
	"####" E 1
	"####" G 0 A_PlaySound("weapons/UZIFIRE1", CHAN_WEAPON)
	"####" G 1 bright A_CustomBulletAttack(22.5, 0, 3, random(1,5)*3, "XaserPuff_NoTaunt", 0, CBAF_NORANDOM)
	"####" E 1
	"####" G 0 A_PlaySound("weapons/UZIFIRE1", CHAN_WEAPON)
	"####" G 1 bright A_CustomBulletAttack(22.5, 0, 3, random(1,5)*3, "XaserPuff_NoTaunt", 0, CBAF_NORANDOM)
	"####" E 1
	"####" G 0 A_PlaySound("weapons/UZIFIRE1", CHAN_WEAPON)
	"####" G 1 bright A_CustomBulletAttack(22.5, 0, 3, random(1,5)*3, "XaserPuff_NoTaunt", 0, CBAF_NORANDOM)
	"####" E 1
	"####" G 0 A_PlaySound("weapons/UZIFIRE1", CHAN_WEAPON)
	"####" G 1 bright A_CustomBulletAttack(22.5, 0, 3, random(1,5)*3, "XaserPuff_NoTaunt", 0, CBAF_NORANDOM)
	"####" E 1
	"####" G 0 A_PlaySound("weapons/UZIFIRE1", CHAN_WEAPON)
	"####" G 1 bright A_CustomBulletAttack(22.5, 0, 3, random(1,5)*3, "XaserPuff_NoTaunt", 0, CBAF_NORANDOM)
	"####" E 1
	"####" G 0 A_PlaySound("weapons/UZIFIRE1", CHAN_WEAPON)
	"####" G 1 bright A_CustomBulletAttack(22.5, 0, 3, random(1,5)*3, "XaserPuff_NoTaunt", 0, CBAF_NORANDOM)
	"####" E 1 A_M_ReFire
	Goto Missile.Chaingun
    "####" A 0
    Goto See
  Missile.Rocket:
	"####" E 0 A_PlaySound("weapons/GMROCKTL", CHAN_WEAPON)
    "####" E 4 A_FaceTarget
    "####" F 6 Bright A_CustomMissile ("Rocket")
	"####" E 10
	"####" E 0 A_PlaySound("rockpump", CHAN_WEAPON)
	"####" A 17
    "####" A 0
    Goto See
    "####" A 0
    Goto See
  Missile.Plasma:
	"####" E 4
	"####" A 0 A_PlaySound("plasma/fire", CHAN_WEAPON)
	"####" E 1 A_FaceTarget
	"####" F 0 Bright A_CustomBulletAttack(5.6, 0, 1, 25,"PlasmaCannonPuff")
	"####" F 2
	"####" E 1
	"####" E 0 A_M_ReFire
    Goto Missile.Plasma
    "####" A 0
    Goto See
  Missile.Railgun:
    "####" E 4 A_M_CheckAttack
	"####" F 8 A_CustomRailgun(65, 0, "DarkGreen", "Green")
	"####" E 20
    Goto See
  Missile.BFG:
    "####" E 5 A_M_BFGSound
    "####" EEEEE 5 A_FaceTarget
    "####" F 6 Bright A_M_FireBFG
    "####" A 4 A_FaceTarget
    "####" A 0 A_M_Refire
    Loop
    "####" A 0
    Goto See

  SkipAttack:
    "####" A 1
    Goto See
  Pain:
    "####" G 4
    "####" G 4 A_Pain
    Goto Idle
  Death:
    PLA1 H 5
    PLA1 I 5 A_Scream
    PLA1 J 5 A_NoBlocking
    PLA1 KLM 5
    PLA1 N -1
    Stop
  XDeath:
	TNT1 A 0 A_XScream
	TNT1 A 0 A_NoBlocking
	TNT1 A 0 A_SpawnDebris("SkullGib")
	TNT1 A 0 A_SpawnDebris("DukeGibs1")
	TNT1 A 0 A_SpawnDebris("DukeGibs2")
	TNT1 A 0 A_SpawnDebris("DukeGibs3")
	TNT1 A 0 A_SpawnDebris("GutsGib")
	TNT1 A 0 A_SpawnDebris("DukeGibs5")
	TNT1 A 0 A_SpawnDebris("BloodSplurt")
    Stop
  Raise:
    PLA1 MLKJIH 5
    Goto See
  }
}

ACTOR NewMarineFist : NewScriptedMarine replaces MarineFist
{
  States
  {
  Spawn:
    PLA1 A 4 A_MarineLook
    PLA1 A 4 A_MarineNoise
    Loop
  Melee:
    Goto Super::Melee.Fist
  Missile:
    Stop
  }
}

ACTOR NewMarineBerserk : NewMarineFist replaces MarineBerserk
{
  States
  {
  Melee:
	Goto Super::Melee.Berserk
  }
}

ACTOR NewMarineChainsaw : NewScriptedMarine replaces MarineChainsaw
{
  States
  {
  Spawn:
    PLA0 A 4 A_MarineLook
    PLA0 A 4 A_MarineNoise
    Loop
  Melee:
    Goto Super::Melee.Chainsaw
  Missile:
    Stop
  }
}

ACTOR NewMarinePistol: NewScriptedMarine replaces MarinePistol
{
  States
  {
  Missile:
    Goto Super::Missile.Pistol
  }
}

ACTOR NewMarineShotgun : NewScriptedMarine replaces MarineShotgun
{
  States
  {
  Spawn:
    PLA3 A 4 A_MarineLook
    PLA3 A 4 A_MarineNoise
    Loop
  Missile:
    Goto Super::Missile.Shotgun
  }
}

ACTOR NewMarineSSG : NewScriptedMarine replaces MarineSSG
{
  States
  {
  Spawn:
    PLA9 A 4 A_MarineLook
    PLA9 A 4 A_MarineNoise
    Loop
  Missile:
    Goto Super::Missile.SSG
  }
}

ACTOR NewMarineChaingun : NewScriptedMarine replaces MarineChaingun
{
  States
  {
  Spawn:
    PLA4 A 4 A_MarineLook
    PLA4 A 4 A_MarineNoise
    Loop
  Missile:
    Goto Super::Missile.Chaingun
  Pain:
    "####" H 4
    "####" H 4 A_Pain
    Goto Idle
  }
}

ACTOR NewMarineRocket : NewScriptedMarine replaces MarineRocket
{
  States
  {
  Spawn:
    PLA5 A 4 A_MarineLook
    PLA5 A 4 A_MarineNoise
    Loop
  Missile:
    Goto Super::Missile.Rocket
  }
}

ACTOR NewMarinePlasma : NewScriptedMarine replaces MarinePlasma
{
  States
  {
  Spawn:
    PLA6 A 4 A_MarineLook
    PLA6 A 4 A_MarineNoise
    Loop
  Missile:
    Goto Super::Missile.Plasma
  }
}

ACTOR NewMarineRailgun : NewScriptedMarine replaces MarineRailgun
{
  States
  {
  Spawn:
    PRAI A 4 A_MarineLook
    PRAI A 4 A_MarineNoise
    Loop
  Missile:
    Goto Super::Missile.Railgun
  }
}

ACTOR NewMarineBFG: NewScriptedMarine replaces MarineBFG //I'm gonna be quite honest here and say that I was too lazy to come up with a new attack for the BFG marine, considering the fact that the BFG doesn't exist anymore in GMID.
{
  States
  {
  Spawn:
	PLA7 A 4 A_MarineLook
	PLA7 A 4 A_MarineNoise
	Loop
  Missile:
    Goto Super::Missile.BFG
  }
}