actor ZombieMarine
{
  Translation "112:116=128:133", "117:119=138:140", "120:122=157:159", "123:127=9:12"
  States
  {
  Spawn:
    PLAY N 5 A_LookEx(LOF_NOSOUNDCHECK,0,256,0,360)
    loop
  See:
    PLAY N 90
    PLAY N 0 A_PlayWeaponSound("brain/spit")
    PLAY N 15 A_SpawnItemEx("ResurrectionFire",0,0,0,0,0,0,0,128,0)
    PLAY NMLKJI 5
    PLAY H 5 A_FaceTarget
    PLAY H 0 A_Jump(256,1,3)
    TNT1 A 5 A_SpawnItemEx("ZombieMarineA",0,0,0,0,0,0,0,SXF_NOCHECKPOSITION|SXF_TRANSFERPOINTERS,0)
    TNT1 A 15 A_AlertMonsters(16,2)
    Stop
    TNT1 A 5 A_SpawnItemEx("ZombieMarineB",0,0,0,0,0,0,0,SXF_NOCHECKPOSITION|SXF_TRANSFERPOINTERS,0)
    TNT1 A 15 A_AlertMonsters(16,2)
    Stop
  }
}

actor ZombieMarine2 : ZombieMarine
{
  States
  {
  Spawn:
    PLAY W 5 A_LookEx(LOF_NOSOUNDCHECK,0,256,0,360)
    loop
  See:
    PLAY W 90
    PLAY W 0 A_PlayWeaponSound("brain/spit")
    PLAY W 10 A_SpawnItemEx("ResurrectionFire",0,0,0,0,0,0,0,128,0)
    PLAY VUTSRQP 5
    PLAY O 5 A_FaceTarget
    PLAY O 0 A_Jump(256,1,3)
    TNT1 A 15 A_SpawnItemEx("ZombieMarineA",0,0,0,0,0,0,0,SXF_NOCHECKPOSITION|SXF_TRANSFERPOINTERS,0)
    TNT1 A 15 A_AlertMonsters(16,2)
    Stop
    TNT1 A 15 A_SpawnItemEx("ZombieMarineB",0,0,0,0,0,0,0,SXF_NOCHECKPOSITION|SXF_TRANSFERPOINTERS,0)
    TNT1 A 15 A_AlertMonsters(16,2)
    Stop
  }
}

actor ZombieMarineA : RGAMonster
{
  Obituary "%o was betrayed by a corrupted marine!"
  Health 200
  Gibhealth 125
  Radius 20
  Height 56
  Mass 125
  Speed 8
  ReactionTime 10
  MinMissileChance 211
  PainChance 80
  PainChance "Dragon", 40
  PainChance "DragonF", 40
  PainChance "Dragonsplosion", 40
  PainChance "RGAFire", 40
  PainChance "Knife", 255
  PainChance "Explosion", 255
  PainChance "ExplosionF", 255
  PainChance "ExplosionC", 255
  PainChance "NormalExplode", 255
  PainChance "Stun", 255
  PainChance "Stun2", 255
  PainChance "Stun3", 255
  SeeSound "shotguy/sight"
  PainSound "shotguy/pain"
  DeathSound "shotguy/death"
  ActiveSound "shotguy/active"
  //seesound "heavy/sight"
  //painsound "grunt/pain"
  //deathsound "heavy/death"
  //activesound "heavy/active"
  Translation "112:116=128:133", "117:119=138:140", "120:122=157:159", "123:127=9:12"
  Species "Shotgunzombie"
  MONSTER
  +FLOORCLIP
  Tag "Corrupted Marine"
  States
  {
  Spawn:
    UDM2 A 0
    UDM2 A 0 A_CheckFlag("Friendly","Idle")
    UDM2 A 0 Thing_SetSpecial(0,226,613,0,random(12,24))
  Idle:
    UDM2 A 10 A_Look
    Loop
  See:
    UDM2 A 0 A_JumpIfInventory("MonHold",1,"Death")
    UDM2 A 0 A_JumpIfInventory("BlindCheck",1,"SeeBlind")
    UDM2 AABBCCDDAABBCC 3 A_Chase("","Missile")
    UDM2 DD 3 A_Chase
    UDM2 AABBCCDDAABBCC 3 A_Chase("","Missile")
    UDM2 DD 3 A_Chase
    UDM2 D 0 A_SpawnItemEx("ZombieStepDamage",0,0,28,0,0,0,0,0,0)
    Goto See+1
  SeeBlind:
    UDM2 A 0 A_Jump(144,"MissileBlind","SeeBlind2","SeeBlind2")
    UDM2 AAB 3 A_Wander
    UDM2 B 0 A_Jump(224,2)
    UDM2 B 0 A_Pain
    UDM2 B 3 A_Wander
    UDM2 B 0 A_JumpIfInventory("BlindCheck",1,1)
    goto See+6
    UDM2 CCDD 3 A_Wander
    UDM2 D 0 A_SpawnItemEx("ZombieStepDamage",0,0,28,0,0,0,0,0,0)
    goto See
  SeeBlind2:
    UDM2 A 0 A_Jump(256,1,2,3)
    UDM2 AAA 3
    UDM2 A 0 A_Jump(224,2)
    UDM2 A 0 A_Pain
    UDM2 A 3
    UDM2 A 0 A_JumpIfInventory("BlindCheck",1,1)
    goto See+2
    UDM2 A 0 A_Jump(256,1,2,3,4)
    UDM2 AAAA 3
    goto See
  MissileBlind:
    UDM2 E 8
    UDM2 F 0 BRIGHT A_PlayWeaponSound("spas/fire")
    UDM2 F 10 BRIGHT A_CustomBulletAttack(22, 11, 6, 5, "MonsterShotgunPuff", 0, CBAF_AIMFACING || FBF_NORANDOM)
    UDM2 E 11
    goto See
  Melee:
  Missile:
    UDM2 E 8 A_FaceTarget
    UDM2 F 0 BRIGHT A_PlayWeaponSound("spas/fire")
    UDM2 F 10 BRIGHT A_CustomBulletAttack(11, 5.5, 6, 5, "MonsterShotgunPuff", 0, FBF_NORANDOM)
    UDM2 E 11
    goto See
  Pain.NormalExplode:
  Pain.Sniper:
  Pain.ExplosionF:
  Pain.ExplosionC:
  Pain.Explosion:
    UDM2 G 4
    UDM2 G 12 A_Pain
    Goto See
  Pain.Stun3:
    UDM2 G 0 ACS_NamedExecuteAlways("RefStun",0,2,0,0)
    goto Pain
  Pain.Stun2:
    UDM2 G 0 ACS_NamedExecuteAlways("RefStun",0,1,0,0)
    goto Pain
  Pain.Stun:
    UDM2 G 0 ACS_NamedExecuteAlways("RefStun",0,0,0,0)
    goto Pain
  Pain:
    UDM2 G 4
    UDM2 G 8 A_Pain
    Goto See
  Death.Shotgungib:
    PLAY H 0 A_JumpIfCloser(128, "XDeath")
  Death.Shotgun:
    PLAY H 0 A_JumpIfHealthLower(-67, "XDeath")
  Death:
    PLAY H 0
    PLAY H 0 A_CheckFlag("Boss",3)
    PLAY H 0 A_JumpIf((ACS_NamedExecuteWithResult("RefCheckVar",2,0,0)) == 1, 2)
    PLAY H 0 A_Jump(52,"Death2")
    PLAY H 8
    PLAY I 8 A_Scream
    PLAY I 0 A_SpawnItemEx("SubAmmo",0,0,0,random(-2,2),random(-2,2),3,0,0,143)
    PLAY I 0 A_SpawnItemEx("ShotgunAmmo",0,0,0,random(-2,2),random(-2,2),3,0,0,127)
    PLAY J 0 A_NoBlocking
    PLAY J 0 A_Jump(208,2)
    PLAY J 0 A_CustomMissile("FragGrenadeDropped2",8,0,0)
    PLAY J 8
    PLAY KKKK 2 A_SpawnItemEx("HealthBonus_3",0,0,0,random(-2,2),random(-2,2),random(2,5),0,0,0)
    PLAY L 8
    PLAY M 8
    PLAY N 0 A_JumpIf((ACS_NamedExecuteWithResult("RefCheckVar",3,0,0) % 2) == 1, "DeathClean")
    PLAY N -1
    Stop
  Death.Burnt:
    "####" # 0 A_Jump(128,2)
    "####" # 0 A_SpawnItemEx("RGABurnt",0,0,0,0,0,0,0,128,0)
  Death.Crush:
  Death.Sniper:
    PLAY H 8
    PLAY I 8 A_Scream
    PLAY I 0 A_SpawnItemEx("SubAmmo",0,0,0,random(-2,2),random(-2,2),3,0,0,143)
    PLAY I 0 A_SpawnItemEx("ShotgunAmmo",0,0,0,random(-2,2),random(-2,2),3,0,0,127)
    PLAY J 8 A_NoBlocking
    PLAY KKKK 2 A_SpawnItemEx("HealthBonus_3",0,0,0,random(-2,2),random(-2,2),random(2,5),0,0,0)
    PLAY LM 8
    PLAY N 0 A_JumpIf((ACS_NamedExecuteWithResult("RefCheckVar",3,0,0) % 2) == 1, "DeathClean")
    PLAY N -1
    Stop
  Death.Knife:
    PLAY H 8
    PLAY I 8
    PLAY I 0 A_SpawnItemEx("SubAmmo",0,0,0,random(-2,2),random(-2,2),3,0,0,143)
    PLAY I 0 A_SpawnItemEx("ShotgunAmmo",0,0,0,random(-2,2),random(-2,2),3,0,0,127)
    PLAY J 8 A_NoBlocking
    PLAY KKKK 2 A_SpawnItemEx("ArmorBonus_3",0,0,0,random(-2,2),random(-2,2),random(2,5),0,0,0)
    PLAY L 8 A_PlaySound("body/splats")
    PLAY M 8
    PLAY N 0 A_JumpIf((ACS_NamedExecuteWithResult("RefCheckVar",3,0,0) % 2) == 1, "DeathClean")
    PLAY N -1
    Stop
  Death.RGAFire:
  Death.Dragonsplosion:
  Death.Dragon:
  Death.DragonF:
  Death.Fire:
    "####" G 1
    "####" A 0 A_GiveInventory("MonHold",1)
    "####" A 0 A_Jump(96,"Death.Burnt")
    "####" A 0 A_ChangeFlag("FRIGHTENED",1)
    "####" A 0 A_Pain
    "####" AA 0 A_SpawnItemEx("FireFlare", random(-2,2), random(-2,2), random(12,20), random(-1,1), random(-3,1), random(1,2), 0, 128, 24)
    "####" AA 2 A_Chase("","")
    "####" BB 0 A_SpawnItemEx("FireFlare", random(-2,2), random(-2,2), random(12,20), random(-1,1), random(-3,1), random(1,2), 0, 128, 24)
    "####" BB 2 A_Chase("","")
    "####" CC 0 A_SpawnItemEx("FireFlare", random(-2,2), random(-2,2), random(12,20), random(-1,1), random(-3,1), random(1,2), 0, 128, 24)
    "####" CC 2 A_Chase("","")
    "####" DD 0 A_SpawnItemEx("FireFlare", random(-2,2), random(-2,2), random(12,20), random(-1,1), random(-3,1), random(1,2), 0, 128, 24)
    "####" DD 2 A_Chase("","")
    "####" A 0 A_ChangeFlag("FRIGHTENED",0)
    "####" AA 0 A_SpawnItemEx("FireFlare", random(-2,2), random(-2,2), random(12,20), random(-1,1), random(-3,1), random(1,2), 0, 128, 24)
    "####" AA 2 A_Wander
    "####" BB 0 A_SpawnItemEx("FireFlare", random(-2,2), random(-2,2), random(12,20), random(-1,1), random(-3,1), random(1,2), 0, 128, 24)
    "####" BB 2 A_Wander
    "####" CC 0 A_SpawnItemEx("FireFlare", random(-2,2), random(-2,2), random(12,20), random(-1,1), random(-3,1), random(1,2), 0, 128, 24)
    "####" CC 2 A_Wander
    "####" DD 0 A_SpawnItemEx("FireFlare", random(-2,2), random(-2,2), random(12,20), random(-1,1), random(-3,1), random(1,2), 0, 128, 24)
    "####" DD 2 A_Wander
    "####" D 0 A_Jump(32,"Death.Burnt")
  Death.FireCont:
    "####" A 0 A_Jump(48,2)
    "####" A 0 A_Pain
    "####" AA 0 A_SpawnItemEx("FireFlare", random(-2,2), random(-2,2), random(12,20), random(-1,1), random(-3,1), random(1,2), 0, 128, 24)
    "####" AA 2 A_Wander
    "####" BB 0 A_SpawnItemEx("FireFlare", random(-2,2), random(-2,2), random(12,20), random(-1,1), random(-3,1), random(1,2), 0, 128, 24)
    "####" BB 2 A_Wander
    "####" CC 0 A_SpawnItemEx("FireFlare", random(-2,2), random(-2,2), random(12,20), random(-1,1), random(-3,1), random(1,2), 0, 128, 24)
    "####" CC 2 A_Wander
    "####" DD 0 A_SpawnItemEx("FireFlare", random(-2,2), random(-2,2), random(12,20), random(-1,1), random(-3,1), random(1,2), 0, 128, 24)
    "####" DD 2 A_Wander
    "####" AA 0 A_SpawnItemEx("FireFlare", random(-2,2), random(-2,2), random(12,20), random(-1,1), random(-3,1), random(1,2), 0, 128, 24)
    "####" AA 2 A_Wander
    "####" BB 0 A_SpawnItemEx("FireFlare", random(-2,2), random(-2,2), random(12,20), random(-1,1), random(-3,1), random(1,2), 0, 128, 24)
    "####" BB 2 A_Wander
    "####" CC 0 A_SpawnItemEx("FireFlare", random(-2,2), random(-2,2), random(12,20), random(-1,1), random(-3,1), random(1,2), 0, 128, 24)
    "####" CC 2 A_Wander
    "####" DD 0 A_SpawnItemEx("FireFlare", random(-2,2), random(-2,2), random(12,20), random(-1,1), random(-3,1), random(1,2), 0, 128, 24)
    "####" DD 2 A_Wander
	"####" D 0 A_JumpIfInventory("MonHold",4,"Death.Burnt")
    "####" D 0 A_Jump(160,"Death.Burnt")
	"####" D 0 A_GiveInventory("MonHold",1)
    goto Death.FireCont
  Death.Ice:
    "####" # 0 A_SpawnItemEx("SubAmmo",0,0,0,random(-2,2),random(-2,2),3,0,0,143)
    "####" # 0 A_SpawnItemEx("ShotgunAmmo",0,0,0,random(-2,2),random(-2,2),3,0,0,127)
    "####" # 0 A_SpawnItemEx("HealthBonus_3",0,0,0,random(-2,2),random(-2,2),random(2,5),0,0,0)
    "####" # 0 A_SpawnItemEx("HealthBonus_3",0,0,0,random(-2,2),random(-2,2),random(2,5),0,0,0)
    "####" # 0 A_SpawnItemEx("HealthBonus_3",0,0,0,random(-2,2),random(-2,2),random(2,5),0,0,0)
    "####" # 0 A_SpawnItemEx("HealthBonus_3",0,0,0,random(-2,2),random(-2,2),random(2,5),0,0,0)
    "####" # 5 A_GenericFreezeDeath
    "----" A 1 A_FreezeDeathChunks
    wait
  Death.BarrelBoom:
    PLAY H 0 A_JumpIfCloser(128, "XDeath")
  Death.NormalExplode:
  Death.Cyber:
  Death.ExplosionF:
  Death.ExplosionC:
  Death.Explosion:
    PLAY H 8 A_JumpIfHealthLower(-125, "XDeath")
    PLAY I 8 A_Scream
    PLAY I 0 A_SpawnItemEx("SubAmmo",0,0,0,random(-2,2),random(-2,2),3,0,0,143)
    PLAY I 0 A_SpawnItemEx("ShotgunAmmo",0,0,0,random(-2,2),random(-2,2),3,0,0,127)
    PLAY J 8 A_NoBlocking
    PLAY KKKK 2 A_SpawnItemEx("HealthBonus_3",0,0,0,random(-2,2),random(-2,2),random(2,5),0,0,0)
    PLAY L 8
    PLAY M 8
    PLAY N 0 A_JumpIf((ACS_NamedExecuteWithResult("RefCheckVar",3,0,0) % 2) == 1, "DeathClean")
    PLAY N -1
    Stop
  Death2:
    PLAY H 7
    PLAY I 7 A_Pain
    PLAY J 7 A_NoBlocking
    PLAY KL 7//M
    //PLAY N 8
    TNT1 A 0 A_Stop
    TNT1 A 15 A_SpawnItemEx("ZombieMarineA_LastStand",0,0,0,0,0,0,0,SXF_SETMASTER|SXF_TRANSFERPOINTERS|SXF_NOCHECKPOSITION,0)
    TNT1 A 15 A_JumpIfInventory("Blinded",1,"LastDeath")
    Wait
  XDeath:
    PLAY O 5
    PLAY P 5 A_XScream
    PLAY P 0 A_SpawnItemEx("SubAmmo",0,0,0,random(-2,2),random(-2,2),3,0,0,143)
    PLAY P 0 A_SpawnItemEx("ShotgunAmmo",0,0,0,random(-2,2),random(-2,2),3,0,0,127)
    PLAY Q 5 A_NoBlocking
    PLAY RSTUV 5
    PLAY W 0 A_JumpIf((ACS_NamedExecuteWithResult("RefCheckVar",3,0,0) % 2) == 1, 2)
    PLAY W -1
    Stop
    PLAY WWWWWW 5250 CanRaise
    PLAY WWWWWWWWW 2 A_FadeOut(0.1)
    Stop
  LastDeath:
    PLAY N 5
    PLAY N 15 A_TakeInventory("Blinded",1)
    PLAY N 0 A_JumpIf((ACS_NamedExecuteWithResult("RefCheckVar",3,0,0) % 2) == 1, "DeathClean")
    PLAY N -1
    Stop
  DeathClean:
    PLAY NNNNNN 5250 CanRaise
    PLAY NNNNNNNNN 2 A_FadeOut(0.1)
    Stop
  Raise:
    PLAY N 0
    PLAY N 0 A_ChangeFlag("FRIGHTENED",0)
	PLAY N 0 A_TakeInventory("MonHold",35)
    PLAY N 5 Thing_SetSpecial(0,226,613,0,random(6,12))
    PLAY MLKJIH 5
    goto See
  }
}

actor ZombieMarineB : RGAMonster
{
  Obituary "%o was betrayed by a corrupted marine!"
  Health 200
  Gibhealth 125
  Radius 20
  Height 56
  Mass 125
  Speed 8
  ReactionTime 10
  MinMissileChance 211
  PainChance 80
  PainChance "Dragon", 40
  PainChance "DragonF", 40
  PainChance "Dragonsplosion", 40
  PainChance "RGAFire", 40
  PainChance "Knife", 255
  PainChance "Explosion", 255
  PainChance "ExplosionF", 255
  PainChance "ExplosionC", 255
  PainChance "NormalExplode", 255
  PainChance "Stun", 255
  PainChance "Stun2", 255
  PainChance "Stun3", 255
  SeeSound "shotguy/sight"
  PainSound "shotguy/pain"
  DeathSound "shotguy/death"
  ActiveSound "shotguy/active"
  //seesound "heavy/sight"
  //painsound "grunt/pain"
  //deathsound "heavy/death"
  //activesound "heavy/active"
  Translation "112:116=128:133", "117:119=138:140", "120:122=157:159", "123:127=9:12"
  Species "Shotgunzombie"
  MONSTER
  +FLOORCLIP
  Tag "Corrupted Marine"
  States
  {
  Spawn:
    UDM2 A 0
    UDM2 A 0 A_CheckFlag("Friendly","Idle")
    UDM2 A 0 Thing_SetSpecial(0,226,613,0,random(12,24))
  Idle:
    UDM2 A 10 A_Look
    Loop
  See2:
    UDM2 E 8
  See:
    UDM2 A 0 A_JumpIfInventory("MonHold",1,"Death")
    UDM2 A 0 A_JumpIfInventory("BlindCheck",1,"SeeBlind")
    UDM2 AABBCCDDAABBCC 3 A_Chase("","Missile")
    UDM2 DD 3 A_Chase
    UDM2 AABBCCDDAABBCC 3 A_Chase("","Missile")
    UDM2 DD 3 A_Chase
    UDM2 D 0 A_SpawnItemEx("ZombieStepDamage",0,0,28,0,0,0,0,0,0)
    Goto See+1
  SeeBlind:
    UDM2 A 0 A_Jump(144,"MissileBlind","SeeBlind2","SeeBlind2")
    UDM2 AAB 3 A_Wander
    UDM2 B 0 A_Jump(224,2)
    UDM2 B 0 A_Pain
    UDM2 B 3 A_Wander
    UDM2 B 0 A_JumpIfInventory("BlindCheck",1,1)
    goto See+6
    UDM2 CCDD 3 A_Wander
    UDM2 D 0 A_SpawnItemEx("ZombieStepDamage",0,0,28,0,0,0,0,0,0)
    goto See
  SeeBlind2:
    UDM2 A 0 A_Jump(256,1,2,3)
    UDM2 AAA 3
    UDM2 A 0 A_Jump(224,2)
    UDM2 A 0 A_Pain
    UDM2 A 3
    UDM2 A 0 A_JumpIfInventory("BlindCheck",1,1)
    goto See+2
    UDM2 A 0 A_Jump(256,1,2,3,4)
    UDM2 AAAA 3
    goto See
  MissileBlind:
    UDM2 E 7
    UDM2 E 4
    UDM2 F 0 BRIGHT A_PlayWeaponSound("striker/fire")
    UDM2 F 4 BRIGHT A_CustomBulletAttack(20, 10, 3, 4, "MonsterShotgunPuff", 0, CBAF_AIMFACING || FBF_NORANDOM)
    UDM2 E 0 A_Jump(160,"See2")
    UDM2 E 2
    UDM2 F 0 BRIGHT A_PlayWeaponSound("striker/fire")
    UDM2 F 4 BRIGHT A_CustomBulletAttack(20, 10, 3, 4, "MonsterShotgunPuff", 0, CBAF_AIMFACING || FBF_NORANDOM)
    UDM2 E 0 A_Jump(192,"See2")
    UDM2 E 2
    UDM2 F 0 BRIGHT A_PlayWeaponSound("striker/fire")
    UDM2 F 4 BRIGHT A_CustomBulletAttack(20, 10, 3, 4, "MonsterShotgunPuff", 0, CBAF_AIMFACING || FBF_NORANDOM)
    UDM2 E 6
    goto See2
  Melee:
  Missile:
    UDM2 E 7 A_FaceTarget
    UDM2 E 4 A_FaceTarget
    UDM2 F 0 BRIGHT A_PlayWeaponSound("striker/fire")
    UDM2 F 4 BRIGHT A_CustomBulletAttack(10, 5, 3, 4, "MonsterShotgunPuff", 0, FBF_NORANDOM)
    UDM2 E 0 A_Jump(128,"See2")
    UDM2 E 2 A_FaceTarget
    UDM2 F 0 BRIGHT A_PlayWeaponSound("striker/fire")
    UDM2 F 4 BRIGHT A_CustomBulletAttack(10, 5, 3, 4, "MonsterShotgunPuff", 0, FBF_NORANDOM)
    UDM2 E 0 A_Jump(160,"See2")
    UDM2 E 2 A_FaceTarget
    UDM2 F 0 BRIGHT A_PlayWeaponSound("striker/fire")
    UDM2 F 4 BRIGHT A_CustomBulletAttack(10, 5, 3, 4, "MonsterShotgunPuff", 0, FBF_NORANDOM)
    UDM2 E 6
    goto See2
  Pain.NormalExplode:
  Pain.Sniper:
  Pain.ExplosionF:
  Pain.ExplosionC:
  Pain.Explosion:
    UDM2 G 4
    UDM2 G 12 A_Pain
    Goto See
  Pain.Stun3:
    UDM2 G 0 ACS_NamedExecuteAlways("RefStun",0,2,0,0)
    goto Pain
  Pain.Stun2:
    UDM2 G 0 ACS_NamedExecuteAlways("RefStun",0,1,0,0)
    goto Pain
  Pain.Stun:
    UDM2 G 0 ACS_NamedExecuteAlways("RefStun",0,0,0,0)
    goto Pain
  Pain:
    UDM2 G 4
    UDM2 G 8 A_Pain
    Goto See
  Death.Shotgungib:
    PLAY H 0 A_JumpIfCloser(128, "XDeath")
  Death.Shotgun:
    PLAY H 0 A_JumpIfHealthLower(-67, "XDeath")
  Death:
    PLAY H 0
    PLAY H 0 A_CheckFlag("Boss",3)
    PLAY H 0 A_JumpIf((ACS_NamedExecuteWithResult("RefCheckVar",2,0,0)) == 1, 2)
    PLAY H 0 A_Jump(52,"Death2")
    PLAY H 8
    PLAY I 8 A_Scream
    PLAY I 0 A_SpawnItemEx("SubAmmo",0,0,0,random(-2,2),random(-2,2),3,0,0,143)
    PLAY I 0 A_SpawnItemEx("ShotgunAmmo",0,0,0,random(-2,2),random(-2,2),3,0,0,127)
    PLAY J 0 A_NoBlocking
    PLAY J 0 A_Jump(208,2)
    PLAY J 0 A_CustomMissile("FragGrenadeDropped2",8,0,0)
    PLAY J 8
    PLAY KKKK 2 A_SpawnItemEx("HealthBonus_3",0,0,0,random(-2,2),random(-2,2),random(2,5),0,0,0)
    PLAY L 8
    PLAY M 8
    PLAY N 0 A_JumpIf((ACS_NamedExecuteWithResult("RefCheckVar",3,0,0) % 2) == 1, "DeathClean")
    PLAY N -1
    Stop
  Death.Burnt:
    "####" # 0 A_Jump(128,2)
    "####" # 0 A_SpawnItemEx("RGABurnt",0,0,0,0,0,0,0,128,0)
  Death.Crush:
  Death.Sniper:
    PLAY H 8
    PLAY I 8 A_Scream
    PLAY I 0 A_SpawnItemEx("SubAmmo",0,0,0,random(-2,2),random(-2,2),3,0,0,143)
    PLAY I 0 A_SpawnItemEx("ShotgunAmmo",0,0,0,random(-2,2),random(-2,2),3,0,0,127)
    PLAY J 8 A_NoBlocking
    PLAY KKKK 2 A_SpawnItemEx("HealthBonus_3",0,0,0,random(-2,2),random(-2,2),random(2,5),0,0,0)
    PLAY LM 8
    PLAY N 0 A_JumpIf((ACS_NamedExecuteWithResult("RefCheckVar",3,0,0) % 2) == 1, "DeathClean")
    PLAY N -1
    Stop
  Death.Knife:
    PLAY H 8
    PLAY I 8
    PLAY I 0 A_SpawnItemEx("SubAmmo",0,0,0,random(-2,2),random(-2,2),3,0,0,143)
    PLAY I 0 A_SpawnItemEx("ShotgunAmmo",0,0,0,random(-2,2),random(-2,2),3,0,0,127)
    PLAY J 8 A_NoBlocking
    PLAY KKKK 2 A_SpawnItemEx("ArmorBonus_3",0,0,0,random(-2,2),random(-2,2),random(2,5),0,0,0)
    PLAY L 8 A_PlaySound("body/splats")
    PLAY M 8
    PLAY N 0 A_JumpIf((ACS_NamedExecuteWithResult("RefCheckVar",3,0,0) % 2) == 1, "DeathClean")
    PLAY N -1
    Stop
  Death.RGAFire:
  Death.Dragonsplosion:
  Death.Dragon:
  Death.DragonF:
  Death.Fire:
    "####" G 1
    "####" A 0 A_GiveInventory("MonHold",1)
    "####" A 0 A_Jump(96,"Death.Burnt")
    "####" A 0 A_ChangeFlag("FRIGHTENED",1)
    "####" A 0 A_Pain
    "####" AA 0 A_SpawnItemEx("FireFlare", random(-2,2), random(-2,2), random(12,20), random(-1,1), random(-3,1), random(1,2), 0, 128, 24)
    "####" AA 2 A_Chase("","")
    "####" BB 0 A_SpawnItemEx("FireFlare", random(-2,2), random(-2,2), random(12,20), random(-1,1), random(-3,1), random(1,2), 0, 128, 24)
    "####" BB 2 A_Chase("","")
    "####" CC 0 A_SpawnItemEx("FireFlare", random(-2,2), random(-2,2), random(12,20), random(-1,1), random(-3,1), random(1,2), 0, 128, 24)
    "####" CC 2 A_Chase("","")
    "####" DD 0 A_SpawnItemEx("FireFlare", random(-2,2), random(-2,2), random(12,20), random(-1,1), random(-3,1), random(1,2), 0, 128, 24)
    "####" DD 2 A_Chase("","")
    "####" A 0 A_ChangeFlag("FRIGHTENED",0)
    "####" AA 0 A_SpawnItemEx("FireFlare", random(-2,2), random(-2,2), random(12,20), random(-1,1), random(-3,1), random(1,2), 0, 128, 24)
    "####" AA 2 A_Wander
    "####" BB 0 A_SpawnItemEx("FireFlare", random(-2,2), random(-2,2), random(12,20), random(-1,1), random(-3,1), random(1,2), 0, 128, 24)
    "####" BB 2 A_Wander
    "####" CC 0 A_SpawnItemEx("FireFlare", random(-2,2), random(-2,2), random(12,20), random(-1,1), random(-3,1), random(1,2), 0, 128, 24)
    "####" CC 2 A_Wander
    "####" DD 0 A_SpawnItemEx("FireFlare", random(-2,2), random(-2,2), random(12,20), random(-1,1), random(-3,1), random(1,2), 0, 128, 24)
    "####" DD 2 A_Wander
    "####" D 0 A_Jump(32,"Death.Burnt")
  Death.FireCont:
    "####" A 0 A_Jump(48,2)
    "####" A 0 A_Pain
    "####" AA 0 A_SpawnItemEx("FireFlare", random(-2,2), random(-2,2), random(12,20), random(-1,1), random(-3,1), random(1,2), 0, 128, 24)
    "####" AA 2 A_Wander
    "####" BB 0 A_SpawnItemEx("FireFlare", random(-2,2), random(-2,2), random(12,20), random(-1,1), random(-3,1), random(1,2), 0, 128, 24)
    "####" BB 2 A_Wander
    "####" CC 0 A_SpawnItemEx("FireFlare", random(-2,2), random(-2,2), random(12,20), random(-1,1), random(-3,1), random(1,2), 0, 128, 24)
    "####" CC 2 A_Wander
    "####" DD 0 A_SpawnItemEx("FireFlare", random(-2,2), random(-2,2), random(12,20), random(-1,1), random(-3,1), random(1,2), 0, 128, 24)
    "####" DD 2 A_Wander
    "####" AA 0 A_SpawnItemEx("FireFlare", random(-2,2), random(-2,2), random(12,20), random(-1,1), random(-3,1), random(1,2), 0, 128, 24)
    "####" AA 2 A_Wander
    "####" BB 0 A_SpawnItemEx("FireFlare", random(-2,2), random(-2,2), random(12,20), random(-1,1), random(-3,1), random(1,2), 0, 128, 24)
    "####" BB 2 A_Wander
    "####" CC 0 A_SpawnItemEx("FireFlare", random(-2,2), random(-2,2), random(12,20), random(-1,1), random(-3,1), random(1,2), 0, 128, 24)
    "####" CC 2 A_Wander
    "####" DD 0 A_SpawnItemEx("FireFlare", random(-2,2), random(-2,2), random(12,20), random(-1,1), random(-3,1), random(1,2), 0, 128, 24)
    "####" DD 2 A_Wander
	"####" D 0 A_JumpIfInventory("MonHold",4,"Death.Burnt")
    "####" D 0 A_Jump(160,"Death.Burnt")
	"####" D 0 A_GiveInventory("MonHold",1)
    goto Death.FireCont
  Death.Ice:
    "####" # 0 A_SpawnItemEx("SubAmmo",0,0,0,random(-2,2),random(-2,2),3,0,0,143)
    "####" # 0 A_SpawnItemEx("ShotgunAmmo",0,0,0,random(-2,2),random(-2,2),3,0,0,127)
    "####" # 0 A_SpawnItemEx("HealthBonus_3",0,0,0,random(-2,2),random(-2,2),random(2,5),0,0,0)
    "####" # 0 A_SpawnItemEx("HealthBonus_3",0,0,0,random(-2,2),random(-2,2),random(2,5),0,0,0)
    "####" # 0 A_SpawnItemEx("HealthBonus_3",0,0,0,random(-2,2),random(-2,2),random(2,5),0,0,0)
    "####" # 0 A_SpawnItemEx("HealthBonus_3",0,0,0,random(-2,2),random(-2,2),random(2,5),0,0,0)
    "####" # 5 A_GenericFreezeDeath
    "----" A 1 A_FreezeDeathChunks
    wait
  Death.BarrelBoom:
    PLAY H 0 A_JumpIfCloser(128, "XDeath")
  Death.NormalExplode:
  Death.Cyber:
  Death.ExplosionF:
  Death.ExplosionC:
  Death.Explosion:
    PLAY H 8 A_JumpIfHealthLower(-125, "XDeath")
    PLAY I 8 A_Scream
    PLAY I 0 A_SpawnItemEx("SubAmmo",0,0,0,random(-2,2),random(-2,2),3,0,0,143)
    PLAY I 0 A_SpawnItemEx("ShotgunAmmo",0,0,0,random(-2,2),random(-2,2),3,0,0,127)
    PLAY J 8 A_NoBlocking
    PLAY KKKK 2 A_SpawnItemEx("HealthBonus_3",0,0,0,random(-2,2),random(-2,2),random(2,5),0,0,0)
    PLAY L 8
    PLAY M 8
    PLAY N 0 A_JumpIf((ACS_NamedExecuteWithResult("RefCheckVar",3,0,0) % 2) == 1, "DeathClean")
    PLAY N -1
    Stop
  Death2:
    PLAY H 7
    PLAY I 7 A_Pain
    PLAY J 7 A_NoBlocking
    PLAY KL 7//M
    //PLAY N 8
    TNT1 A 0 A_Stop
    TNT1 A 15 A_SpawnItemEx("ZombieMarineB_LastStand",0,0,0,0,0,0,0,SXF_SETMASTER|SXF_TRANSFERPOINTERS|SXF_NOCHECKPOSITION,0)
    TNT1 A 15 A_JumpIfInventory("Blinded",1,"LastDeath")
    Wait
  XDeath:
    PLAY O 5
    PLAY P 5 A_XScream
    PLAY P 0 A_SpawnItemEx("SubAmmo",0,0,0,random(-2,2),random(-2,2),3,0,0,143)
    PLAY P 0 A_SpawnItemEx("ShotgunAmmo",0,0,0,random(-2,2),random(-2,2),3,0,0,127)
    PLAY Q 5 A_NoBlocking
    PLAY RSTUV 5
    PLAY W 0 A_JumpIf((ACS_NamedExecuteWithResult("RefCheckVar",3,0,0) % 2) == 1, 2)
    PLAY W -1
    Stop
    PLAY WWWWWW 5250 CanRaise
    PLAY WWWWWWWWW 2 A_FadeOut(0.1)
    Stop
  LastDeath:
    PLAY N 5
    PLAY N 15 A_TakeInventory("Blinded",1)
    PLAY N 0 A_JumpIf((ACS_NamedExecuteWithResult("RefCheckVar",3,0,0) % 2) == 1, "DeathClean")
    PLAY N -1
    Stop
  DeathClean:
    PLAY NNNNNN 5250 CanRaise
    PLAY NNNNNNNNN 2 A_FadeOut(0.1)
    Stop
  Raise:
    PLAY N 0
    PLAY N 0 A_ChangeFlag("FRIGHTENED",0)
	PLAY N 0 A_TakeInventory("MonHold",35)
    PLAY N 5 Thing_SetSpecial(0,226,613,0,random(6,12))
    PLAY MLKJIH 5
    goto See
  }
}

actor ZombieMarineA_LastStand : RGAMonster
{
  Obituary "%o was killed by a last stand corrupted marine!"
  Health 70
  //Gibhealth 110
  Radius 20
  Height 32
  DeathHeight 14
  BurnHeight 14
  Mass 2500
  Speed 0
  ReactionTime 10
  PainChance 120
  PainChance "Dragon", 60
  PainChance "DragonF", 60
  PainChance "Dragonsplosion", 60
  PainChance "RGAFire", 60
  PainChance "Knife", 255
  PainChance "Explosion", 255
  PainChance "ExplosionF", 255
  PainChance "ExplosionC", 255
  PainChance "NormalExplode", 255
  PainChance "Stun", 255
  PainChance "Stun2", 255
  PainChance "Stun3", 255
  DamageFactor "Knife", 1.15
  SeeSound "shotguy/sight"
  PainSound "shotguy/pain"
  DeathSound "shotguy/death"
  ActiveSound "shotguy/pain"
  //seesound "heavy/sight"
  //painsound "grunt/pain"
  //deathsound "heavy/death"
  //activesound "heavy/active"
  AttackSound "u45/fire"
  Translation "112:116=128:133", "117:119=138:140", "120:122=157:159", "123:127=9:12"
  DamageFactor "Step", 0.0
  Species "Shotgunzombie"
  MONSTER
  +MISSILEMORE
  +FLOORCLIP
  -COUNTKILL
  -SOLID
  +NOICEDEATH
  DropItem "SubAmmo" 112
  DropItem "ShotgunAmmo" 128
  Tag "Corrupted Marine"
  States
  {
  Spawn:
    LAST B 0
    LAST B 0 A_CheckFlag("Friendly",2)
    LAST B 0 Thing_SetSpecial(0,226,613,0,random(6,12))
    LAST GBA 6
  Idle:
    LAST B 6 A_Look
    LAST B 0 A_JumpIfInventory("LastStandHP",50,"Die")
    LAST B 0 A_GiveInventory("LastStandHP",1)
    LAST BA 6 A_Look
    LAST A 0 A_JumpIfInventory("LastStandHP",50,"Die")
    LAST A 0 A_GiveInventory("LastStandHP",1)
    LAST A 6 A_Look
    loop
  See2:
    LAST A 6
  See:
    LAST B 0 A_JumpIfInventory("BlindCheck",2,"SeeBlind")
    LAST BB 3 A_Chase("","")
    LAST B 0 A_JumpIfInventory("LastStandHP",50,"Die")
    LAST B 0 A_GiveInventory("LastStandHP",1)
    LAST BBAA 3 A_Chase
    LAST A 0 A_JumpIfInventory("LastStandHP",50,"Die")
    LAST A 0 A_GiveInventory("LastStandHP",1)
    LAST AA 3 A_Chase
    loop
  SeeBlind:
    LAST BB 3
    LAST B 0 A_JumpIfInventory("LastStandHP",50,"Die")
    LAST B 0 A_GiveInventory("LastStandHP",1)
    LAST B 0 A_JumpIfInventory("BlindCheck",2,1)
    goto See+5
    LAST BBAA 3 A_Jump(32,"MissileBlind")
    LAST A 0 A_JumpIfInventory("LastStandHP",50,"Die")
    LAST A 0 A_GiveInventory("LastStandHP",1)
    LAST A 0 A_JumpIfInventory("BlindCheck",2,1)
    goto See+11
    LAST AA 3 A_Jump(32,"MissileBlind")
    goto See
  Die:
    LAST A 0 A_Die
    goto Death
  MissileBlind:
    LAST A 8
    LAST C 5 BRIGHT A_CustomBulletAttack(26, 4, 1, 8, "MonsterBulletPuff", 0, CBAF_AIMFACING || FBF_NORANDOM)
    LAST A 0 A_Jump(168,"See2")
    LAST A 5
    LAST C 5 BRIGHT A_CustomBulletAttack(26, 4, 1, 8, "MonsterBulletPuff", 0, CBAF_AIMFACING || FBF_NORANDOM)
    LAST A 0 A_Jump(216,"See2")
    LAST A 5
    LAST C 5 BRIGHT A_CustomBulletAttack(26, 4, 1, 8, "MonsterBulletPuff", 0, CBAF_AIMFACING || FBF_NORANDOM)
    LAST A 5
    goto See2
  Missile:
    LAST A 8 A_FaceTarget
    LAST C 5 BRIGHT A_CustomBulletAttack(13, 2, 1, 8, "MonsterBulletPuff", 0, FBF_NORANDOM)
    LAST A 0 A_Jump(112,"See2")
    LAST A 5 A_FaceTarget
    LAST C 5 BRIGHT A_CustomBulletAttack(13, 2, 1, 8, "MonsterBulletPuff", 0, FBF_NORANDOM)
    LAST A 0 A_Jump(144,"See2")
    LAST A 5 A_FaceTarget
    LAST C 5 BRIGHT A_CustomBulletAttack(13, 2, 1, 8, "MonsterBulletPuff", 0, FBF_NORANDOM)
    LAST A 5
    goto See2
  Pain.Stun:
    LAST G 0 ACS_NamedExecuteAlways("RefStun",0,0,0,0)
    goto Pain
  Pain.Stun2:
    LAST G 0 ACS_NamedExecuteAlways("RefStun",0,1,0,0)
    goto Pain
  Pain.Stun3:
    LAST G 0 ACS_NamedExecuteAlways("RefStun",0,2,0,0)
    goto Pain
  Pain:
    LAST G 4
    LAST G 8 A_Pain
    goto See
  Death:
    LAST D 5
    LAST D 5 A_Scream
    LAST E 0 A_NoBlocking
    LAST E 0 A_Jump(128,2)
    LAST E 0 A_CustomMissile("FragGrenadeDropped2",8,0,0)
    LAST E 5
    LAST EEEEE 2 A_SpawnItemEx("HealthBonus_3",0,0,0,random(-2,2),random(-2,2),random(2,5),0,0,0)
    LAST F 20 A_GiveInventory("Blinded",1,AAPTR_MASTER)
    Stop
  Death.Knife:
    LAST D 5
    LAST D 5
    LAST E 0 A_NoBlocking
    LAST E 0 A_Jump(128,2)
    LAST E 0 A_CustomMissile("FragGrenadeDropped2",8,0,0)
    LAST E 5
    LAST EEEEE 2 A_SpawnItemEx("ArmorBonus_3",0,0,0,random(-2,2),random(-2,2),random(2,5),0,0,0)
    LAST F 20 A_GiveInventory("Blinded",1,AAPTR_MASTER)
    Stop
  Death.RGAFire:
  Death.Dragonsplosion:
  Death.Dragon:
  Death.DragonF:
  Death.Fire:
    "####" # 0 A_Jump(128,"Death")
    "####" # 0 A_SpawnItemEx("RGABurnt",0,0,0,0,0,0,0,128,0)
    goto Death
  }
}

actor ZombieMarineB_LastStand : RGAMonster
{
  Obituary "%o was killed by a last stand corrupted marine!"
  Health 70
  //Gibhealth 110
  Radius 20
  Height 32
  DeathHeight 14
  BurnHeight 14
  Mass 2500
  Speed 0
  ReactionTime 10
  PainChance 120
  PainChance "Dragon", 60
  PainChance "DragonF", 60
  PainChance "Dragonsplosion", 60
  PainChance "RGAFire", 60
  PainChance "Knife", 255
  PainChance "Explosion", 255
  PainChance "ExplosionF", 255
  PainChance "ExplosionC", 255
  PainChance "NormalExplode", 255
  PainChance "Stun", 255
  PainChance "Stun2", 255
  PainChance "Stun3", 255
  DamageFactor "Knife", 1.15
  SeeSound "shotguy/sight"
  PainSound "shotguy/pain"
  DeathSound "shotguy/death"
  ActiveSound "shotguy/pain"
  //seesound "heavy/sight"
  //painsound "grunt/pain"
  //deathsound "heavy/death"
  //activesound "heavy/active"
  AttackSound "u45/fire"
  Translation "112:116=128:133", "117:119=138:140", "120:122=157:159", "123:127=9:12"
  DamageFactor "Step", 0.0
  Species "Shotgunzombie"
  MONSTER
  +MISSILEMORE
  +FLOORCLIP
  -COUNTKILL
  -SOLID
  +NOICEDEATH
  DropItem "SubAmmo" 112
  DropItem "ShotgunAmmo" 128
  Tag "Corrupted Marine"
  States
  {
  Spawn:
    LAST B 0
    LAST B 0 A_CheckFlag("Friendly",2)
    LAST B 0 Thing_SetSpecial(0,226,613,0,random(6,12))
    LAST GBA 6
  Idle:
    LAST B 6 A_Look
    LAST B 0 A_JumpIfInventory("LastStandHP",50,"Die")
    LAST B 0 A_GiveInventory("LastStandHP",1)
    LAST BA 6 A_Look
    LAST A 0 A_JumpIfInventory("LastStandHP",50,"Die")
    LAST A 0 A_GiveInventory("LastStandHP",1)
    LAST A 6 A_Look
    loop
  See2:
    LAST A 6
  See:
    LAST B 0 A_JumpIfInventory("BlindCheck",2,"SeeBlind")
    LAST BB 3 A_Chase("","")
    LAST B 0 A_JumpIfInventory("LastStandHP",50,"Die")
    LAST B 0 A_GiveInventory("LastStandHP",1)
    LAST BBAA 3 A_Chase
    LAST A 0 A_JumpIfInventory("LastStandHP",50,"Die")
    LAST A 0 A_GiveInventory("LastStandHP",1)
    LAST AA 3 A_Chase
    loop
  SeeBlind:
    LAST BB 3
    LAST B 0 A_JumpIfInventory("LastStandHP",50,"Die")
    LAST B 0 A_GiveInventory("LastStandHP",1)
    LAST B 0 A_JumpIfInventory("BlindCheck",2,1)
    goto See+5
    LAST BBAA 3 A_Jump(32,"MissileBlind")
    LAST A 0 A_JumpIfInventory("LastStandHP",50,"Die")
    LAST A 0 A_GiveInventory("LastStandHP",1)
    LAST A 0 A_JumpIfInventory("BlindCheck",2,1)
    goto See+11
    LAST AA 3 A_Jump(32,"MissileBlind")
    goto See
  Die:
    LAST A 0 A_Die
    goto Death
  MissileBlind:
    LAST A 8
    LAST C 5 BRIGHT A_CustomBulletAttack(26, 4, 1, 8, "MonsterBulletPuff", 0, CBAF_AIMFACING || FBF_NORANDOM)
    LAST A 0 A_Jump(168,"See2")
    LAST A 5
    LAST C 5 BRIGHT A_CustomBulletAttack(26, 4, 1, 8, "MonsterBulletPuff", 0, CBAF_AIMFACING || FBF_NORANDOM)
    LAST A 0 A_Jump(216,"See2")
    LAST A 5
    LAST C 5 BRIGHT A_CustomBulletAttack(26, 4, 1, 8, "MonsterBulletPuff", 0, CBAF_AIMFACING || FBF_NORANDOM)
    LAST A 5
    goto See2
  Missile:
    LAST A 8 A_FaceTarget
    LAST C 5 BRIGHT A_CustomBulletAttack(13, 2, 1, 8, "MonsterBulletPuff", 0, FBF_NORANDOM)
    LAST A 0 A_Jump(112,"See2")
    LAST A 5 A_FaceTarget
    LAST C 5 BRIGHT A_CustomBulletAttack(13, 2, 1, 8, "MonsterBulletPuff", 0, FBF_NORANDOM)
    LAST A 0 A_Jump(144,"See2")
    LAST A 5 A_FaceTarget
    LAST C 5 BRIGHT A_CustomBulletAttack(13, 2, 1, 8, "MonsterBulletPuff", 0, FBF_NORANDOM)
    LAST A 5
    goto See2
  Pain.Stun:
    LAST G 0 ACS_NamedExecuteAlways("RefStun",0,0,0,0)
    goto Pain
  Pain.Stun2:
    LAST G 0 ACS_NamedExecuteAlways("RefStun",0,1,0,0)
    goto Pain
  Pain.Stun3:
    LAST G 0 ACS_NamedExecuteAlways("RefStun",0,2,0,0)
    goto Pain
  Pain:
    LAST G 4
    LAST G 8 A_Pain
    goto See
  Death:
    LAST D 5
    LAST D 5 A_Scream
    LAST E 0 A_NoBlocking
    LAST E 0 A_Jump(128,2)
    LAST E 0 A_CustomMissile("FragGrenadeDropped2",8,0,0)
    LAST E 5
    LAST EEEEE 2 A_SpawnItemEx("HealthBonus_3",0,0,0,random(-2,2),random(-2,2),random(2,5),0,0,0)
    LAST F 20 A_GiveInventory("Blinded",1,AAPTR_MASTER)
    Stop
  Death.Knife:
    LAST D 5
    LAST D 5
    LAST E 0 A_NoBlocking
    LAST E 0 A_Jump(128,2)
    LAST E 0 A_CustomMissile("FragGrenadeDropped2",8,0,0)
    LAST E 5
    LAST EEEEE 2 A_SpawnItemEx("ArmorBonus_3",0,0,0,random(-2,2),random(-2,2),random(2,5),0,0,0)
    LAST F 20 A_GiveInventory("Blinded",1,AAPTR_MASTER)
    Stop
  Death.RGAFire:
  Death.Dragonsplosion:
  Death.Dragon:
  Death.DragonF:
  Death.Fire:
    "####" # 0 A_Jump(128,"Death")
    "####" # 0 A_SpawnItemEx("RGABurnt",0,0,0,0,0,0,0,128,0)
    goto Death
  }
}

ACTOR RGANazi : RGAMonster
{
  Obituary "%o met a nazi."
  Health 150
  GibHealth 100
  Radius 20
  Height 56
  Speed 8
  PainChance 130
  PainChance "Dragon", 65
  PainChance "DragonF", 65
  PainChance "Dragonsplosion", 65
  PainChance "RGAFire", 65
  PainChance "Knife", 255
  PainChance "Explosion", 255
  PainChance "ExplosionF", 255
  PainChance "ExplosionC", 255
  PainChance "NormalExplode", 255
  PainChance "Stun", 255
  PainChance "Stun2", 255
  PainChance "Stun3", 255
  DamageFactor "Knife", 1.65
  DamageFactor "Normal", 2
  DamageFactor "NormalExplode", 2
  DamageFactor "BarrelBoom", 4
  DamageFactor "Ice", 2
  DamageFactor "RGAFire", 2
  DamageFactor "Fire", 2
  DamageFactor "RevenantBall", 2
  DamageFactor "Cyber", 3.8
  DamageFactor "BuildFriendDamage", 2.0
  DamageFactor "SewUpYou", 2.0
  SeeSound "wolfss/sight"
  PainSound "wolfss/pain"
  DeathSound "wolfss/death"
  ActiveSound "wolfss/active"
  Translation "192:207=48:79", "240:243=1:2", "244:247=7:8", "55:55=56:56"
  //Translation "192:207=80:111", "240:247=5:8", "55:55=56:56"
  Species "Nazi"
  MONSTER
  +FLOORCLIP
  Tag "Nazi"
  States
  {
  Spawn:
    SSWV A 0
    SSWV A 0 A_CheckFlag("Friendly","Idle")
    SSWV A 0 Thing_SetSpecial(0,226,613,0,random(6,12))
  Idle:
    SSWV A 10 A_Look
    Loop
  See:
    SSWV A 0 A_JumpIfInventory("MonHold",1,"Death")
    SSWV A 0 A_JumpIfInventory("BlindCheck",1,"SeeBlind")
    SSWV AABBCCDDAABBCC 3 A_Chase("","Missile")
    SSWV DD 3 A_Chase
    SSWV AABBCCDDAABBCC 3 A_Chase("","Missile")
    SSWV DD 3 A_Chase
    SSWV D 0 A_SpawnItemEx("ZombieStepDamage",0,0,28,0,0,0,0,0,0)
    Goto See+1
  SeeBlind:
    SSWV A 0 A_Jump(144,"MissileBlind","SeeBlind2","SeeBlind2")
    SSWV AAB 3 A_Wander
    SSWV B 0 A_Jump(224,2)
    SSWV B 0 A_Pain
    SSWV B 3 A_Wander
    SSWV B 0 A_JumpIfInventory("BlindCheck",1,1)
    goto See+6
    SSWV CCDD 3 A_Wander
    SSWV A 0 A_SpawnItemEx("ZombieStepDamage",0,0,28,0,0,0,0,0,0)
    goto See
  SeeBlind2:
    SSWV A 0 A_Jump(256,1,2,3)
    SSWV AAA 3
    SSWV A 0 A_Jump(224,2)
    SSWV A 0 A_Pain
    SSWV A 3
    SSWV A 0 A_JumpIfInventory("BlindCheck",1,1)
    goto See+2
    SSWV A 0 A_Jump(256,1,2,3,4)
    SSWV AAAA 3
    goto See
  MissileBlind:
    SSWV F 7
    SSWV F 13 A_PlayWeaponSound("scar/bolt")
    SSWV G 0 BRIGHT A_PlayWeaponSound("scar/fire")
    SSWV G 3 BRIGHT A_CustomBulletAttack(30, 10, 1, 6, "MonsterBulletPuff", 0, CBAF_AIMFACING || FBF_NORANDOM)
    SSWV F 2
    SSWV G 0 BRIGHT A_PlayWeaponSound("scar/fire")
    SSWV G 3 BRIGHT A_CustomBulletAttack(30, 10, 1, 6, "MonsterBulletPuff", 0, CBAF_AIMFACING || FBF_NORANDOM)
    SSWV F 2 A_Jump(40,"See")
    SSWV F 0 A_Jump(60,"See")
    goto MissileBlind+2
  Melee:
  Missile:
    SSWV F 7 A_FaceTarget
    SSWV F 3 A_PlayWeaponSound("scar/bolt")
    SSWV F 10 A_FaceTarget
    SSWV G 0 BRIGHT A_FaceTarget
    SSWV G 0 BRIGHT A_PlayWeaponSound("scar/fire")
    SSWV G 3 BRIGHT A_CustomBulletAttack(15, 5, 1, 6, "MonsterBulletPuff", 0, FBF_NORANDOM)
    SSWV F 2 A_FaceTarget
    SSWV G 0 BRIGHT A_FaceTarget
    SSWV G 0 BRIGHT A_PlayWeaponSound("scar/fire")
    SSWV G 3 BRIGHT A_CustomBulletAttack(15, 5, 1, 6, "MonsterBulletPuff", 0, FBF_NORANDOM)
    SSWV F 2 A_CPosRefire
    SSWV F 0 A_Jump(20,"See")
    goto Missile+3
  Pain.Stun3:
    SSWV H 0 ACS_NamedExecuteAlways("RefStun",0,2,0,0)
    goto Pain
  Pain.Stun2:
    SSWV H 0 ACS_NamedExecuteAlways("RefStun",0,1,0,0)
    goto Pain
  Pain.Stun:
    SSWV H 0 ACS_NamedExecuteAlways("RefStun",0,0,0,0)
    goto Pain
  Pain.NormalExplode:
  Pain.Sniper:
  Pain.ExplosionF:
  Pain.ExplosionC:
  Pain.Explosion:
    SSWV H 3
    SSWV H 6 A_Pain
    Goto See
  Pain:
    SSWV H 3
    SSWV H 3 A_Pain
    Goto See
  Death.Shotgungib:
    SSWV I 0 A_JumpIfCloser(128, "XDeath")
  Death.Shotgun:
    SSWV I 0 A_JumpIfHealthLower(-50, "XDeath")
  Death:
    SSWV I 5
    SSWV I 0 BRIGHT A_SpawnItemEx("SCARHDrop",0,0,0,random(-2,2),random(-2,2),3,0,0,199)
    SSWV I 0 BRIGHT A_SpawnItemEx("MediumAmmo",0,0,0,random(-2,2),random(-2,2),3,0,0,159)
    SSWV J 5 A_Scream
    SSWV K 5 A_NoBlocking
    SSWV LL 2 BRIGHT A_SpawnItemEx("HealthBonus_3",0,0,0,random(-2,2),random(-2,2),random(2,5),0,0,0)
    SSWV L 1
    SSWV M 0 A_JumpIf((ACS_NamedExecuteWithResult("RefCheckVar",3,0,0) % 2) == 1, "DeathClean")
    SSWV M -1
    Stop
  Death.Knife:
    SSWV I 5
    SSWV I 0 BRIGHT A_SpawnItemEx("SCARHDrop",0,0,0,random(-2,2),random(-2,2),3,0,0,199)
    SSWV I 0 BRIGHT A_SpawnItemEx("MediumAmmo",0,0,0,random(-2,2),random(-2,2),3,0,0,159)
    SSWV J 5
    SSWV K 5 A_NoBlocking
    SSWV K 0 A_PlaySound("body/splats")
    SSWV LL 2 BRIGHT A_SpawnItemEx("ArmorBonus_3",0,0,0,random(-2,2),random(-2,2),random(2,5),0,0,0)
    SSWV L 1
    SSWV M 0 A_JumpIf((ACS_NamedExecuteWithResult("RefCheckVar",3,0,0) % 2) == 1, "DeathClean")
    SSWV M -1
    Stop
  Death.RGAFire:
  Death.Dragonsplosion:
  Death.Dragon:
  Death.DragonF:
  Death.Fire:
    "####" H 1
    "####" A 0 A_GiveInventory("MonHold",1)
    "####" A 0 A_Jump(64,"Death.Burnt")
    "####" A 0 A_ChangeFlag("FRIGHTENED",1)
    "####" A 0 A_Pain
    "####" AA 0 A_SpawnItemEx("FireFlare", random(-2,2), random(-2,2), random(12,20), random(-1,1), random(-3,1), random(1,2), 0, 128, 24)
    "####" AA 2 A_Chase("","")
    "####" BB 0 A_SpawnItemEx("FireFlare", random(-2,2), random(-2,2), random(12,20), random(-1,1), random(-3,1), random(1,2), 0, 128, 24)
    "####" BB 2 A_Chase("","")
    "####" CC 0 A_SpawnItemEx("FireFlare", random(-2,2), random(-2,2), random(12,20), random(-1,1), random(-3,1), random(1,2), 0, 128, 24)
    "####" CC 2 A_Chase("","")
    "####" DD 0 A_SpawnItemEx("FireFlare", random(-2,2), random(-2,2), random(12,20), random(-1,1), random(-3,1), random(1,2), 0, 128, 24)
    "####" DD 2 A_Chase("","")
    "####" A 0 A_ChangeFlag("FRIGHTENED",0)
    "####" AA 0 A_SpawnItemEx("FireFlare", random(-2,2), random(-2,2), random(12,20), random(-1,1), random(-3,1), random(1,2), 0, 128, 24)
    "####" AA 2 A_Wander
    "####" BB 0 A_SpawnItemEx("FireFlare", random(-2,2), random(-2,2), random(12,20), random(-1,1), random(-3,1), random(1,2), 0, 128, 24)
    "####" BB 2 A_Wander
    "####" CC 0 A_SpawnItemEx("FireFlare", random(-2,2), random(-2,2), random(12,20), random(-1,1), random(-3,1), random(1,2), 0, 128, 24)
    "####" CC 2 A_Wander
    "####" DD 0 A_SpawnItemEx("FireFlare", random(-2,2), random(-2,2), random(12,20), random(-1,1), random(-3,1), random(1,2), 0, 128, 24)
    "####" DD 2 A_Wander
    "####" D 0 A_Jump(32,"Death.Burnt")
  Death.FireCont:
    "####" A 0 A_Jump(48,2)
    "####" A 0 A_Pain
    "####" AA 0 A_SpawnItemEx("FireFlare", random(-2,2), random(-2,2), random(12,20), random(-1,1), random(-3,1), random(1,2), 0, 128, 24)
    "####" AA 2 A_Wander
    "####" BB 0 A_SpawnItemEx("FireFlare", random(-2,2), random(-2,2), random(12,20), random(-1,1), random(-3,1), random(1,2), 0, 128, 24)
    "####" BB 2 A_Wander
    "####" CC 0 A_SpawnItemEx("FireFlare", random(-2,2), random(-2,2), random(12,20), random(-1,1), random(-3,1), random(1,2), 0, 128, 24)
    "####" CC 2 A_Wander
    "####" DD 0 A_SpawnItemEx("FireFlare", random(-2,2), random(-2,2), random(12,20), random(-1,1), random(-3,1), random(1,2), 0, 128, 24)
    "####" DD 2 A_Wander
    "####" AA 0 A_SpawnItemEx("FireFlare", random(-2,2), random(-2,2), random(12,20), random(-1,1), random(-3,1), random(1,2), 0, 128, 24)
    "####" AA 2 A_Wander
    "####" BB 0 A_SpawnItemEx("FireFlare", random(-2,2), random(-2,2), random(12,20), random(-1,1), random(-3,1), random(1,2), 0, 128, 24)
    "####" BB 2 A_Wander
    "####" CC 0 A_SpawnItemEx("FireFlare", random(-2,2), random(-2,2), random(12,20), random(-1,1), random(-3,1), random(1,2), 0, 128, 24)
    "####" CC 2 A_Wander
    "####" DD 0 A_SpawnItemEx("FireFlare", random(-2,2), random(-2,2), random(12,20), random(-1,1), random(-3,1), random(1,2), 0, 128, 24)
    "####" DD 2 A_Wander
	"####" D 0 A_JumpIfInventory("MonHold",4,"Death.Burnt")
    "####" D 0 A_Jump(160,"Death.Burnt")
	"####" D 0 A_GiveInventory("MonHold",1)
    goto Death.FireCont
  Death.Ice:
    "####" # 0 A_SpawnItemEx("SCARHDrop",0,0,0,random(-2,2),random(-2,2),3,0,0,191)
    "####" # 0 A_SpawnItemEx("MediumAmmo",0,0,0,random(-2,2),random(-2,2),3,0,0,159)
    "####" # 0 A_SpawnItemEx("HealthBonus_3",0,0,0,random(-2,2),random(-2,2),random(2,5),0,0,0)
    "####" # 0 A_SpawnItemEx("HealthBonus_3",0,0,0,random(-2,2),random(-2,2),random(2,5),0,0,0)
    "####" # 5 A_GenericFreezeDeath
    "----" A 1 A_FreezeDeathChunks
    wait
  Death.Burnt:
    "####" # 0 A_Jump(128,"Death")
    "####" # 0 A_SpawnItemEx("RGABurnt",0,0,0,0,0,0,0,128,0)
    goto Death
  XDeath:
    SSWV N 5
    SSWV N 0 BRIGHT A_SpawnItemEx("SCARHDrop",0,0,0,random(-2,2),random(-2,2),3,0,0,191)
    SSWV N 0 BRIGHT A_SpawnItemEx("MediumAmmo",0,0,0,random(-2,2),random(-2,2),3,0,0,159)
    SSWV O 5 A_XScream
    SSWV P 5 A_NoBlocking
    SSWV QRSTU 5
    SSWV V 0 A_JumpIf((ACS_NamedExecuteWithResult("RefCheckVar",3,0,0)  % 2) == 1, 2)
    SSWV V -1
    Stop
    SSWV VVVVVV 5250
    SSWV VVVVVVVVV 2 A_FadeOut(0.1)
    Stop
  DeathClean:
    SSWV MMMMMM 5250
    SSWV MMMMMMMMM 2 A_FadeOut(0.1)
    Stop
  Raise:
    SSWV M 0
    SSWV M 0 A_ChangeFlag("FRIGHTENED",0)
	SSWV M 0 A_TakeInventory("MonHold",35)
    SSWV M 5 Thing_SetSpecial(0,226,613,0,random(3,6))
    SSWV LKJI 5
    Goto See
  }
}

actor SpaceNazi : RGAMonster
{
  Obituary "%o was blitzed by a space nazi."
  Health 175
  Radius 20
  Height 56
  Mass 110
  Speed 8
  PainChance 130
  PainChance "Dragon", 65
  PainChance "DragonF", 65
  PainChance "Dragonsplosion", 65
  PainChance "RGAFire", 65
  PainChance "Knife", 255
  PainChance "Explosion", 255
  PainChance "ExplosionF", 255
  PainChance "ExplosionC", 255
  PainChance "NormalExplode", 255
  PainChance "Stun", 255
  PainChance "Stun2", 255
  PainChance "Stun3", 255
  DamageFactor "Knife", 1.65
  DamageFactor "Normal", 2
  DamageFactor "NormalExplode", 2
  DamageFactor "BarrelBoom", 4
  DamageFactor "Ice", 2
  DamageFactor "RGAFire", 2
  DamageFactor "Fire", 2
  DamageFactor "RevenantBall", 2
  DamageFactor "Cyber", 3.8
  DamageFactor "BuildFriendDamage", 2.0
  DamageFactor "SewUpYou", 2.0
  SeeSound "wolfss/sight"
  ActiveSound "wolfss/active"
  painSound "wolfss/pain"
  DeathSound "misc/teleport"
  Translation "192:207=80:111", "240:247=5:8", "55:55=56:56" 
  Species "Nazi"
  MONSTER
  +FLOORCLIP
  Tag "Space Nazi"
  States
  {
  Spawn:
    BHEL A 0
    BHEL A 0 A_CheckFlag("Friendly","Idle")
    BHEL A 0 Thing_SetSpecial(0,226,613,0,random(8,16))
  Idle:
    BHEL A 10 A_Look
    Loop
  See:
    BHEL A 0 A_JumpIfInventory("MonHold",1,"Death")
    BHEL A 0 A_JumpIfInventory("BlindCheck",1,"SeeBlind")
    BHEL AABBCCDDAABBCC 3 A_Chase("","Missile")
    BHEL DD 3 A_Chase
    BHEL AABBCCDDAABBCC 3 A_Chase("","Missile")
    BHEL DD 3 A_Chase
    BHEL D 0 A_SpawnItemEx("ZombieStepDamage",0,0,28,0,0,0,0,0,0)
    Goto See+1
  SeeBlind:
    BHEL A 0 A_Jump(144,"MissileBlind","SeeBlind2","SeeBlind2")
    BHEL AAB 3 A_Wander
    BHEL B 0 A_Jump(224,2)
    BHEL B 0 A_Pain
    BHEL B 3 A_Wander
    BHEL B 0 A_JumpIfInventory("BlindCheck",1,1)
    goto See+6
    BHEL CCDD 3 A_Wander
    BHEL A 0 A_SpawnItemEx("ZombieStepDamage",0,0,28,0,0,0,0,0,0)
    goto See
  SeeBlind2:
    BHEL A 0 A_Jump(256,1,2,3)
    BHEL AAA 3
    BHEL A 0 A_Jump(224,2)
    BHEL A 0 A_Pain
    BHEL A 3
    BHEL A 0 A_JumpIfInventory("BlindCheck",1,1)
    goto See+2
    BHEL A 0 A_Jump(256,1,2,3,4)
    BHEL AAAA 3
    goto See
  MissileBlind:
    BHEL E 2
    BHEL E 18 A_PlayWeaponSound("fal/bolt")
    BHEL F 0 BRIGHT A_PlayWeaponSound("fal/fire")
    BHEL F 3 BRIGHT A_CustomBulletAttack(30, 10, 1, 7, "MonsterBulletPuff", 0, CBAF_AIMFACING || FBF_NORANDOM)
    BHEL E 3
    BHEL F 0 BRIGHT A_PlayWeaponSound("fal/fire")
    BHEL F 3 BRIGHT A_CustomBulletAttack(30, 10, 1, 7, "MonsterBulletPuff", 0, CBAF_AIMFACING || FBF_NORANDOM)
    BHEL E 3 A_Jump(40,"See")
    BHEL E 0 A_Jump(48,"See")
    goto MissileBlind+2
  Melee:
  Missile:
    BHEL E 2 A_FaceTarget
    BHEL E 8 A_PlayWeaponSound("fal/bolt")
    BHEL E 10 A_FaceTarget
    BHEL F 0 BRIGHT A_FaceTarget
    BHEL F 0 BRIGHT A_PlayWeaponSound("fal/fire")
    BHEL F 3 BRIGHT A_CustomBulletAttack(15, 5, 1, 7, "MonsterBulletPuff", 0, FBF_NORANDOM)
    BHEL E 3 A_FaceTarget
    BHEL F 0 BRIGHT A_FaceTarget
    BHEL F 0 BRIGHT A_PlayWeaponSound("fal/fire")
    BHEL F 3 BRIGHT A_CustomBulletAttack(15, 5, 1, 7, "MonsterBulletPuff", 0, FBF_NORANDOM)
    BHEL E 3 A_CPosRefire
    BHEL E 0 A_Jump(16,"See")
    goto Missile+3
  Pain.Stun3:
    SSWV H 0 ACS_NamedExecuteAlways("RefStun",0,2,0,0)
    goto Pain
  Pain.Stun2:
    SSWV H 0 ACS_NamedExecuteAlways("RefStun",0,1,0,0)
    goto Pain
  Pain.Stun:
    SSWV H 0 ACS_NamedExecuteAlways("RefStun",0,0,0,0)
    goto Pain
  Pain.NormalExplode:
  Pain.Sniper:
  Pain.ExplosionF:
  Pain.ExplosionC:
  Pain.Explosion:
    BHEL G 3
    BHEL G 6 A_Pain
    Goto See
  Pain:
    BHEL G 3
    BHEL G 3 A_Pain
    goto See
  Death:
    BHEL H 5 BRIGHT
    BHEL I 0 BRIGHT A_SpawnItemEx("FALDrop",0,0,0,random(-2,2),random(-2,2),3,0,0,191)
    BHEL I 0 BRIGHT A_SpawnItemEx("MediumAmmo",0,0,0,random(-2,2),random(-2,2),3,0,0,159)
    BHEL I 0 BRIGHT A_Scream
    BHEL I 5 BRIGHT A_PlaySound("wolfss/death")
    BHEL J 5 BRIGHT A_NoBlocking
    BHEL KL 5 BRIGHT
    BHEL MM 2 BRIGHT A_SpawnItemEx("HealthBonus_3",0,0,0,random(-2,2),random(-2,2),random(2,5),0,0,0)
    BHEL M 1 BRIGHT A_SpawnItemEx("HealthBonus_3",0,0,0,random(-2,2),random(-2,2),random(2,5),0,0,0)
    BHEL N 0 A_JumpIf((ACS_NamedExecuteWithResult("RefCheckVar",3,0,0) % 2) == 1, "DeathClean")
    BHEL N -1
    Stop
  Death.Knife:
    BHEL H 5 BRIGHT
    BHEL I 0 BRIGHT A_SpawnItemEx("FALDrop",0,0,0,random(-2,2),random(-2,2),3,0,0,191)
    BHEL I 0 BRIGHT A_SpawnItemEx("MediumAmmo",0,0,0,random(-2,2),random(-2,2),3,0,0,159)
    BHEL I 5 BRIGHT A_Scream
    BHEL J 5 BRIGHT A_NoBlocking
    BHEL KL 5 BRIGHT
    BHEL MM 2 BRIGHT A_SpawnItemEx("ArmorBonus_3",0,0,0,random(-2,2),random(-2,2),random(2,5),0,0,0)
    BHEL M 1 BRIGHT A_SpawnItemEx("ArmorBonus_3",0,0,0,random(-2,2),random(-2,2),random(2,5),0,0,0)
    BHEL N 0 A_JumpIf((ACS_NamedExecuteWithResult("RefCheckVar",3,0,0) % 2) == 1, "DeathClean")
    BHEL N -1
    Stop
  Death.RGAFire:
  Death.Dragonsplosion:
  Death.Dragon:
  Death.DragonF:
  Death.Fire:
    "####" G 1
    "####" A 0 A_GiveInventory("MonHold",1)
    "####" A 0 A_Jump(64,"Death")
    "####" A 0 A_ChangeFlag("FRIGHTENED",1)
    "####" A 0 A_Pain
    "####" AA 0 A_SpawnItemEx("FireFlare", random(-2,2), random(-2,2), random(12,20), random(-1,1), random(-3,1), random(1,2), 0, 128, 24)
    "####" AA 2 A_Chase("","")
    "####" BB 0 A_SpawnItemEx("FireFlare", random(-2,2), random(-2,2), random(12,20), random(-1,1), random(-3,1), random(1,2), 0, 128, 24)
    "####" BB 2 A_Chase("","")
    "####" CC 0 A_SpawnItemEx("FireFlare", random(-2,2), random(-2,2), random(12,20), random(-1,1), random(-3,1), random(1,2), 0, 128, 24)
    "####" CC 2 A_Chase("","")
    "####" DD 0 A_SpawnItemEx("FireFlare", random(-2,2), random(-2,2), random(12,20), random(-1,1), random(-3,1), random(1,2), 0, 128, 24)
    "####" DD 2 A_Chase("","")
    "####" A 0 A_ChangeFlag("FRIGHTENED",0)
    "####" AA 0 A_SpawnItemEx("FireFlare", random(-2,2), random(-2,2), random(12,20), random(-1,1), random(-3,1), random(1,2), 0, 128, 24)
    "####" AA 2 A_Wander
    "####" BB 0 A_SpawnItemEx("FireFlare", random(-2,2), random(-2,2), random(12,20), random(-1,1), random(-3,1), random(1,2), 0, 128, 24)
    "####" BB 2 A_Wander
    "####" CC 0 A_SpawnItemEx("FireFlare", random(-2,2), random(-2,2), random(12,20), random(-1,1), random(-3,1), random(1,2), 0, 128, 24)
    "####" CC 2 A_Wander
    "####" DD 0 A_SpawnItemEx("FireFlare", random(-2,2), random(-2,2), random(12,20), random(-1,1), random(-3,1), random(1,2), 0, 128, 24)
    "####" DD 2 A_Wander
    "####" D 0 A_Jump(32,"Death")
  Death.FireCont:
    "####" A 0 A_Jump(48,2)
    "####" A 0 A_Pain
    "####" AA 0 A_SpawnItemEx("FireFlare", random(-2,2), random(-2,2), random(12,20), random(-1,1), random(-3,1), random(1,2), 0, 128, 24)
    "####" AA 2 A_Wander
    "####" BB 0 A_SpawnItemEx("FireFlare", random(-2,2), random(-2,2), random(12,20), random(-1,1), random(-3,1), random(1,2), 0, 128, 24)
    "####" BB 2 A_Wander
    "####" CC 0 A_SpawnItemEx("FireFlare", random(-2,2), random(-2,2), random(12,20), random(-1,1), random(-3,1), random(1,2), 0, 128, 24)
    "####" CC 2 A_Wander
    "####" DD 0 A_SpawnItemEx("FireFlare", random(-2,2), random(-2,2), random(12,20), random(-1,1), random(-3,1), random(1,2), 0, 128, 24)
    "####" DD 2 A_Wander
    "####" AA 0 A_SpawnItemEx("FireFlare", random(-2,2), random(-2,2), random(12,20), random(-1,1), random(-3,1), random(1,2), 0, 128, 24)
    "####" AA 2 A_Wander
    "####" BB 0 A_SpawnItemEx("FireFlare", random(-2,2), random(-2,2), random(12,20), random(-1,1), random(-3,1), random(1,2), 0, 128, 24)
    "####" BB 2 A_Wander
    "####" CC 0 A_SpawnItemEx("FireFlare", random(-2,2), random(-2,2), random(12,20), random(-1,1), random(-3,1), random(1,2), 0, 128, 24)
    "####" CC 2 A_Wander
    "####" DD 0 A_SpawnItemEx("FireFlare", random(-2,2), random(-2,2), random(12,20), random(-1,1), random(-3,1), random(1,2), 0, 128, 24)
    "####" DD 2 A_Wander
	"####" D 0 A_JumpIfInventory("MonHold",4,"Death")
    "####" D 0 A_Jump(160,"Death")
	"####" D 0 A_GiveInventory("MonHold",1)
    goto Death.FireCont
  Death.Ice:
    "####" # 0 A_SpawnItemEx("FALDrop",0,0,0,random(-2,2),random(-2,2),3,0,0,191)
    "####" # 0 A_SpawnItemEx("MediumAmmo",0,0,0,random(-2,2),random(-2,2),3,0,0,159)
    "####" # 0 A_SpawnItemEx("HealthBonus_3",0,0,0,random(-2,2),random(-2,2),random(2,5),0,0,0)
    "####" # 0 A_SpawnItemEx("HealthBonus_3",0,0,0,random(-2,2),random(-2,2),random(2,5),0,0,0)
    "####" # 5 A_GenericFreezeDeath
    "----" A 1 A_FreezeDeathChunks
    wait
  DeathClean:
    BHEL NNNNNN 5250
    BHEL NNNNNNNNN 2 A_FadeOut(0.1)
    Stop
  Raise:
    BHEL M 0 BRIGHT
    BHEL M 0 BRIGHT A_ChangeFlag("FRIGHTENED",0)
	BHEL M 0 BRIGHT A_TakeInventory("MonHold",35)
    BHEL M 0 BRIGHT A_PlaySound("wolfss/teleport")
    BHEL M 7 BRIGHT Thing_SetSpecial(0,226,613,0,random(4,8))
    BHEL LKJIH 7 BRIGHT
    goto See
  }
}

ACTOR UziGuy : RGAMonster
{
  HitObituary "%o was punched by a nazi collaborator."
  Obituary "%o was shot up by a nazi collaborator."
  Health 150
  GibHealth 100
  Speed 5
  Radius 20
  Height 56
  Mass 100
  ReactionTime 14
  MinMissileChance 223
  PainChance 180
  PainChance "Dragon", 90
  PainChance "DragonF", 90
  PainChance "Dragonsplosion", 90
  PainChance "RGAFire", 90
  PainChance "Knife", 255
  PainChance "Explosion", 255
  PainChance "ExplosionF", 255
  PainChance "ExplosionC", 255
  PainChance "NormalExplode", 255
  PainChance "Stun", 255
  PainChance "Stun2", 255
  PainChance "Stun3", 255
  DamageFactor "Knife", 1.65
  DamageFactor "Normal", 2
  DamageFactor "NormalExplode", 2
  DamageFactor "BarrelBoom", 4
  DamageFactor "Ice", 2
  DamageFactor "RGAFire", 2
  DamageFactor "Fire", 2
  DamageFactor "RevenantBall", 2
  DamageFactor "Cyber", 3.8
  DamageFactor "BuildFriendDamage", 2.0
  DamageFactor "SewUpYou", 2.0
  Translation "55:55=56:56" 
  Species "Nazi"
  MONSTER
  +FLOORCLIP
  SeeSound "grunt/sight"
  ActiveSound "grunt/active"
  PainSound "grunt/pain"
  DeathSound "grunt/death"
  DropItem "MP5Drop" 64
  DropItem "SubAmmo" 96
  Tag "Nazi Collaborator"
  States
  {
  Spawn:
    PEUU A 0
    PEUU A 0 A_CheckFlag("Friendly","Idle")
    PEUU A 0 Thing_SetSpecial(0,226,613,0,random(7,14))
  Idle:
    PEUU A 0 A_TakeInventory("InCombat",10)
    PEUU A 4 A_Look
    Goto Idle+1
  SeeCont:
    PEUU E 7
  See:
    PEUU A 0 A_JumpIfInventory("MonHold",1,"Death")
    PEUU A 0 A_JumpIfInventory("BlindCheck",1,"SeeBlind")
    PEUU A 2 A_Chase("","Missile")
    PEUU AA 2 A_Chase("","")
    PEUU AB 2 A_Chase("","Missile")
    PEUU BB 2 A_Chase("","")
    PEUU BC 2 A_Chase("","Missile")
    PEUU CC 2 A_Chase("","")
    PEUU CD 2 A_Chase("","Missile")
    PEUU DD 2 A_Chase("","")
    PEUU DA 2 A_Chase("","Missile")
    PEUU AA 2 A_Chase("","")
    PEUU AB 2 A_Chase("","Missile")
    PEUU BB 2 A_Chase("","")
    PEUU BC 2 A_Chase("","Missile")
    PEUU CC 2 A_Chase("","")
    PEUU CD 2 A_Chase("Melee","Missile")
    PEUU DD 2 A_Chase("Melee","")
    PEUU DA 2 A_Chase("","Missile")
    PEUU AA 2 A_Chase("","")
    PEUU AB 2 A_Chase("","Missile")
    PEUU BB 2 A_Chase("","")
    PEUU BC 2 A_Chase("","Missile")
    PEUU CC 2 A_Chase("","")
    PEUU CD 2 A_Chase("","Missile")
    PEUU DD 2 A_Chase("","")
    PEUU DA 2 A_Chase("","Missile")
    PEUU AA 2 A_Chase("","")
    PEUU AB 2 A_Chase("","Missile")
    PEUU BB 2 A_Chase("","")
    PEUU BC 2 A_Chase("","Missile")
    PEUU CC 2 A_Chase("","")
    PEUU CD 2 A_Chase("Melee","Missile")
    PEUU DD 2 A_Chase("Melee","")
    PEUU D 2 A_Chase("","Missile")
    PEUU D 0 A_SpawnItemEx("ZombieStepDamage",0,0,28,0,0,0,0,0,0)
    Goto See+1
  SeeBlind:
    PEUU A 0 A_Jump(144,"MissileBlind","SeeBlind2","SeeBlind2")
    PEUU AAAABB 2 A_Wander
    PEUU B 0 A_Jump(224,2)
    PEUU B 0 A_Pain
    PEUU BB 2 A_Wander
    PEUU B 0 A_JumpIfInventory("BlindCheck",1,1)
    goto See+10
    PEUU CCCCDDDD 2 A_Wander
    PEUU D 0 A_SpawnItemEx("ZombieStepDamage",0,0,28,0,0,0,0,0,0)
    goto See
  SeeBlind2:
    PEUU A 0 A_Jump(256,1,2,3)
    PEUU AAA 4
    PEUU A 0 A_Jump(224,2)
    PEUU A 0 A_Pain
    PEUU A 4
    PEUU A 0 A_JumpIfInventory("BlindCheck",1,1)
    goto See+2
    PEUU A 0 A_Jump(256,1,2,3,4)
    PEUU AAAA 4
    goto See
  MissileBlind:
    PEUU E 5
    PEUU E 9 A_PlayWeaponSound("mp5k/bolt")
    PEUU P 0 BRIGHT A_PlayWeaponSound("mp5k/fire")
    PEUU P 2 BRIGHT A_CustomBulletAttack(30, 15, 1, 5, "MonsterBulletPuff", 0, CBAF_AIMFACING || FBF_NORANDOM)
    PEUU F 2
    PEUU F 0 A_Jump(40,"SeeCont")
    PEUU F 0 A_Jump(84,"SeeCont")
    Goto MissileBlind+2
  Melee:
    PEAS E 0 A_FaceTarget
    PEAS E 8 A_SkelWhoosh
    PEAS F 8 A_CustomMeleeAttack(10,"skeleton/melee","none")
    PEAS E 8
    Goto See
  Missile:
    PEUU E 5 A_FaceTarget
    PEUU E 2 A_PlayWeaponSound("mp5k/bolt")
    PEUU E 7 A_FaceTarget
    PEUU P 0 BRIGHT A_FaceTarget
    PEUU P 0 BRIGHT A_PlayWeaponSound("mp5k/fire")
    PEUU P 2 BRIGHT A_CustomBulletAttack(15, 7.5, 1, 5, "MonsterBulletPuff", 0, FBF_NORANDOM)
    PEUU F 2
    PEUU F 0 A_MonsterRefire(40,"SeeCont")
    PEUU F 0 A_Jump(28,"SeeCont")
    Goto Missile+3
  Pain.Stun3:
    PEUU O 0 ACS_NamedExecuteAlways("RefStun",0,2,0,0)
    PEUU O 0 A_JumpIfInventory("InCombat",1,"HurtPain")
    goto Pain+5
  Pain.Stun2:
    PEUU O 0 ACS_NamedExecuteAlways("RefStun",0,1,0,0)
    PEUU O 0 A_JumpIfInventory("InCombat",1,"HurtPain")
    goto Pain+5
  Pain.Stun:
    PEUU O 0 ACS_NamedExecuteAlways("RefStun",0,0,0,0)
    PEUU O 0 A_JumpIfInventory("InCombat",1,"HurtPain")
    goto Pain+5
  Pain.RGAFire:
  Pain.Dragonsplosion:
  Pain.Dragon:
  Pain.Fire:
    PEUU O 0
    PEUU O 0 A_JumpIfInventory("InCombat",1,"HurtPain")
    PEUU O 3 
    PEUU O 3 A_Pain
    Goto See
  Pain.NormalExplode:
  Pain.Sniper:
  Pain.ExplosionF:
  Pain.ExplosionC:
  Pain.Explosion:
    PEUU O 0
    PEUU O 0 A_JumpIfInventory("InCombat",1,"HurtPain")
    PEUU O 0 A_JumpIfInventory("BreathWait",1,3)
    PEUU O 0 A_Jump(191,2)
    PEUU O 0 A_JumpIfHealthLower(31,"HurtPain")
    PEUU O 3 
    PEUU O 6 A_Pain
    Goto See
  Pain:
    PEUU O 0
    PEUU O 0 A_JumpIfInventory("InCombat",1,"HurtPain")
    PEUU O 0 A_JumpIfInventory("BreathWait",1,3)
    PEUU O 0 A_Jump(127,2)
    PEUU O 0 A_JumpIfHealthLower(46,"HurtPain")
    PEUU O 3 
    PEUU O 3 A_Pain
    Goto See
  HurtPain:
    PEUU H 0 A_GiveInventory("InCombat",1)
    PEUU H 3
    PEUU H 3 A_Pain
    PEUU I 10
    goto Hurt+2
  Hurt:
    PEUU G 10
    PEUU HHHHHHHHHHHHHH 0 A_GetHurt
    PEUU H 10 A_GetHurt
    PEUU I 25
    PEUU HHHHHHHHHHHHHH 0 A_GetHurt
    PEUU H 10 A_GetHurt
    PEUU I 25
    PEUU I 0 A_Jump(10,1)
    Goto Hurt+17
    PEUU G 0 A_TakeInventory("InCombat",10)
    PEUU G 0 A_CheckFlag("Boss","Die")
    PEUU G 0 A_JumpIf((ACS_NamedExecuteWithResult("RefCheckVar",2,0,0)) == 1, "Die")
    PEUU G 0 A_GiveInventory("BreathWait",1)
    PEUU G 0 A_GiveInventory("Health",random(45,70))
    PEUU G 35 A_PlaySound("grunt/active")
    Goto See
  Die:
    PEUU G 0 A_Die
    Goto Death
  Death.Shotgungib:
    PEUU H 0 A_JumpIfCloser(128, "XDeath")
  Death.Shotgun:
    PEUU H 0 A_JumpIfHealthLower(-50, "XDeath")
  Death:
    PEUU H 0 A_TakeInventory("InCombat",10)
    PEUU H 0 A_TakeInventory("BreathWait",35)
    PEUU H 6
    PEUU I 6 A_Scream
    PEUU J 6 A_NoBlocking
    PEUU K 6
    PEUU LL 3 A_SpawnItemEx("HealthBonus_3",0,0,0,random(-2,2),random(-2,2),random(2,5),0,0,0)
    PEUU M 8
    PEUU N 0 A_JumpIf((ACS_NamedExecuteWithResult("RefCheckVar",3,0,0) % 2) == 1, "DeathClean")
    PEUU N -1
    Stop
  Death.Knife:
    PEUU H 0 A_TakeInventory("InCombat",10)
    PEUU H 0 A_TakeInventory("BreathWait",35)
    PEUU H 6
    PEUU I 6
    PEUU J 6 A_NoBlocking
    PEUU K 6
    PEUU L 0 A_PlaySound("body/splats")
    PEUU LL 3 A_SpawnItemEx("ArmorBonus_3",0,0,0,random(-2,2),random(-2,2),random(2,5),0,0,0)
    PEUU M 8
    PEUU N 0 A_JumpIf((ACS_NamedExecuteWithResult("RefCheckVar",3,0,0) % 2) == 1, "DeathClean")
    PEUU N -1
    Stop
  Death.RGAFire:
  Death.Dragonsplosion:
  Death.Dragon:
  Death.DragonF:
  Death.Fire:
    "####" O 1
    "####" A 0 A_GiveInventory("MonHold",1)
    "####" A 0 A_Jump(64,"Death.Burnt")
    "####" A 0 A_ChangeFlag("FRIGHTENED",1)
    "####" A 0 A_Pain
    "####" AA 0 A_SpawnItemEx("FireFlare", random(-2,2), random(-2,2), random(12,20), random(-1,1), random(-3,1), random(1,2), 0, 128, 24)
    "####" AA 2 A_Chase("","")
    "####" BB 0 A_SpawnItemEx("FireFlare", random(-2,2), random(-2,2), random(12,20), random(-1,1), random(-3,1), random(1,2), 0, 128, 24)
    "####" BB 2 A_Chase("","")
    "####" CC 0 A_SpawnItemEx("FireFlare", random(-2,2), random(-2,2), random(12,20), random(-1,1), random(-3,1), random(1,2), 0, 128, 24)
    "####" CC 2 A_Chase("","")
    "####" DD 0 A_SpawnItemEx("FireFlare", random(-2,2), random(-2,2), random(12,20), random(-1,1), random(-3,1), random(1,2), 0, 128, 24)
    "####" DD 2 A_Chase("","")
    "####" A 0 A_ChangeFlag("FRIGHTENED",0)
    "####" AA 0 A_SpawnItemEx("FireFlare", random(-2,2), random(-2,2), random(12,20), random(-1,1), random(-3,1), random(1,2), 0, 128, 24)
    "####" AA 2 A_Wander
    "####" BB 0 A_SpawnItemEx("FireFlare", random(-2,2), random(-2,2), random(12,20), random(-1,1), random(-3,1), random(1,2), 0, 128, 24)
    "####" BB 2 A_Wander
    "####" CC 0 A_SpawnItemEx("FireFlare", random(-2,2), random(-2,2), random(12,20), random(-1,1), random(-3,1), random(1,2), 0, 128, 24)
    "####" CC 2 A_Wander
    "####" DD 0 A_SpawnItemEx("FireFlare", random(-2,2), random(-2,2), random(12,20), random(-1,1), random(-3,1), random(1,2), 0, 128, 24)
    "####" DD 2 A_Wander
    "####" D 0 A_Jump(32,"Death.Burnt")
  Death.FireCont:
    "####" A 0 A_Jump(48,2)
    "####" A 0 A_Pain
    "####" AA 0 A_SpawnItemEx("FireFlare", random(-2,2), random(-2,2), random(12,20), random(-1,1), random(-3,1), random(1,2), 0, 128, 24)
    "####" AA 2 A_Wander
    "####" BB 0 A_SpawnItemEx("FireFlare", random(-2,2), random(-2,2), random(12,20), random(-1,1), random(-3,1), random(1,2), 0, 128, 24)
    "####" BB 2 A_Wander
    "####" CC 0 A_SpawnItemEx("FireFlare", random(-2,2), random(-2,2), random(12,20), random(-1,1), random(-3,1), random(1,2), 0, 128, 24)
    "####" CC 2 A_Wander
    "####" DD 0 A_SpawnItemEx("FireFlare", random(-2,2), random(-2,2), random(12,20), random(-1,1), random(-3,1), random(1,2), 0, 128, 24)
    "####" DD 2 A_Wander
    "####" AA 0 A_SpawnItemEx("FireFlare", random(-2,2), random(-2,2), random(12,20), random(-1,1), random(-3,1), random(1,2), 0, 128, 24)
    "####" AA 2 A_Wander
    "####" BB 0 A_SpawnItemEx("FireFlare", random(-2,2), random(-2,2), random(12,20), random(-1,1), random(-3,1), random(1,2), 0, 128, 24)
    "####" BB 2 A_Wander
    "####" CC 0 A_SpawnItemEx("FireFlare", random(-2,2), random(-2,2), random(12,20), random(-1,1), random(-3,1), random(1,2), 0, 128, 24)
    "####" CC 2 A_Wander
    "####" DD 0 A_SpawnItemEx("FireFlare", random(-2,2), random(-2,2), random(12,20), random(-1,1), random(-3,1), random(1,2), 0, 128, 24)
    "####" DD 2 A_Wander
	"####" D 0 A_JumpIfInventory("MonHold",4,"Death.Burnt")
    "####" D 0 A_Jump(160,"Death.Burnt")
	"####" D 0 A_GiveInventory("MonHold",1)
    goto Death.FireCont
  Death.Ice:
    "####" # 0 A_TakeInventory("InCombat",10)
    "####" # 0 A_TakeInventory("BreathWait",35)
    "####" # 0 A_SpawnItemEx("HealthBonus_3",0,0,0,random(-2,2),random(-2,2),random(2,5),0,0,0)
    "####" # 0 A_SpawnItemEx("HealthBonus_3",0,0,0,random(-2,2),random(-2,2),random(2,5),0,0,0)
    "####" # 5 A_GenericFreezeDeath
    "----" A 1 A_FreezeDeathChunks
    wait
  Death.Burnt:
    "####" # 0 A_Jump(128,"Death")
    "####" # 0 A_SpawnItemEx("RGABurnt",0,0,0,0,0,0,0,128,0)
    goto Death
  XDeath:
    POSS M 0 A_TakeInventory("InCombat",10)
    POSS M 0 A_TakeInventory("BreathWait",35)
    POSS M 5
    POSS N 5 A_XScream
    POSS O 5 A_NoBlocking
    POSS PQRST 5
    POSS U 0 A_JumpIf((ACS_NamedExecuteWithResult("RefCheckVar",3,0,0) % 2) == 1, 2)
    POSS U -1
    Stop
    POSS UUUUUU 5250
    POSS UUUUUUUUU 2 A_FadeOut(0.1)
    Stop
  DeathClean:
    PEUU NNNNNN 5250
    PEUU NNNNNNNNN 2 A_FadeOut(0.1)
    Stop
  Raise:
    PEUU N 0
    PEUU N 0 A_TakeInventory("InCombat",10)
    PEUU N 0 A_TakeInventory("BreathWait",35)
    PEUU N 0 A_ChangeFlag("FRIGHTENED",0)
    PEUU N 0 A_TakeInventory("MonHold",35)
    PEUU N 5 Thing_SetSpecial(0,226,613,0,random(4,13))
    PEUU MLKJIHG 5
    goto See
  }
}