/*

fist/berserk marine sprites: Mark Quinn
shotgun marine sprites: Mark Quinn
rocket marine sprites: Xim
bfg marine sprites: Toke

minigun marine sprites: Xim and The Skulltag Team
railgun marine sprites: Xim, FuzzballFox and The Skulltag Team
bfg10k marine sprites: Eriance and Xim

all from marine skins from realm667,
recoloring by me

*/

/* recolors for marines that haven't been made yet

chainsaw - default


ssg -  "112:127=176:191"
chaingun - "112:127=160:167"

grenade launcher - "112:123=144:151", "124:127=238:239"
plasma rifle - "112:127=192:207"

*/

actor berserkmarine : marineberserk replaces marineberserk
{
  tag "Berserk Marine"
  translation "48:79=[255,200,200]:[115,5,0]", "112:127=80:111"
  speed 32
  States
  {
  Spawn:
    PLA1 A 4 a_look
  See:
    PLA1 ABCD 4 A_chase
    Loop
  Melee:
	PLA1 E 4 A_FaceTarget
	PLA1 E 4 A_M_Punch(10)
	PLA1 A 9
	PLA1 A 0 A_M_Refire(1)
	Loop
	PLA1 A 5 A_FaceTarget
	Goto See
  Pain:
	PLA1 G 4
	PLA1 G 4 A_Pain
	Goto see
  Death:
	PLA1 H 10
	PLA1 I 10 A_Scream
	PLA1 J 10 A_NoBlocking
	PLA1 KLM 10
	PLA1 N -1
	Stop
  XDeath:
	PLA1 O 5
	PLA1 P 5 A_XScream
	PLA1 Q 5 A_NoBlocking
	PLA1 RSTUV 5
	PLA1 W -1
	Stop
  Raise:
	PLA1 MLKJIH 5
	Goto See
  }
}

actor pistolmarine : marinepistol replaces marinepistol
{
  tag "Pistol Marine"
  translation ""
  obituary "%o got a few holes from a marine with a pistol."
  +missilemore
  states
  {
  idle:
  spawn:
    PLA2 A 4 a_look
	loop
  see:
    PLA2 ABCD 4 a_chase
	loop
  missile:
    PLA2 E 4 a_facetarget
	PLA2 F 6 bright a_custombulletattack(8, 8, 1, random(15, 20), "bulletpuff", 0, cbaf_norandom)
	PLA2 E 4 a_facetarget
	PLA2 F 6 bright a_custombulletattack(8, 8, 1, random(15, 20), "bulletpuff", 0, cbaf_norandom)
	PLA2 E 4 a_facetarget
	PLA2 F 6 bright a_custombulletattack(8, 8, 1, random(15, 20), "bulletpuff", 0, cbaf_norandom)
	PLA2 E 4 a_facetarget
	PLA2 F 6 bright a_custombulletattack(8, 8, 1, random(15, 20), "bulletpuff", 0, cbaf_norandom)
	PLA2 E 4 a_facetarget
	goto see
  pain:
    PLA2 G 4
	PLA2 G 4 a_pain
	goto see
  death:
    PLA2 H 10
    PLA2 I 10 A_Scream
    PLA2 J 10 A_NoBlocking
    PLA2 KLM 10
    PLA2 N -1
    Stop
  xdeath:
    PLA2 O 5
    PLA2 P 5 A_XScream
    PLA2 Q 5 A_NoBlocking
    PLA2 RSTUV 5
    PLA2 W -1
    Stop
  }
}

actor shotgunmarine : marineshotgun replaces marineshotgun
{
  tag "Shotgun Marine"
  translation "112:127=16:47"
  obituary "%o was gunned down by a marine with a shotgun."
  attacksound "shotguy/attack"
  +missilemore
  states
  {
  idle:
  spawn:
    PLA3 A 4 a_look
	loop
  see:
    PLA3 ABCD 4 a_chase
	loop
  missile:
    PLA3 E 3 a_facetarget
	PLA3 F 7 bright a_custombulletattack(8, 8, 7, random(10, 15), "bulletpuff", 0, cbaf_norandom)
	PLA3 EEEE 5
	PLA3 E 7
	goto see
  pain:
    PLA3 G 4
	PLA3 G 4 a_pain
	goto see
  death:
    PLA3 H 10
    PLA3 I 10 A_Scream
    PLA3 J 10 A_NoBlocking
    PLA3 KLM 10
    PLA3 N -1
    Stop
  xdeath:
    PLA3 O 5
    PLA3 P 5 A_XScream
    PLA3 Q 5 A_NoBlocking
    PLA3 RSTUV 5
    PLA3 W -1
    Stop
  }
}

actor rocketmarine : marinerocket replaces marinerocket
{
  tag "Rocket Marine"
  +donthurtspecies
  translation "112:127=64:79"
  obituary "%o was blown up by a marine with a rocket launcher."
  states
  {
  idle:
  spawn:
    PLA5 A 4 a_look
	loop
  see:
    PLA5 ABCD 4 a_chase
	PLA5 A 0 a_jumpiftargetinlos("missile")
	loop
  missile:
    PLA5 EE 5 a_facetarget
	PLA5 F 5 bright a_custommissile("drmarinerocket", 32, 0, 0)
	PLA5 A 0 a_cposrefire
	goto missile
  pain:
    PLA5 G 4
	PLA5 G 4 a_pain
	goto see
  death:
    PLA5 H 10
    PLA5 I 10 A_Scream
    PLA5 J 10 A_NoBlocking
    PLA5 KLM 10
    PLA5 N -1
    Stop
  xdeath:
    PLA5 O 5
    PLA5 P 5 A_XScream
    PLA5 Q 5 A_NoBlocking
    PLA5 RSTUV 5
    PLA5 W -1
    Stop
  }
}

actor drmarinerocket : rocket replaces rocket
{
  scale 0.8
  speed 35
  states
  {
  Death:
	TNT1 A 0
    MISL B 0 a_settranslucent(1.0, 1)
    MISL B 8 bright A_Explode(128, 128, 0)
    MISL C 6 bright
    MISL D 4 bright
    Stop
  }
}

actor drmarinegrenade : grenade replaces grenade
{
  states
  {
  death:
	TNT1 A 0 
    MISL B 0 a_settranslucent(1.0, 1)
    MISL B 8 Bright A_Explode(128, 128, 0)
    MISL C 6 Bright
    MISL D 4 Bright
    Stop
  }
}

actor minigunmarine : shotgunmarine
{
	translation "112:123=212:223", "124:127=232:235"
	+missilemore
	attacksound "weapons/minigun"
	obituary "%o was drilled by a marine with a minigun."
	states
	{
	idle:
	spawn:
		PL42 A 4 a_look
		loop
	see:
		PL42 ABCD 4 a_chase
		loop
	missile:
		PL42 E 10 a_facetarget
		PL42 E 2 a_facetarget
		PL42 F 2 bright a_custombulletattack(8, 8, 1, random(10, 15), "bulletpuff", 0, cbaf_norandom)
		PL42 A 0 a_cposrefire
		goto missile+1
	pain:
		PL42 G 4
		PL42 G 4 a_pain
		goto see
	death:
		PL42 H 10
		PL42 I 10 A_Scream
		PL42 J 10 A_NoBlocking
		PL42 KLM 10
		PL42 N -1
		Stop
	xdeath:
		PL42 O 5
		PL42 P 5 A_XScream
		PL42 Q 5 A_NoBlocking
		PL42 RSTUV 5
		PL42 W -1
		Stop
	}
}

actor railgunmarine : marinerailgun replaces marinerailgun
{
  translation "112:127=240:247"
  +missilemore
  +missileevenmore
  states
  {
  Spawn:
	PRAI A 4 a_look
	loop
  See:
	PRAI ABCD 4 a_chase
	Loop
  Missile:
	PRAI E 4 A_M_CheckAttack
	PRAI F 6 BRIGHT A_M_FireRailgun
	Goto See
  Pain:
	PRAI G 4
	PRAI G 4 A_Pain
	Goto see
  Death:
	PRAI H 10
	PRAI I 10 A_Scream
	PRAI J 10 A_NoBlocking
	PRAI KLM 10
	PRAI N -1
	Stop
  XDeath:
	PRAI O 5
	PRAI P 5 A_XScream
	PRAI Q 5 A_NoBlocking
	PRAI RSTUV 5
	PRAI W -1
	Stop
  Raise:
	PRAI MLKJIH 5
	Goto See
  }
}

actor bfgmarine : marinebfg replaces marinebfg
{
  tag "BFG9000 marine"
  +missilemore
  +lookallaround
  translation "112:127=120:127"
  obituary "%o was vaporized by a marine with a BFG9000."
  states
  {
  idle:
  spawn:
    PLA7 A 4 A_Look
    Loop
  see:
    PLA7 ABCD 4 a_chase
	loop
  missile:
    PLA7 E 5 A_playsound("weapons/bfgf")
    PLA7 EEEE 5 A_FaceTarget
	PLA7 E 0 a_recoil(20)
	PLA7 E 5 a_facetarget
    PLA7 F 6 Bright a_custommissile("bfgball", 32, 0, 0)
    PLA7 A 4 A_FaceTarget
    goto see
  pain:
    PLA7 G 4
    PLA7 G 4 A_Pain
    Goto see
  death:
    PLA7 H 10
    PLA7 I 10 A_Scream
    PLA7 J 10 A_NoBlocking
    PLA7 KLM 10
    PLA7 N -1
    Stop
  xdeath:
    PLA7 O 5
    PLA7 P 5 A_XScream
    PLA7 Q 5 A_NoBlocking
    PLA7 RSTUV 5
    PLA7 W -1
    Stop
  }
}

actor bfg10kmarine : bfgmarine
{
  tag "BFG10K Marine"
  translation "112:119=104:111", "120:123=5:8", "124:127=0:0"
  +nopain
  +missileevenmore
  obituary "%o couldn't handle the firepower from a marine with a bfg10k."
  states
  {
  idle:
  spawn:
    PB10 AAA 4 A_Look
	PB10 A 0 A_PlaySound ("weapons/bfg10kidle")
    Loop
  see:
    PB10 ABCD 3 a_chase
	PB10 A 0 A_PlaySound ("weapons/bfg10kidle")
	loop
  missile:
    PB10 E 0 a_playsound("weapons/bfg10kf")
    PB10 EEEEEEE 4 a_facetarget
	PB10 E 0 a_recoil(20)
  missile2:
    PB10 F 2 bright a_custombulletattack(2, 2, 1, 0, "bfg10kshot")
	PB10 E 4
	PB10 E 0 a_cposrefire
	loop
  pain:
    PB10 G 4
    PB10 G 4 A_Pain
    Goto see
  death:
    PB10 H 10
    PB10 I 10 A_Scream
    PB10 J 10 A_NoBlocking
    PB10 KLM 10
    PB10 N -1
    Stop
  xdeath:
    PB10 O 5
    PB10 P 5 A_XScream
    PB10 Q 5 A_NoBlocking
    PB10 RSTUV 5
    PB10 W -1
    Stop
  }
}