/*
CREDITS:
Sounds - ID (RTCW)
*/

actor GrammarNazi : WolfensteinSS replaces WolfensteinSS
{
  obituary "%o got own'd by grammar nazi!"
  health 100
  speed 10
  painchance 110
  Translation "199:207=103:111", "240:242=0:2", "243:247=5:8"
  dropitem "Boolet" 128
  dropitem "MP40Pickup" 256
  seesound "wolfss/sight"
  attacksound "wolfss/mp40"
  painsound "wolfss/pain"
  deathsound "wolfss/death"
  activesound "wolfss/sight"
  MONSTER
  +FLOORCLIP
  states
  {
  Spawn:
    SSWV A 0 A_Jump(8,"LookAround","Patrol")
    SSWV A 20 A_LookEx(0,0,1536,2048,90,"See")
    loop
  Patrol:
    SSWV A 0 A_SpawnItemEx ("MarineStep", 0, 0, 0, 0, 0, -20, 0,0, 0) 
    SSWV A 0 A_LookEx(0,0,1536,2048,90,"See")
    SSWV AA 4 A_Wander
    SSWV A 0 A_LookEx(0,0,1536,2048,90,"See")
    SSWV BB 4 A_Wander
    SSWV A 0 A_SpawnItemEx ("MarineStep", 0, 0, 0, 0, 0, -20, 0,0, 0) 
    SSWV A 0 A_LookEx(0,0,1536,2048,90,"See")
    SSWV CC 4 A_Wander
    SSWV A 0 A_LookEx(0,0,1536,2048,90,"See")
    SSWV DD 4 A_Wander
    SSWV A 0 A_Jump(64,"Patrol")
    Goto Spawn
  See:
    SSWV A 0 A_JumpIfHealthLower(25, "HolyDogShitIMustSaveMyAss")
    SSWV A 0 A_JumpIfInventory("NaziMeter",60,"GiveUp")
    SSWV A 0 A_GiveInventory("NaziMeter",1)
    SSWV A 0 A_SpawnItemEx ("MarineStep", 0, 0, 0, 0, 0, -20, 0,0, 0) 
    SSWV AABB 2 A_Chase(0,"Missile",CHF_RESURRECT)
    SSWV A 0 A_SpawnItemEx ("MarineStep", 0, 0, 0, 0, 0, -20, 0,0, 0) 
    SSWV CCDD 2 A_Chase(0,"Missile",CHF_RESURRECT)
    Goto See
  HolyDogShitIMustSaveMyAss:
    SSWV A 0 A_ChangeFlag("FRIGHTENED",1)
    Goto See+1
  LookAround:
    SSWV A 0 A_Jump(255,"LookLeft","LookRight")
    Goto See
  LookLeft:
    SSWV A 0 A_SpawnItemEx ("MarineStep", 0, 0, 0, 0, 0, -20, 0,0, 0) 
    SSWV A 0 A_LookEx(0,0,1536,2048,90,"See")
    SSWV A 4 A_SetAngle(angle-15)
    SSWV B 0 A_LookEx(0,0,1536,2048,90,"See")
    SSWV B 4 A_SetAngle(angle-15)
    SSWV A 0 A_SpawnItemEx ("MarineStep", 0, 0, 0, 0, 0, -20, 0,0, 0) 
    SSWV C 0 A_LookEx(0,0,1536,2048,90,"See")
    SSWV C 4 A_SetAngle(angle-15)
    SSWV D 0 A_LookEx(0,0,1536,2048,90,"See")
    SSWV D 4 A_SetAngle(angle-15)
    Goto Spawn
  LookRight:
    SSWV A 0 A_SpawnItemEx ("MarineStep", 0, 0, 0, 0, 0, -20, 0,0, 0) 
    SSWV A 0 A_LookEx(0,0,1536,2048,90,"See")
    SSWV A 4 A_SetAngle(15+angle)
    SSWV B 0 A_LookEx(0,0,1536,2048,90,"See")
    SSWV B 4 A_SetAngle(15+angle)
    SSWV A 0 A_SpawnItemEx ("MarineStep", 0, 0, 0, 0, 0, -20, 0,0, 0) 
    SSWV C 0 A_LookEx(0,0,1536,2048,90,"See")
    SSWV C 4 A_SetAngle(15+angle)
    SSWV D 0 A_LookEx(0,0,1536,2048,90,"See")
    SSWV D 4 A_SetAngle(15+angle)
    Goto Spawn
  GiveUp:
    SSWV B 0 A_PlaySoundEx("wolfss/arf","Body")
    SSWV B 0 A_TakeInventory("NaziMeter",999)
    SSWV B 6 A_ClearTarget
    Goto Spawn
  Melee:
  Missile:
    SSWV A 0 A_TakeInventory("NaziMeter",999)
    SSWV A 0 A_Jump(128,2)
    SSWV A 0 A_PlaySoundEx("wolfss/halt","Voice")
    SSWV EF 5 A_FaceTarget
    SSWV D 0 A_AlertMonsters
    SSWV G 2 bright A_CustomBulletAttack (10,4,1,6,BulletPuff,0,0)
    SSWV F 0 A_Jump(48,"Clunk")
    SSWV F 2 A_FaceTarget
    SSWV D 0 A_AlertMonsters
    SSWV G 2 bright A_CustomBulletAttack (10,4,1,6,BulletPuff,0,0)
    SSWV A 0 A_Jump(9,"See")
    SSWV A 0 A_Jump(14,"Strafe")
    SSWV F 0 A_Jump(48,"Clunk")
    SSWV F 2 A_FaceTarget
    SSWV F 0 A_CPosRefire
    goto Missile+5
  Clunk:
    SSWV F 1 A_FaceTarget
    Goto Missile+5
  Strafe:
    SSWV A 0 A_ChangeFlag(NODROPOFF,1)
    SSWV AA 0 A_Chase("Missile",0,CHF_FASTCHASE)
    SSWV A 0 A_SpawnItemEx ("MarineStep", 0, 0, 0, 0, 0, -20, 0,0, 0) 
    SSWV AB 2 A_FaceTarget
    SSWV A 0 A_SpawnItemEx ("MarineStep", 0, 0, 0, 0, 0, -20, 0,0, 0) 
    SSWV EF 2 A_FaceTarget
    SSWV A 0 A_ChangeFlag(NODROPOFF,0)
    Goto Missile+5
  Pain:
    SSWV H 2
    SSWV H 2 A_Pain
    SSWV A 0 A_Jump(64,"Missile","Strafe")
    Goto See+1
  Death:
    SSWV I 4
    SSWV J 4 A_Scream
    SSWV K 4 A_NoBlocking
    SSWV L 4
    SSWV M -1
    stop
  XDeath:
    SSWV N 4
    SSWV O 4 A_XScream
    SSWV P 4 A_NoBlocking
    SSWV QRSTU 4
    SSWV V -1
    stop
  /*Heal:
    SSWV D 0 A_PlaySoundEx("wolfss/revive","Body")
    SSWV B 20
    SSWV D 0 A_AlertMonsters
    SSWV D 10
    Goto See*/
  Raise:
    SSWV M 5 A_ChangeFlag("FRIGHTENED",0)
    SSWV MLKJI 5
    Goto See
  }
}

ACTOR NaziMeter : Inventory
{
     Inventory.Amount 1
     Inventory.MaxAmount 99
}
