//////////////////////////////////////////////////////////////
// Extra enemies using the MAD file patches
// !! Not present in the original game
//////////////////////////////////////////////////////////////

///////////////////////////////
// MT_SUBMARINE_SHOT
///////////////////////////////
ACTOR "MT_SUBMARINE_SHOT"
{
  Health 1000
  Radius 14
  Height 14
  Speed 1048576
  Damage 5
  Mass 100
  Reactiontime 8
  Seesound "MIS1ACT"
  Deathsound "MIS1EXP"
  Obituary "%o was drawned by a topedo"
  +MF_NOBLOCKMAP
  +MF_NOGRAVITY
  +MF_DROPOFF
  +MF_MISSILE
  +MF3_EX_ABSOLUTEDAMAGE
  States
  {
    Spawn:
    {
      FISS A 2 BRIGHT 
    SpawnLoop:
      FISS A 3 BRIGHT A_Tracer
      GoTo SpawnLoop
    }
    Death:
    {
      TNT1 A 0 A_SetScale(RANDOMPICK(9,10,11)/10)
      TNT1 A 0 A_Jump(128, 2)
      TNT1 A 0 A_FlipSprite
      FISS B RANDOMRANGE(3,6) BRIGHT A_FadeOut10
      FISS C RANDOMRANGE(3,6) BRIGHT A_FadeOut10
      FISS D RANDOMRANGE(3,6) BRIGHT A_FadeOut10
      FISS E RANDOMRANGE(3,6) BRIGHT A_FadeOut10
      FISS F RANDOMRANGE(3,6) BRIGHT A_FadeOut10
      Stop
    }
  }
}


///////////////////////////////
// MT_SUBMARINE
///////////////////////////////
ACTOR MT_SUBMARINE 3007
{
  Health 150
  Width 40
  Height 56
  Speed 8
  Painchance 120
  Mass 400
  Reactiontime 8
  SeeSound MECHAPP
  Attacksound MECHATT
  Painsound MECHHURT
  Deathsound MECXDTH
  +MF_SOLID
  +MF_NOBLOOD
  +MF_SHOOTABLE
  +MF_COUNTKILL
  +MF_FLOAT
  +MF_NOGRAVITY
  +MF_EX_SPAWNFLOAT
  +MF2_EX_DONTINFIGHTMONSTERS
  States
  {
    Spawn:
    {
      MEC1 EE 4 A_Look
      Loop
    }
    See:
    {
      TNT1 A 0 A_MatchTargetZ(2,6)
      MEC1 EE 4 A_Chase
      Loop
    }
    Missile:
    {
      MEC1 E 8 A_FaceTarget
      TNT1 A 0 A_MatchTargetZ(2,6)
      TNT1 A 0 A_AttackSound
      TNT1 A 0 A_CustomMissile("MT_SUBMARINE_SHOT", 22, 40)
      MEC1 F RANDOMRANGE(4,6) BRIGHT A_CustomMissile("MT_SUBMARINE_SHOT", 22, -40)
      TNT1 A 0 A_Jump(100, -2)
      MEC1 E 8
      Goto See
    }
    Pain:
    {
      MEC1 G 4
      MEC1 G 4 A_Pain
      Goto See
    }
    Death:
    {
      MEC1 H 5
      MEC1 I 5 A_Scream
      MEC1 J 5 
      TNT1 A 0 A_NoFloatBob
      TNT1 A 0 A_ChangeFlag(MF4_EX_FORCEUNDERWATERGRAVITY, TRUE)
      MEC1 K 5 A_Gravity
      MEC1 L 5
      TNT1 A 0 A_Fall
      MEC1 M -1
    }
  }
}


///////////////////////////////
// MT_DIVER
///////////////////////////////
ACTOR MT_DIVER 3008
{
  Health 100
  Width 32
  Height 56
  Speed 8
  Painchance 150
  Mass 200
  Reactiontime 8
  SeeSound MECHAPP
  Attacksound MECHATT
  Painsound MECHHURT
  Deathsound MECXDTH
  +MF_SOLID
  +MF_NOBLOOD
  +MF_SHOOTABLE
  +MF_COUNTKILL
  +MF_FLOAT
  +MF_NOGRAVITY
  +MF_EX_SPAWNFLOAT
  +MF2_EX_DONTINFIGHTMONSTERS
  States
  {
    Spawn:
    {
      MEC3 AA 6 A_Look
      Loop
    }
    See:
    {
      TNT1 A 0 A_MatchTargetZ(2,6)
      MEC3 CD 6 A_Chase
      Loop
    }
    Missile:
    {
      MEC3 E 8 A_FaceTarget
      TNT1 A 0 A_MatchTargetZ(2,6)
      TNT1 A 0 A_AttackSound
      TNT1 A 0 A_CustomMissile("MT_SUBMARINE_SHOT", 55, 16)
      MEC3 F 8 BRIGHT A_CustomMissile("MT_SUBMARINE_SHOT", 55, -16)
      MEC3 E 4 A_FaceTarget
      MEC3 D 4 A_FaceTarget
      Goto See
    }
    Pain:
    {
      MEC3 G 4
      MEC3 G 4 A_Pain
      Goto See
    }
    Death:
    {
      MEC3 H 5
      MEC3 I 5 A_Scream
      MEC3 J 5 
      TNT1 A 0 A_NoFloatBob
      TNT1 A 0 A_ChangeFlag(MF4_EX_FORCEUNDERWATERGRAVITY, TRUE)
      MEC3 K 5 A_Gravity
      MEC3 L 5
      TNT1 A 0 A_Fall
      MEC3 M -1
    }
  }
}
