actor FMarineFist : MarineFist replaces MarineFist
{
  health 175
  speed 20
  painchance 120
  +NODROPOFF
  +COUNTKILL
  meleedamage 3
  meleerange 60
  meleesound "marine/fists"
  PainChance "Control", 255
  DamageFactor "Control", 1
  obituary "%o was killed dead by a former colleague."

  // takes damage from 
  DamageFactor "MarineDamage", 1
  DamageFactor "CybRLDamage", 0.25
  DamageFactor "ImpBallDamage", 0.5
  DamageFactor "CacoDamage", 0.5
  DamageFactor "SkelDamage", 0.5
  DamageFactor "FatsoDamage", 0.5
  DamageFactor "KnightDamage", 0.5
  DamageFactor "ArachDamage", 0.5
  DamageFactor "viledamage", 0.5
  DamageFactor "ZombiesDamage", 0

  states
  {
  Spawn:
    UDM2 A 4 A_Look 
    UDM2 A 4 A_Look 
    UDM2 A 4 A_Look 
    UDM2 A 4 A_Look 
    UDM2 A 0 Thing_SetSpecial (0,226,409,0,health)
    loop
  Idle:
    UDM2 A 4 A_Look 
    UDM2 A 4 A_Look 
    UDM2 A 4 A_Look 
    UDM2 A 4 A_Look 
    UDM2 A 0 Thing_SetSpecial (0,226,409,0,health)
    loop
  Pain:
    UDM2 G 4
    UDM2 G 4 A_Pain
    Goto See
  See:
    UDM2 ABCD 2 A_Chase
    UDM2 A 0 A_JumpIf (special != 226,1) 
    loop	
    UDM2 A 0 Thing_SetSpecial (0,226,409,0,health)
    goto see
  Melee:
    UDM2 E 4 A_FaceTarget
    UDM2 F 4 A_CustomMeleeAttack(3,"marine/fists","none", "FBulletPuff")
    UDM2 A 4
    Goto See
  Missile:
    Stop
  Death.Control:
    TNT1 A 0 ACS_Execute(410,0,30)
    TNT1 A 10
    Stop
  Death:
    UDM2 H 10 A_GiveToTarget ("MarineExp",1)
    UDM2 I 10 A_Scream
    UDM2 J 10 A_NoBlocking
    UDM2 KLM 10
    UDM2 N -1
    Stop
  XDeath:
    UDM2 O 5 A_GiveToTarget ("MarineExp",1)
    UDM2 P 5 A_XScream
    UDM2 Q 5 A_NoBlocking
    UDM2 RSTU 5
    UDM2 V -1
    Stop
  Raise:
    UDM2 MLKJIH 5
    Goto See
  SkipAttack:
    Stop
  }
}

ACTOR FMarineBerserk : FMarineFist replaces MarineBerserk
{
  states
  {
  See:
    UDM2 AB 2 A_Chase
    UDM2 B 0 A_SpawnItemEx ("FBersRun",-5,0,0,0,0,0,0,SXF_NOCHECKPOSITION,0)
    UDM2 CD 2 A_Chase
    UDM2 D 0 A_SpawnItemEx ("FBersRun",-5,0,0,0,0,0,0,SXF_NOCHECKPOSITION,0)
    UDM2 A 0 A_JumpIf (special != 226,1) 
    loop	
    UDM2 A 0 Thing_SetSpecial (0,226,409,0,health)
    goto see
  Melee:
    UDM2 E 4 A_FaceTarget
    UDM2 F 4 A_CustomMeleeAttack(23,"marine/fists","none", "FBulletPuff")
    UDM2 A 4
    Goto See
  Death.Control:
    TNT1 A 0 ACS_Execute(410,0,31)
    TNT1 A 10
    Stop
  Death:
    UDM2 H 10 A_GiveToTarget ("MarineExp",4)
    UDM2 I 10 A_Scream
    UDM2 J 10 A_NoBlocking
    UDM2 J 0 A_SpawnItemEx ("FBersSplode",0,0,20,0,0,0,0,SXF_NOCHECKPOSITION,0)
    UDM2 KLM 10
    UDM2 N -1
    Stop
  XDeath:
    UDM2 O 5 A_GiveToTarget ("MarineExp",4)
    UDM2 P 5 A_XScream
    UDM2 Q 5 A_NoBlocking
    UDM2 Q 0 A_SpawnItemEx ("FBersSplode",0,0,20,0,0,0,0,SXF_NOCHECKPOSITION,0)
    UDM2 RSTU 5
    UDM2 V -1
    Stop
  }
}

actor FBersSplode
{
  +NOBLOCKMAP
  +NOGRAVITY
  +NOTELEPORT
  +DEHEXPLOSION
  States
  {
  Spawn:
    MISL B 0 bright
    MISL B 0 bright A_Explode (70, 128)
    MISL B 8 bright A_PlaySound ("weapons/rocklx")
    MISL C 6 bright
    MISL D 4 bright
    stop
  }
}


actor FBersRun
{
  Translation 0
  +NOBLOCKMAP
  +NOGRAVITY
  +NOTELEPORT
  RenderStyle translucent
  Alpha 0.40

  States
  {	
  Spawn:
    UDM2 ABCD 2
    stop
  }
}

ACTOR FMarineChainsaw : FMarineFist replaces MarineChainsaw
{
  dropitem "MChainsaw" 256
  meleesound "none"
  states
  {
  Spawn:
    UDM2 A 4 A_Look
    UDM2 A 4 A_Look
    UDM2 A 4 A_Look
    UDM2 A 4 A_Look
    UDM2 A 0 A_PlayWeaponSound("weapons/sawidle")
    UDM2 A 0 Thing_SetSpecial (0,226,409,0,health)
    loop
  Idle:
    UDM2 A 4 A_Look
    UDM2 A 4 A_Look
    UDM2 A 4 A_Look
    UDM2 A 4 A_Look
    UDM2 A 0 A_PlayWeaponSound("weapons/sawidle")
    UDM2 A 0 Thing_SetSpecial (0,226,409,0,health)
    loop
  Pain:
    UDM2 G 4
    UDM2 G 4 A_Pain
    Goto See
  See:
    UDM2 AB 2 A_Chase
    UDM2 CD 2 A_Chase
    UDM2 A 0 A_PlayWeaponSound("weapons/sawidle")
    UDM2 A 0 A_JumpIf (special != 226,1) 
    loop	
    UDM2 A 0 Thing_SetSpecial (0,226,409,0,health)
    goto see
  Melee:
    UDM2 E 4 A_FaceTarget
    UDM2 F 4 BRIGHT A_CustomMeleeAttack(2,"weapons/sawhit","weapons/sawfull", "FBulletPuff")
    UDM2 F 0 A_M_SawRefire
    goto Melee+1
    UDM2 A 0
    Goto See
  Death.Control:
    TNT1 A 0 ACS_Execute(410,0,32)
    TNT1 A 10
    Stop
  Death:
    UDM2 H 10 A_GiveToTarget ("MarineExp",2)
    UDM2 I 10 A_Scream
    UDM2 J 10 A_NoBlocking
    UDM2 KLM 10
    UDM2 N -1
    Stop
  XDeath:
    UDM2 O 5 A_GiveToTarget ("MarineExp",2)
    UDM2 P 5 A_XScream
    UDM2 Q 5 A_NoBlocking
    UDM2 RSTU 5
    UDM2 V -1
    Stop
  Raise:
    UDM2 MLKJIH 5
    Goto See
  }
}

ACTOR FMarinePistol : FMarineFist replaces MarinePistol
{
  dropitem "MClip" 256
  speed 16
  attackSound "weapons/pistol"
  meleesound "none"
  states
  {
  Spawn:
    UDM2 A 4 A_Look
    UDM2 A 4 A_Look
    UDM2 A 4 A_Look
    UDM2 A 4 A_Look
    UDM2 A 0 Thing_SetSpecial (0,226,409,0,health)
    loop
  Idle:
    UDM2 A 4 A_Look
    UDM2 A 4 A_Look
    UDM2 A 4 A_Look
    UDM2 A 4 A_Look
    UDM2 A 0 Thing_SetSpecial (0,226,409,0,health)
    loop
  Pain:
    UDM2 G 4
    UDM2 G 4 A_Pain
    Goto See
  See:
    UDM2 ABCD 3 A_Chase
    UDM2 A 0 A_JumpIf (special != 226,1) 
    loop	
    UDM2 A 0 Thing_SetSpecial (0,226,409,0,health)
    goto see
  Missile:
    UDM2 E 4 A_FaceTarget
    UDM2 F 6 BRIGHT A_CustomBulletAttack (5.5,2.2,1,6,"FBulletPuff")
    UDM2 E 4 A_FaceTarget
    UDM2 E 0 A_M_Refire
    UDM2 A 5
    Goto See
  Melee:
    Stop
  Death.Control:
    TNT1 A 0 ACS_Execute(410,0,33)
    TNT1 A 10
    Stop
  Death:
    UDM2 H 10 A_GiveToTarget ("MarineExp",2)
    UDM2 I 10 A_Scream
    UDM2 J 10 A_NoBlocking
    UDM2 KLM 10
    UDM2 N -1
    Stop
  XDeath:
    UDM2 O 5 A_GiveToTarget ("MarineExp",2)
    UDM2 P 5 A_XScream
    UDM2 Q 5 A_NoBlocking
    UDM2 RSTU 5
    UDM2 V -1
    Stop
  Raise:
    UDM2 MLKJIH 5
    Goto See
  }
}

ACTOR FMarineShotgun : FMarineFist replaces MarineShotgun
{
  dropitem "MShotgun" 256
  speed 16
  attacksound "weapons/shotgf"
  meleesound "none"
  states
  {
  Spawn:
    UDM2 A 4 A_Look
    UDM2 A 4 A_Look
    UDM2 A 4 A_Look
    UDM2 A 4 A_Look
    UDM2 A 0 Thing_SetSpecial (0,226,409,0,health)
    loop
  Idle:
    UDM2 A 4 A_Look
    UDM2 A 4 A_Look
    UDM2 A 4 A_Look
    UDM2 A 4 A_Look
    UDM2 A 0 Thing_SetSpecial (0,226,409,0,health)
    loop
  Pain:
    UDM2 G 4
    UDM2 G 4 A_Pain
    Goto See
  See:
    UDM2 ABCD 3 A_Chase
    UDM2 A 0 A_JumpIf (special != 226,1) 
    loop	
    UDM2 A 0 Thing_SetSpecial (0,226,409,0,health)
    goto see
  Missile:
    UDM2 E 3 A_FaceTarget
    UDM2 F 7 BRIGHT A_CustomBulletAttack (7.6, 2.8, 8, 5, "FBulletPuff")
    UDM2 E 7 A_FaceTarget
    UDM2 E 0 A_M_Refire
    UDM2 A 5
    Goto See
  Melee:
    Stop
  Death.Control:
    TNT1 A 0 ACS_Execute(410,0,34)
    TNT1 A 10
    Stop
  Death:
    UDM2 H 10 A_GiveToTarget ("MarineExp",3)
    UDM2 I 10 A_Scream
    UDM2 J 10 A_NoBlocking
    UDM2 KLM 10
    UDM2 N -1
    Stop
  XDeath:
    UDM2 O 5 A_GiveToTarget ("MarineExp",3)
    UDM2 P 5 A_XScream
    UDM2 Q 5 A_NoBlocking
    UDM2 RSTU 5
    UDM2 V -1
    Stop
  Raise:
    UDM2 MLKJIH 5
    Goto See
  }
}

ACTOR FMarineSSG : FMarineFist replaces MarineSSG
{
  dropitem "MSuperShotgun" 256
  speed 16
  attacksound "SSGUNER/SSG"
  meleesound "none"
  states
  {
  Spawn:
    UDM2 A 4 A_Look
    UDM2 A 4 A_Look
    UDM2 A 4 A_Look
    UDM2 A 4 A_Look
    UDM2 A 0 Thing_SetSpecial (0,226,409,0,health)
    loop
  Idle:
    UDM2 A 4 A_Look
    UDM2 A 4 A_Look
    UDM2 A 4 A_Look
    UDM2 A 4 A_Look
    UDM2 A 0 Thing_SetSpecial (0,226,409,0,health)
    loop
  Pain:
    UDM2 G 4
    UDM2 G 4 A_Pain
    Goto See
  See:
    UDM2 ABCD 3 A_Chase
    UDM2 A 0 A_JumpIf (special != 226,1) 
    loop	
    UDM2 A 0 Thing_SetSpecial (0,226,409,0,health)
    goto see
  Missile:
    UDM2 E 7 A_FaceTarget
    UDM2 F 14 BRIGHT A_CustomBulletAttack (13.2, 8.1, 20, 5, "FBulletPuff")
    UDM2 E 21 A_FaceTarget
    UDM2 E 0 A_M_Refire
    UDM2 A 5
    Goto See
  Melee:
    Stop
  Death.Control:
    TNT1 A 0 ACS_Execute(410,0,35)
    TNT1 A 10
    Stop
  Death:
    UDM2 H 10 A_GiveToTarget ("MarineExp",4)
    UDM2 I 10 A_Scream
    UDM2 J 10 A_NoBlocking
    UDM2 KLM 10
    UDM2 N -1
    Stop
  XDeath:
    UDM2 O 5 A_GiveToTarget ("MarineExp",4)
    UDM2 P 5 A_XScream
    UDM2 Q 5 A_NoBlocking
    UDM2 RSTU 5
    UDM2 V -1
    Stop
  Raise:
    UDM2 MLKJIH 5
    Goto See
  }
}

ACTOR FMarineChaingun : FMarineFist replaces MarineChaingun
{
  dropitem "MChaingun" 256
  speed 16
  attacksound "weapons/pistol"
  meleesound "none"
  states
  {
  Spawn:
    UDM2 A 4 A_Look
    UDM2 A 4 A_Look
    UDM2 A 4 A_Look
    UDM2 A 4 A_Look
    UDM2 A 0 Thing_SetSpecial (0,226,409,0,health)
    loop
  Idle:
    UDM2 A 4 A_Look
    UDM2 A 4 A_Look
    UDM2 A 4 A_Look
    UDM2 A 4 A_Look
    UDM2 A 0 Thing_SetSpecial (0,226,409,0,health)
    loop
  Pain:
    UDM2 G 4
    UDM2 G 4 A_Pain
    Goto See
  See:
    UDM2 ABCD 3 A_Chase
    UDM2 A 0 A_JumpIf (special != 226,1) 
    loop	
    UDM2 A 0 Thing_SetSpecial (0,226,409,0,health)
    goto see
  Missile:
    UDM2 E 2 A_FaceTarget
    UDM2 F 2 BRIGHT A_CustomBulletAttack (7.2, 2.4, 1, 6, "FBulletPuff")
    UDM2 E 2 A_FaceTarget
    UDM2 F 2 BRIGHT A_CustomBulletAttack (7.2, 2.4, 1, 6, "FBulletPuff")
    UDM2 E 2 A_FaceTarget
    UDM2 E 0 A_M_Refire
  Goto Missile+1
    UDM2 A 5
    Goto See
  Melee:
    Stop
  Death.Control:
    TNT1 A 0 ACS_Execute(410,0,36)
    TNT1 A 10
    Stop
  Death:
    UDM2 H 10 A_GiveToTarget ("MarineExp",4)
    UDM2 I 10 A_Scream
    UDM2 J 10 A_NoBlocking
    UDM2 KLM 10
    UDM2 N -1
    Stop
  XDeath:
    UDM2 O 5 A_GiveToTarget ("MarineExp",4)
    UDM2 P 5 A_XScream
    UDM2 Q 5 A_NoBlocking
    UDM2 RSTU 5
    UDM2 V -1
    Stop
  Raise:
    UDM2 MLKJIH 5
    Goto See
  }
}

ACTOR FMarineRocket : FMarineFist replaces MarineRocket
{
  speed 16
  MissileType PCybRocket
  meleesound "none"
  dropitem "MRocketlauncher" 256
  states
  {
  Spawn:
    UDM2 A 4 A_Look
    UDM2 A 4 A_Look
    UDM2 A 4 A_Look
    UDM2 A 4 A_Look
    UDM2 A 0 Thing_SetSpecial (0,226,409,0,health)
    loop
  Idle:
    UDM2 A 4 A_Look
    UDM2 A 4 A_Look
    UDM2 A 4 A_Look
    UDM2 A 4 A_Look
    UDM2 A 0 Thing_SetSpecial (0,226,409,0,health)
    loop
  Pain:
    UDM2 G 4
    UDM2 G 4 A_Pain
    Goto See
  See:
    UDM2 ABCD 3 A_Chase
    UDM2 A 0 A_JumpIf (special != 226,1) 
    loop	
    UDM2 A 0 Thing_SetSpecial (0,226,409,0,health)
    goto see
  Missile:
    UDM2 E 0 A_JumpIfCloser (90,"See")
    UDM2 E 8
    UDM2 F 6 BRIGHT A_MissileAttack
    UDM2 A 6
    UDM2 A 0 A_Jump (100, 1)
    Goto Missile
    UDM2 A 0 
    Goto See
  Melee:
    Stop
  Death.Control:
    TNT1 A 0 ACS_Execute(410,0,37)
    TNT1 A 10
    Stop
  Death:
    UDM2 H 10 A_GiveToTarget ("MarineExp",6)
    UDM2 I 10 A_Scream
    UDM2 J 10 A_NoBlocking
    UDM2 KLM 10
    UDM2 N -1
    Stop
  XDeath:
    UDM2 O 5 A_GiveToTarget ("MarineExp",6)
    UDM2 P 5 A_XScream
    UDM2 Q 5 A_NoBlocking
    UDM2 RSTU 5
    UDM2 V -1
    Stop
  Raise:
    UDM2 MLKJIH 5
    Goto See
  }
}

ACTOR FMarinePlasma : FMarineFist replaces MarinePlasma
{
  speed 16
  MissileType FPlasmaBall
  dropitem "MPlasmaRifle" 256
  meleesound "none"
  states
  {
  Spawn:
    UDM2 A 4 A_Look
    UDM2 A 4 A_Look
    UDM2 A 4 A_Look
    UDM2 A 4 A_Look
    UDM2 A 0 Thing_SetSpecial (0,226,409,0,health)
    loop
  Idle:
    UDM2 A 4 A_Look
    UDM2 A 4 A_Look
    UDM2 A 4 A_Look
    UDM2 A 4 A_Look
    UDM2 A 0 Thing_SetSpecial (0,226,409,0,health)
    loop
  Pain:
    UDM2 G 4
    UDM2 G 4 A_Pain
    Goto See
  See:
    UDM2 ABCD 3 A_Chase
    UDM2 A 0 A_JumpIf (special != 226,1) 
    loop	
    UDM2 A 0 Thing_SetSpecial (0,226,409,0,health)
    goto see
  Missile:
    UDM2 E 2 A_FaceTarget
    UDM2 F 3 BRIGHT A_MissileAttack
    UDM2 E 0 A_M_Refire
  Goto Missile
    UDM2 A 20
    Goto See
  Melee:
    Stop
  Death.Control:
    TNT1 A 0 ACS_Execute(410,0,38)
    TNT1 A 10
    Stop
  Death:
    UDM2 H 10 A_GiveToTarget ("MarineExp",6)
    UDM2 I 10 A_Scream
    UDM2 J 10 A_NoBlocking
    UDM2 KLM 10
    UDM2 N -1
    Stop
  XDeath:
    UDM2 O 5 A_GiveToTarget ("MarineExp",6)
    UDM2 P 5 A_XScream
    UDM2 Q 5 A_NoBlocking
    UDM2 RSTU 5
    UDM2 V -1
    Stop
  Raise:
    UDM2 MLKJIH 5
    Goto See
  }
}

ACTOR FPlasmaBall : PlasmaBall
{
 DamageType "ZombiesDamage"
}

ACTOR FMarineBFG : FMarineFist replaces MarineBFG
{
  dropitem "MBFG9000" 256
  speed 12
  meleesound "none"
  states
  {
  Spawn:
    UDM2 A 4 A_Look
    UDM2 A 4 A_Look
    UDM2 A 4 A_Look
    UDM2 A 4 A_Look
    UDM2 A 0 Thing_SetSpecial (0,226,409,0,health)
    loop
  Idle:
    UDM2 A 4 A_Look
    UDM2 A 4 A_Look
    UDM2 A 4 A_Look
    UDM2 A 4 A_Look
    UDM2 A 0 Thing_SetSpecial (0,226,409,0,health)
    loop
  Pain:
    UDM2 G 4
    UDM2 G 4 A_Pain
    Goto See
  See:
    UDM2 ABCD 4 A_Chase
    UDM2 A 0 A_JumpIf (special != 226,1) 
    loop	
    UDM2 A 0 Thing_SetSpecial (0,226,409,0,health)
    goto see
  Missile:
    UDM2 E 5 A_M_BFGSound
    UDM2 EEEEE 5 A_FaceTarget
    UDM2 F 6 A_M_FireBFG
    UDM2 A 6 A_FaceTarget
    UDM2 A 0 A_M_Refire
    Loop
    UDM2 A 0
    Goto See
  Melee:
    Stop
  Death.Control:
    TNT1 A 0 ACS_Execute(410,0,40)
    TNT1 A 10
    Stop
  Death:
    UDM2 H 10 A_GiveToTarget ("MarineExp",9)
    UDM2 I 10 A_Scream
    UDM2 J 10 A_NoBlocking
    UDM2 KLM 10
    UDM2 N -1
    Stop
  XDeath:
    UDM2 O 5 A_GiveToTarget ("MarineExp",9)
    UDM2 P 5 A_XScream
    UDM2 Q 5 A_NoBlocking
    UDM2 RSTU 5
    UDM2 V -1
    Stop
  Raise:
    UDM2 MLKJIH 5
    Goto See
  }
}

actor FBFGBall : BFGBall replaces BFGBall
{
  DamageType "CybRLDamage"
  States
  {
  Death:
    BFE1 AB 8 bright
    BFE1 C 8 bright A_BFGSpray("FBFGExtra")
    BFE1 DEF 8 bright
    stop
  }
}

actor FBFGExtra : BFGExtra
{
  DamageType "CybRLDamage"
}

Actor FMarineRailgun : FMarinePlasma replaces MarineRailgun {}
