ACTOR Beacon : CustomInventory
{
//$Category "ZDoom Items pack"
  +INVBAR
  Inventory.MaxAmount 3
  Inventory.Icon "BEACZ0"
  Inventory.PickupSound "Beacon/Pickup"
  Inventory.PickupMessage "Friendly marine beacon!"
  Tag "Beacon - Summons friendly marines to help you out"
  States
  {
  Spawn:
    BEAC A -1
    Stop
  Use:
    TNT1 A 1 A_SpawnItemEx ("ActiveBeacon", 56, 0, 8, 0, 0, 0, 0, 1)
    Stop
  }
}

actor ActiveBeacon
{
  -SOLID
  -SHOOTABLE
  +FRIENDLY
  States
  {
  Spawn:
    BEAC A 105
    BEAC A 0 A_CustomMissile ("TeleportFog", 0, 0, 0, 0, 0)
    BEAC A 0 A_SpawnItemEx ("FriendlyMarineSpawner", 0, 0, 8, 0, 0, 0, 0, 1)
    BEAC A 105
    BEAC A 0 A_CustomMissile ("TeleportFog", 0, 0, 0, 0, 0)
    BEAC A 0 A_SpawnItemEx ("FriendlyMarineSpawner", 0, 0, 8, 0, 0, 0, 0, 1)
    BEAC A 105
    BEAC A 0 A_CustomMissile ("TeleportFog", 0, 0, 0, 0, 0)
    BEAC A 0 A_SpawnItemEx ("FriendlyMarineSpawner", 0, 0, 8, 0, 0, 0, 0, 1)
    BEAC A 105
    goto Death
  Death:
    TNT1 A 1 A_CustomMissile ("TeleportFog", 0, 0, 0, 0, 0)
    stop
  }
}

ACTOR FriendlyMarineSpawner : RandomSpawner
{
+FRIENDLY
DropItem "FriendlyMarineShotgun", 256, 30
DropItem "FriendlyMarineAssaultRifle", 256, 30
DropItem "FriendlyMarineSSG", 256, 23
DropItem "FriendlyMarineQuad", 256, 18
DropItem "FriendlyMarineMinigun", 256, 18
DropItem "FriendlyMarineAssaultShotgun", 256, 18
DropItem "FriendlyMarineRocket", 256, 14
DropItem "FriendlyMarinePlasma", 256, 14
DropItem "FriendlyMarineDTech", 256, 10
DropItem "FriendlyMarineFreezer", 256, 10
DropItem "FriendlyMarineRailgun", 256, 10
DropItem "FriendlyMarineHexa", 256, 5
//DropItem "FriendlyMarineLegendary", 256, 1
}










ACTOR FriendlyMarineBulletPuff : ModdedBulletPuff
{
  +MTHRUSPECIES
}



ACTOR FriendlyMarineShotgun : MarineShotgun
{
  Health 350
  Speed 20
  +MISSILEEVENMORE
  +FRIENDLY
  +THRUSPECIES
  +MTHRUSPECIES
  +DONTHARMSPECIES
  +DONTHARMCLASS
  Species "Player"
  DamageFactor "Player", 0.0
  DamageFactor "Players", 0.0
  DamageFactor "PlayerDevBall", 0.0
  DamageFactor "PlayerDevBall2", 0.0
  DamageFactor "PlayerDevTracer", 0.0
  DamageFactor "PlayerExplosive", 0.0
  DamageFactor "PlayerDTRG", 0.0
  DamageFactor "PDTBFG", 0.0
  DamageFactor "PDTBFGTracer", 0.0
  DamageFactor "LegendaryPlayer", 0.0
  DamageFactor "LegendaryGuruPlayer", 0.0
  AttackSound "weapons/12gaugefire"
  DeathSound "cpm/death"
  DropItem "StimKit" 80
  DropItem "ArmorBooster" 80
  DropItem "AmmoPack" 128
  States
  {
  Spawn:
    PLA3 ABCD 5 A_Wander
	TNT1 A 0 A_Look
    Loop
  See:
    PLA3 ABCD 4 A_MarineChase
    Loop
  Missile:
    PLA3 E 3 A_FaceTarget
	TNT1 AAAA 0 Bright A_CustomMissile("MonsterTracer2",Random(28,34),0,Random(6,-6),0)
    PLA3 F 5 Bright A_CustomBulletAttack(5,3,7,Random(5,7),"FriendlyMarineBulletPuff")
    PLA3 E 10 A_FaceTarget
	PLA3 E 8 A_PlaySound("weapons/12gsgcock")
    TNT1 A 0 A_SpawnItemEx("ShellCasing", -8, 0, 30, Random(2, 6), 0, Random(1, 3), Random(-80, -90), 128)
	TNT1 A 0 A_Jump(64,"See")
	TNT1 A 0 A_MonsterRefire(128,"See")
    Loop
  Pain:
    PLA3 G 4
    PLA3 G 4 A_Pain
    Goto Idle
  Death:
	PLA3 H 8
	PLA3 I 8 A_PlayerScream
	PLA3 J 8 A_NoBlocking
	PLA3 K 8
	PLA3 L 8 A_SpawnItem("BodyCrash",0,0,0,0)
	PLA3 M 8
	PLA3 N -1
    Stop
  XDeath:
	TNT1 A 0 A_SpawnItemEx("GibbedGenerator",0,0,0,0,0,0,0,128,0)
	PLA3 P 3 A_XScream
	PLA3 Q 3 A_NoBlocking
	PLA3 RSTUV 3
	PLA3 W -1
    Stop
  Raise:
    Stop
  }
}


ACTOR FriendlyMarineAssaultRifle : FriendlyMarineShotgun
{
  AttackSound "weapons/assaultrifle"
  States
  {
  Spawn:
    PLA4 ABCD 5 A_Wander
	TNT1 A 0 A_Look
    Loop
  See:
    PLA4 ABCD 4 A_MarineChase
    Loop
  Missile:
    PLA4 E 10 A_FaceTarget
    TNT1 A 0 A_SpawnItemEx("RifleCasing", 12, 6, 30, Random(2, 6), 0, Random(1, 3), Random(-80, -90), 128)
    PLA4 F 2 Bright A_CustomBulletAttack(7,2,1,Random(5,7),"FriendlyMarineBulletPuff")
    PLA4 E 2 A_FaceTarget
	TNT1 A 0 A_SpawnItemEx("RifleCasing", 12, 6, 30, Random(2, 6), 0, Random(1, 3), Random(-80, -90), 128)
    PLA4 F 2 Bright A_CustomBulletAttack(7,2,1,Random(5,7),"FriendlyMarineBulletPuff")
    PLA4 E 2 A_FaceTarget
    TNT1 A 0 A_SpawnItemEx("RifleCasing", 12, 6, 30, Random(2, 6), 0, Random(1, 3), Random(-80, -90), 128)
    PLA4 F 2 Bright A_CustomBulletAttack(7,2,1,Random(5,7),"FriendlyMarineBulletPuff")	
    PLA4 E 2 A_FaceTarget
    TNT1 A 0 A_CPosRefire
    Goto Missile+1
  Pain:
    PLA4 G 4
    PLA4 G 4 A_Pain
    Goto Idle
  Death:
	PLA4 H 8
	PLA4 I 8 A_PlayerScream
	PLA4 J 8 A_NoBlocking
	PLA4 K 8
	PLA4 L 8 A_SpawnItem("BodyCrash",0,0,0,0)
	PLA4 M 8
	PLA4 N -1
    Stop
  XDeath:
	TNT1 A 0 A_SpawnItemEx("GibbedGenerator",0,0,0,0,0,0,0,128,0)
	PLA4 P 3 A_XScream
	PLA4 Q 3 A_NoBlocking
	PLA4 RSTUV 3
	PLA4 W -1
    Stop
  Raise:
    Stop
  }
}


ACTOR FriendlyMarineSSG : FriendlyMarineShotgun
{
  AttackSound " "
  States
  {
  Spawn:
    PLA9 ABCD 5 A_Wander
	TNT1 A 0 A_Look
    Loop
  See:
    PLA9 ABCD 4 A_MarineChase
    Loop
  Missile:
	TNT1 A 0 A_JumpIfInventory("SSGZombieToken",2,"Reload")
	TNT1 A 0 A_JumpIfCloser(275,"Double")
  Normal:
    PLA9 E 15 A_FaceTarget
	TNT1 A 0 A_PlaySound("weapons/ssgsingleshot")
	TNT1 A 0 A_GiveInventory("SSGZombieToken",1)
	TNT1 AAAA 0 Bright A_CustomMissile("MonsterTracer2",Random(28,34),0,Random(6,-6),0)
    PLA9 F 4 Bright A_CustomBulletAttack(4.6,2.8,7,Random(5,7),"FriendlyMarineBulletPuff")
    PLA9 E 8 A_FaceTarget
	TNT1 A 0 A_JumpIfInventory("SSGZombieToken",2,"Reload")	
	Goto See
  Double:
    TNT1 A 0 A_JumpIfInventory("SSGZombieToken",1,"Normal")
    PLA9 E 15 A_FaceTarget
	TNT1 A 0 A_PlaySound("weapons/sshotf")
	TNT1 A 0 A_GiveInventory("SSGZombieToken",2)
	TNT1 AAAAAAAA 0 Bright A_CustomMissile("MonsterTracer2",Random(28,34),0,Random(6,-6),0)
    PLA9 F 5 Bright A_CustomBulletAttack(11.2,7.1,20,5,"FriendlyMarineBulletPuff")
    PLA9 E 15 A_FaceTarget
  Reload:
	TNT1 A 0 A_TakeInventory("SSGZombieToken",2)
	PLA9 E 6 A_FaceTarget
	PLA9 E 12 A_PlaySound("weapons/sawedopen")
    TNT1 A 0 A_SpawnItemEx("ShellCasing", -8, 6, 36, Random(2, 6), 0, Random(1, 3), Random(-80, -90), 128)
    PLA9 E 1 A_SpawnItemEx("ShellCasing", -10, 6, 36, Random(2, 6), 0, Random(1, 3), Random(-80, -90), 128)
	PLA9 E 12 A_PlaySound("weapons/shellslide")
	PLA9 E 12 A_PlaySound("weapons/sawedclose")
    PLA9 E 6
    Goto See
  Pain:
    PLA9 G 4
    PLA9 G 4 A_Pain
    Goto Idle
  Death:
	PLA9 H 8
	PLA9 I 8 A_PlayerScream
	PLA9 J 8 A_NoBlocking
	PLA9 K 8
	PLA9 L 8 A_SpawnItem("BodyCrash",0,0,0,0)
	PLA9 M 8
	PLA9 N -1
    Stop
  XDeath:
	TNT1 A 0 A_SpawnItemEx("GibbedGenerator",0,0,0,0,0,0,0,128,0)
	PLA9 P 3 A_XScream
	PLA9 Q 3 A_NoBlocking
	PLA9 RSTUV 3
	PLA9 W -1
    Stop
  Raise:
    Stop
  }
}


ACTOR FriendlyMarineQuad : FriendlyMarineShotgun
{
  AttackSound " "
  Translation "112:127=80:111"
  States
  {
  Spawn:
    PQST ABCD 5 A_Wander
	TNT1 A 0 A_Look
    Loop
  See:
    PQST ABCD 4 A_MarineChase
    Loop
Missile:
	TNT1 A 0 A_JumpIfInventory("QSGZombieToken",2,"Reload")
	TNT1 A 0 A_JumpIfCloser(325,"Quad")
Normal:
    PQST E 15 A_FaceTarget
	TNT1 A 0 A_PlaySound("weapons/qsgdoublefire")
	TNT1 A 0 A_GiveInventory("QSGZombieToken",1)
	TNT1 AAAAAA 0 Bright A_CustomMissile("MonsterTracer2",Random(28,34),0,Random(6,-6),0)
    PQST F 5 Bright A_CustomBulletAttack(11.2,7.1,20,5,"FriendlyMarineBulletPuff") 
    PQST E 15 A_FaceTarget
	TNT1 A 0 A_JumpIfInventory("QSGZombieToken",2,"Reload")
	Goto See
Quad:
	TNT1 A 0 A_JumpIfInventory("QSGZombieToken",1,"Normal")
    PQST E 15 A_FaceTarget
	TNT1 A 0 A_PlaySound("weapons/qsgfire")
	TNT1 A 0 A_GiveInventory("QSGZombieToken",2)
	TNT1 AAAAAAAAAAAA 0 Bright A_CustomMissile("MonsterTracer2",Random(28,34),0,Random(6,-6),0)
    PQST F 5 Bright A_CustomBulletAttack(11.8,7.3,52,5,"FriendlyMarineBulletPuff")
    PQST E 25 A_FaceTarget	
Reload:
	TNT1 A 0 A_TakeInventory("QSGZombieToken",2)
	TNT1 A 0 A_PlaySound("weapons/qsgopen")	
    PQST E 15 A_FaceTarget
    TNT1 A 0 A_SpawnItemEx("ShellCasing", -8, 6, 36, Random(2, 6), 0, Random(1, 3), Random(-80, -90), 128)
    PQST E 1 A_SpawnItemEx("ShellCasing", -10, 6, 36, Random(2, 6), 0, Random(1, 3), Random(-80, -90), 128)
    TNT1 A 0 A_SpawnItemEx("ShellCasing", -8, 6, 38, Random(2, 6), 0, Random(1, 3), Random(-80, -90), 128)
    PQST E 2 A_SpawnItemEx("ShellCasing", -10, 6, 38, Random(2, 6), 0, Random(1, 3), Random(-80, -90), 128)
    PQST E 12 A_PlaySound("weapons/qsgshellslide")	
    PQST E 8
    PQST E 12 A_PlaySound("weapons/qsgshellslide")	
    PQST E 8	
    PQST E 10 A_PlaySound("weapons/qsgclose")	
    Goto See
  Pain:
    PQST G 4
    PQST G 4 A_Pain
    Goto Idle
  Death:
	PQST H 8
	PQST I 8 A_PlayerScream
	PQST J 8 A_NoBlocking
	PQST K 8
	PQST L 8 A_SpawnItem("BodyCrash",0,0,0,0)
	PQST M 8
	PQST N -1
    Stop
  XDeath:
	TNT1 A 0 A_SpawnItemEx("GibbedGenerator",0,0,0,0,0,0,0,128,0)
	PQST P 3 A_XScream
	PQST Q 3 A_NoBlocking
	PQST RSTUV 3
	PQST W -1
    Stop
  Raise:
    Stop
  }
}


ACTOR FriendlyMarineMinigun : FriendlyMarineShotgun
{
  AttackSound "weapons/minigunfire"
  Translation "112:127=80:111"
  States
  {
  Spawn:
    PL42 ABCD 5 A_Wander
	TNT1 A 0 A_Look
    Loop
  See:
    PL42 ABCD 4 A_MarineChase
    Loop
  Missile:
    TNT1 A 0 A_PlaySound("weapons/mgunspinstart")
    PL42 E 10 A_FaceTarget
	TNT1 A 0 A_PlaySoundEx("weapons/mgunspin","Voice")
	TNT1 A 0 A_CustomMissile("MonsterTracer",Random(30,34),0,Random(5,-5),0)
    TNT1 A 0 A_SpawnItemEx("RifleCasing", 12, 6, 28, Random(2, 6), 0, Random(1, 3), Random(-80, -90), 128)
    PL42 E 3 Bright A_CustomBulletAttack(4.8,2.4,1,Random(7,10),"FriendlyMarineBulletPuff")
	TNT1 A 0 A_CustomMissile("MonsterTracer",Random(30,34),0,Random(5,-5),0)
    TNT1 A 0 A_SpawnItemEx("RifleCasing", 12, 6, 30, Random(2, 6), 0, Random(1, 3), Random(-80, -90), 128)
    PL42 F 3 Bright A_CustomBulletAttack(4.8,2.4,1,Random(7,10),"FriendlyMarineBulletPuff")
	TNT1 A 0 A_StopSoundEx("Voice")
    TNT1 A 0 A_CPosRefire
    Goto Missile+2
  Pain:
    PL42 G 4
    PL42 G 4 A_Pain
    Goto Idle
  Death:
	PL42 H 8
	PL42 I 8 A_PlayerScream
	PL42 J 8 A_NoBlocking
	PL42 K 8
	PL42 L 8 A_SpawnItem("BodyCrash",0,0,0,0)
	PL42 M 8
	PL42 N -1
    Stop
  XDeath:
	TNT1 A 0 A_SpawnItemEx("GibbedGenerator",0,0,0,0,0,0,0,128,0)
	PL42 P 3 A_XScream
	PL42 Q 3 A_NoBlocking
	PL42 RSTUV 3
	PL42 W -1
    Stop
  Raise:
    Stop
  }
}


ACTOR FriendlyMarineAssaultShotgun : FriendlyMarineShotgun
{
  AttackSound "AShotgun/Fire"
  Translation "112:127=80:111"
  States
  {
  Spawn:
    PASG ABCD 5 A_Wander
	TNT1 A 0 A_Look
    Loop
  See:
    PASG ABCD 4 A_MarineChase
    Loop
  Pause:
    PASG E 20
	Goto See
  Missile:
    PASG E 15 A_FaceTarget
	TNT1 A 0 A_SpawnItemEx("ShellCasing", -8, 7, 30, 4, 0, (0.1)*Random(30, 40), Random(-80, -90), 128)
	TNT1 AAAA 0 Bright A_CustomMissile("MonsterTracer2",Random(28,34),0,Random(6,-6),0)
    PASG F 4 Bright A_CustomBulletAttack(5.0,3.0,7,Random(5,7),"FriendlyMarineBulletPuff")
    PASG E 8 A_FaceTarget
	TNT1 A 0 A_Jump(40,"Pause")	
	TNT1 A 0 Bright A_MonsterRefire(200,"See")
    Goto Missile+1
  Pain:
    PASG G 4
    PASG G 4 A_Pain
    Goto Idle
  Death:
	PASG H 8
	PASG I 8 A_PlayerScream
	PASG J 8 A_NoBlocking
	PASG K 8
	PASG L 8 A_SpawnItem("BodyCrash",0,0,0,0)
	PASG M 8
	PASG N -1
    Stop
  XDeath:
	TNT1 A 0 A_SpawnItemEx("GibbedGenerator",0,0,0,0,0,0,0,128,0)
	PASG P 3 A_XScream
	PASG Q 3 A_NoBlocking
	PASG RSTUV 3
	PASG W -1
    Stop
  Raise:
    Stop
  }
}


ACTOR FriendlyMarineRocket : FriendlyMarineShotgun
{
  AttackSound " "
  Translation "112:127=48:79"
  States
  {
  Spawn:
    PLA5 ABCD 5 A_Wander
	TNT1 A 0 A_Look
    Loop
  See:
    PLA5 ABCD 4 A_MarineChase
    Loop
Missile:
    PLA5 E 14 A_FaceTarget
    PLA5 F 6 Bright A_CustomMissile("NewRocket", 30, 0, 0)
	PLA5 E 20 A_PlaySound("rocket/drumspin")
	TNT1 A 0 A_Jump(100,"See")
	TNT1 A 0 A_MonsterRefire(180,"See")
    Goto Missile+1
  Pain:
    PLA5 G 4
    PLA5 G 4 A_Pain
    Goto Idle
  Death:
	PLA5 H 8
	PLA5 I 8 A_PlayerScream
	PLA5 J 8 A_NoBlocking
	PLA5 K 8
	PLA5 L 8 A_SpawnItem("BodyCrash",0,0,0,0)
	PLA5 M 8
	PLA5 N -1
    Stop
  XDeath:
	TNT1 A 0 A_SpawnItemEx("GibbedGenerator",0,0,0,0,0,0,0,128,0)
	PLA5 P 3 A_XScream
	PLA5 Q 3 A_NoBlocking
	PLA5 RSTUV 3
	PLA5 W -1
    Stop
  Raise:
    Stop
  }
}


ACTOR FriendlyMarinePlasma : FriendlyMarineShotgun
{
  AttackSound " "
  Translation "112:127=48:79"
  States
  {
  Spawn:
    PLA6 ABCD 5 A_Wander
	TNT1 A 0 A_Look
    Loop
  See:
    PLA6 ABCD 4 A_MarineChase
    Loop
  Pause:
	PLA6 E 20
	Goto See
  Missile:
    PLA6 E 15 A_FaceTarget
	TNT1 A 0 A_PlaySound("weapons/hrfire")
    PLA6 F 2 Bright A_CustomMissile("PlasmaBall", 30, 4, 0)
    PLA6 E 1 A_FaceTarget
    TNT1 A 0 A_Jump(20,"Pause")
    TNT1 A 0 A_MonsterRefire(200,"See")
    Goto Missile+1
  Pain:
    PLA6 G 4
    PLA6 G 4 A_Pain
    Goto Idle
  Death:
	PLA6 H 8
	PLA6 I 8 A_PlayerScream
	PLA6 J 8 A_NoBlocking
	PLA6 K 8
	PLA6 L 8 A_SpawnItem("BodyCrash",0,0,0,0)
	PLA6 M 8
	PLA6 N -1
    Stop
  XDeath:
	TNT1 A 0 A_SpawnItemEx("GibbedGenerator",0,0,0,0,0,0,0,128,0)
	PLA6 P 3 A_XScream
	PLA6 Q 3 A_NoBlocking
	PLA6 RSTUV 3
	PLA6 W -1
    Stop
  Raise:
    Stop
  }
}


ACTOR FriendlyMarineDTech : FriendlyMarineShotgun
{
  AttackSound " "
  Translation "112:127=176:191"
  States
  {
  Spawn:
    PRAI ABCD 5 A_Wander
	TNT1 A 0 A_Look
    Loop
  See:
    PRAI ABCD 4 A_MarineChase
    Loop
  Pause:
	PRAI E 20
	Goto See
  Missile:
    PRAI E 15 A_FaceTarget
	TNT1 A 0 A_PlaySound("weapons/demontechfire")
    PRAI F 2 Bright A_CustomMissile("DemonTechProjectile", 30, 4, 0)
    PRAI E 3 A_FaceTarget
    TNT1 A 0 A_Jump(20,"Pause")
    TNT1 A 0 A_MonsterRefire(200,"See")
    Goto Missile+1
  Pain:
    PRAI G 4
    PRAI G 4 A_Pain
    Goto Idle
  Death:
	PRAI H 8
	PRAI I 8 A_PlayerScream
	PRAI J 8 A_NoBlocking
	PRAI K 8
	PRAI L 8 A_SpawnItem("BodyCrash",0,0,0,0)
	PRAI M 8
	PRAI N -1
    Stop
  XDeath:
	TNT1 A 0 A_SpawnItemEx("GibbedGenerator",0,0,0,0,0,0,0,128,0)
	PRAI P 3 A_XScream
	PRAI Q 3 A_NoBlocking
	PRAI RSTUV 3
	PRAI W -1
    Stop
  Raise:
    Stop
  }
}


ACTOR FriendlyMarineFreezer : FriendlyMarineShotgun
{
  AttackSound " "
  Translation "112:127=176:191"
  States
  {
  Spawn:
    PION ABCD 5 A_Wander
	TNT1 A 0 A_Look
    Loop
  See:
    PION ABCD 4 A_MarineChase
    Loop
  Pause:
	PION E 20
	Goto See
  Missile:
    TNT1 A 0 A_JumpIfCloser(325,"Missile3")
  Missile2:
    PION E 15 A_FaceTarget
    TNT1 A 0 A_PlaySound("weapons/iceshot",5)
    PION F 2 Bright A_CustomMissile("NewFreezeBlast", 30, 4, 0)
    PION E 4 A_FaceTarget
    TNT1 A 0 A_Jump(20,"Pause")
    TNT1 A 0 A_MonsterRefire(200,"See")
    Goto Missile2+1
  Missile3:
    TNT1 A 0 A_PlaySound ("freeze/altfire", 6)
	PION EE 10 A_FaceTarget
	TNT1 A 0 A_PlaySound("freeze/althold", 6)
	TNT1 A 0 A_FaceTarget
	PION F 1 Bright A_CustomMissile("FlameShot",32,0,random(-4,4),0)
	TNT1 A 0 A_FaceTarget
    PION F 1 Bright A_CustomMissile("FlameShot",32,0,random(-4,4),0)		 
	TNT1 A 0 A_FaceTarget
    PION F 1 Bright A_CustomMissile("FlameShot",32,0,random(-4,4),0)
	TNT1 A 0 A_FaceTarget
	PION F 1 Bright A_CustomMissile("FlameShot",32,0,random(-4,4),0)
	TNT1 A 0 A_FaceTarget
	PION F 1 Bright A_CustomMissile("FlameShot",32,0,random(-4,4),0)
	TNT1 A 0 A_FaceTarget
	PION F 1 Bright A_CustomMissile("FlameShot",32,0,random(-4,4),0)
	TNT1 A 0 A_FaceTarget
	PION F 1 Bright A_CustomMissile("FlameShot",32,0,random(-4,4),0)
	TNT1 A 0 A_FaceTarget
	PION F 1 Bright A_CustomMissile("FlameShot",32,0,random(-4,4),0)
	TNT1 A 0 A_FaceTarget
	PION F 1 Bright A_CustomMissile("FlameShot",32,0,random(-4,4),0)
	TNT1 A 0 A_FaceTarget
	PION F 1 Bright A_CustomMissile("FlameShot",32,0,random(-4,4),0)
	TNT1 A 0 A_FaceTarget
	PION F 1 Bright A_CustomMissile("FlameShot",32,0,random(-4,4),0)
	TNT1 A 0 A_FaceTarget
	PION F 1 Bright A_CustomMissile("FlameShot",32,0,random(-4,4),0)
	TNT1 A 0 A_FaceTarget
	PION F 1 Bright A_CustomMissile("FlameShot",32,0,random(-4,4),0)
	TNT1 A 0 A_FaceTarget
	PION F 1 Bright A_CustomMissile("FlameShot",32,0,random(-4,4),0)
	TNT1 A 0 A_FaceTarget
	PION F 1 Bright A_CustomMissile("FlameShot",32,0,random(-4,4),0)
	TNT1 A 0 A_FaceTarget
	PION F 1 Bright A_CustomMissile("FlameShot",32,0,random(-4,4),0)
	TNT1 A 0 A_FaceTarget
	PION F 1 Bright A_CustomMissile("FlameShot",32,0,random(-4,4),0)
	TNT1 A 0 A_FaceTarget
	PION F 1 Bright A_CustomMissile("FlameShot",32,0,random(-4,4),0)
	TNT1 A 0 A_FaceTarget
	PION F 1 Bright A_CustomMissile("FlameShot",32,0,random(-4,4),0)
	PION EE 12 A_StopSound(6)
	Goto See
  Pain:
    PION G 4
    PION G 4 A_Pain
    Goto Idle
  Death:
	PION H 8
	PION I 8 A_PlayerScream
	PION J 8 A_NoBlocking
	PION K 8
	PION L 8 A_SpawnItem("BodyCrash",0,0,0,0)
	PION M 8
	PION N -1
    Stop
  XDeath:
	TNT1 A 0 A_SpawnItemEx("GibbedGenerator",0,0,0,0,0,0,0,128,0)
	PION P 3 A_XScream
	PION Q 3 A_NoBlocking
	PION RSTUV 3
	PION W -1
    Stop
  Raise:
    Stop
  }
}


ACTOR FriendlyMarineHexa : FriendlyMarineShotgun
{
  AttackSound " "
  Translation "112:127=176:191"
  States
  {
  Spawn:
    PHST ABCD 5 A_Wander
	TNT1 A 0 A_Look
    Loop
  See:
    PHST ABCD 4 A_MarineChase
    Loop
  Pause:
	PHST E 20
	Goto See
Missile:
	TNT1 A 0 A_JumpIfInventory("Hexa-ZombieToken",3,"Reload")
	TNT1 A 0 A_JumpIfCloser(325,"Hexa")
Normal:
    PHST E 15 A_FaceTarget
	TNT1 A 0 A_PlaySound("weapons/qsgdoublefire")
	TNT1 A 0 A_GiveInventory("Hexa-ZombieToken",1)
	TNT1 AAAAAA 0 Bright A_CustomMissile("MonsterTracer2",Random(28,34),0,Random(6,-6),0)
    PHST F 5 Bright A_CustomBulletAttack(13.8,9.6,10,Random(1,4)*3,"FriendlyMarineBulletPuff") 
    PHST E 15 A_FaceTarget
	TNT1 A 0 A_JumpIfInventory("Hexa-ZombieToken",3,"Reload")
	Goto See
Hexa:
	TNT1 A 0 A_JumpIfInventory("Hexa-ZombieToken",1,"Normal")
    PHST E 15 A_FaceTarget
	TNT1 A 0 A_PlaySound("weapons/hsgfire")
	TNT1 A 0 A_GiveInventory("Hexa-ZombieToken",3)
	TNT1 AAAAAAAAAAAA 0 Bright A_CustomMissile("MonsterTracer2",Random(28,34),0,Random(6,-6),0)
    PHST F 5 Bright A_CustomBulletAttack(15.4,10.6,37,Random(1,4)*3,"FriendlyMarineBulletPuff")
    PHST E 25 A_FaceTarget	
Reload:
	TNT1 A 0 A_TakeInventory("Hexa-ZombieToken",3)
	TNT1 A 0 A_PlaySound("weapons/qsgopen")	
    PHST E 15 A_FaceTarget
    PHST EEEEEE 0 A_SpawnItemEx("SSGShellCasing",25,-2,25,Random(2,4),Random(-3,-6),Random(3,6),0)
    PHST E 12 A_PlaySound("weapons/qsgshellslide")	
    PHST E 8
    PHST E 12 A_PlaySound("weapons/qsgshellslide")	
    PHST E 8
	PHST E 12 A_PlaySound("weapons/qsgshellslide")	
    PHST E 8
    PHST E 10 A_PlaySound("weapons/qsgclose")	
    Goto See
  Pain:
    PHST G 4
    PHST G 4 A_Pain
    Goto Idle
  Death:
	PHST H 8
	PHST I 8 A_PlayerScream
	PHST J 8 A_NoBlocking
	PHST K 8
	PHST L 8 A_SpawnItem("BodyCrash",0,0,0,0)
	PHST M 8
	PHST N -1
    Stop
  XDeath:
	TNT1 A 0 A_SpawnItemEx("GibbedGenerator",0,0,0,0,0,0,0,128,0)
	PHST P 3 A_XScream
	PHST Q 3 A_NoBlocking
	PHST RSTUV 3
	PHST W -1
    Stop
  Raise:
    Stop
  }
}


ACTOR FriendlyMarineRailgun : FriendlyMarineShotgun
{
  AttackSound " "
  Translation "112:127=176:191"
  States
  {
  Spawn:
    SRPL ABCD 5 A_Wander
	TNT1 A 0 A_Look
    Loop
  See:
    SRPL ABCD 4 A_MarineChase
    Loop
  Pause:
	SRPL E 20
	Goto See
  Missile:
    SRPL E 18 A_FaceTarget
	SRPL E 2
	TNT1 A 0 Bright A_PlaySound("railgunner/chargedshot")
	TNT1 A 0 Bright A_CustomMissile("RailgunImpact",30)
    SRPL F 5 Bright A_CustomRailgun(250,0,"00 85 FF",None,0,1,0,"PlayerRailPuff")
    SRPL E 25 A_FaceTarget
    Goto See
  Pain:
    SRPL G 4
    SRPL G 4 A_Pain
    Goto Idle
  Death:
	SRPL H 8
	SRPL I 8 A_PlayerScream
	SRPL J 8 A_NoBlocking
	SRPL K 8
	SRPL L 8 A_SpawnItem("BodyCrash",0,0,0,0)
	SRPL M 8
	SRPL N -1
    Stop
  XDeath:
	TNT1 A 0 A_SpawnItemEx("GibbedGenerator",0,0,0,0,0,0,0,128,0)
	SRPL P 3 A_XScream
	SRPL Q 3 A_NoBlocking
	SRPL RSTUV 3
	SRPL W -1
    Stop
  Raise:
    Stop
  }
}