ACTOR HitlerWS : QCDE_MonsterBoss 
{ Tag "Adolf Hitler"

  Health 1800
  Radius 28
  Height 60
  Mass 2000
  Speed 16
  PainChance 56
  Monster
  +NOBLOOD
  -BLOODSPLATTER
  +BOSS
  +DONTMORPH
  +NORADIUSDMG
  +NOTARGET
  +FLOORCLIP
  +DONTGIB
  +BOSSDEATH
  +DONTHURTSPECIES
  +THRUSPECIES
  Species "Nazi"
  DropItem "BigHourGlass"
  DeathSound "Hitler/Death1"
  SeeSound "Hitler/Active"
  Obituary "%o was killed by Adolf Hitler."
  States
  {
  Idle:
    MHTL A 0 A_JumpIfHealthLower(900, "Idle2")
    MHTL A 10 A_Look
    Loop
  Idle2:
    HTLR A 10 A_Look
    Loop
  See:
    MHTL A 0 A_JumpIfInventory("MechSuitActive", 1, "See1")
//  MHTL A 0 A_PlaySoundEx("Hitler/Active", "body")
    MHTL A 0 A_GiveInventory("MechSuitActive" ,1)
	TNT1 A 0 A_SetInvulnerable
    MHTL A 32
    MHTL A 32
	TNT1 A 0 A_UnSetInvulnerable
  See1:
    MHTL A 0 A_JumpIfHealthLower(900, "See2") 
    MHTL A 0 A_JumpIfInventory("MechSuitDeathItem", 1, "See4") 
  See3:
    MHTL A 7 A_Chase
    MHTL B 0 A_PlaySoundEx("Hitler/Step", "body")
    MHTL B 7 A_Chase
    MHTL C 7 A_Chase
    MHTL D 0 A_PlaySoundEx("Hitler/Step", "body")
    MHTL D 7 A_Chase
    Loop
  See2: 
    MHTL A 0 A_JumpIfInventory("MechSuitDeathItem", 1, "See4")
    Goto Pain
  See4: 
    HTLR AB 6 A_Chase
    HTLR CD 6 A_Chase
    Loop
  Pain: 
    MHTL A 0 A_JumpIfHealthLower(900, "Hitler")
    MHTL A 0 A_Jump (160, "See")
    MHTL A 0 A_CustomMissile("Fragment10", 56, 0, (random(-30,-60)))
    MHTL A 0 A_CustomMissile("Fragment10", 48, 0, (random(0,30)))
    MHTL A 0 A_CustomMissile("Fragment10", 56, 0, (random(30,60)))
    MHTL A 0 A_CustomMissile("Fragment10", 48, 0, (random(-30,-60)))
    MHTL A 0 A_CustomMissile("Fragment10", 32, 0, (random(30,60)))
    MHTL A 0 A_CustomMissile("Fragment10", 48, 0, (random(-30,-60)))
    MHTL A 0 A_CustomMissile("Fragment10", 32, 0, (random(60,90)))
    MHTL A 0 A_CustomMissile("Fragment10", 48, 0, (random(-60,-90)))
    MHTL A 0 A_CustomMissile("Fragment10", 32, 0, (random(90,120)))
    MHTL A 0 A_CustomMissile("Fragment10", 48, 0, (random(-90,-120)))
    MHTL A 0 A_CustomMissile("Fragment10", 56, 0, (random(120,150)))
    MHTL A 0 A_CustomMissile("Fragment10", 48, 0, (random(-120,-150)))
    MHTL A 0 A_CustomMissile("Fragment10", 56, 0, (random(150,180)))
    MHTL A 1
	Goto See
  Hitler: 
    MHTL H 0 A_JumpIfInventory("MechSuitDeathItem", 1, "Pain3") 
    MHTL H 7 A_SetInvulnerable
    MHTL I 7 A_PlaySoundEx("Hitler/Shout", "body")
    MHTL J 7
    MHTL J 0 A_GiveInventory("MechSuitDeathItem" ,1)
    MHTL J 0 A_SpawnItem("DeadMechSuit")
    MHTL J 0 A_UnSetInvulnerable
	TNT1 A 0 A_ChangeFlag("NOBLOOD",0)
	TNT1 A 0 A_ChangeFlag("BLOODSPLATTER",1)
    Goto See4
  Pain3: 
    HTLR H 4 A_PlaySoundEx("Hitler/pain", "Body")
    Goto See4
  Missile:
    MHTL E 0 A_JumpIfHealthLower(900, "Missile2") 
    Goto MechSuitAttack                           
  Missile2: 
    HTLR E 0 A_JumpIfInventory("MechSuitDeathItem", 1, "HitlerAttack")
    Goto Hitler
  MechSuitAttack: 
    MHTL E 0 A_UnSetInvulnerable
    MHTL E 7 A_FaceTarget
    MHTL F 0 A_PlaySoundEx("Hitler/Attack", "Body")
	MHTL F 0 A_CustomMissile("WolfEnemyBulletD3")
    MHTL F 4 BRIGHT A_CustomMissile("WolfEnemyBulletD3")
    MHTL G 0 A_PlaySoundEx("Hitler/Attack", "Body")
	MHTL G 0 A_CustomMissile("WolfEnemyBulletD3")
    MHTL G 4 BRIGHT A_CustomMissile("WolfEnemyBulletD3")
    MHTL F 0 A_PlaySoundEx("Hitler/Attack", "Body")
	MHTL F 0 A_CustomMissile("WolfEnemyBulletD3")
    MHTL F 4 BRIGHT A_CustomMissile("WolfEnemyBulletD3")
    MHTL G 0 A_PlaySoundEx("Hitler/Attack", "Body")
	MHTL G 0 A_CustomMissile("WolfEnemyBulletD3")
    MHTL G 4 BRIGHT A_CPosAttack
    MHTL F 0 A_PlaySoundEx("Hitler/Attack", "Body")
	MHTL F 0 A_CustomMissile("WolfEnemyBulletD3")
    MHTL F 4 BRIGHT A_CustomMissile("WolfEnemyBulletD3")
    Goto See1
  HitlerAttack: 
    HTLR E 7 A_FaceTarget
    HTLR F 0 A_PlaySoundEx("Hitler/Attack", "Body")
	HTLR F 0 A_CustomMissile("WolfEnemyBulletD4")
    HTLR F 4 BRIGHT A_CustomMissile("WolfEnemyBulletD4")
    HTLR G 0 A_PlaySoundEx("Hitler/Attack", "Body")
	HTLR G 0 A_CustomMissile("WolfEnemyBulletD4")
    HTLR G 4 BRIGHT A_CustomMissile("WolfEnemyBulletD4")
    HTLR F 0 A_PlaySoundEx("Hitler/Attack", "Body")
	HTLR F 0 A_CustomMissile("WolfEnemyBulletD4")
    HTLR F 4 BRIGHT A_CPosAttack
    HTLR G 0 A_PlaySoundEx("Hitler/Attack", "Body")
	HTLR G 0 A_CustomMissile("WolfEnemyBulletD4")
    HTLR G 4 BRIGHT A_CustomMissile("WolfEnemyBulletD4")
    HTLR F 0 A_PlaySoundEx("Hitler/Attack", "Body")
	HTLR F 0 A_CustomMissile("WolfEnemyBulletD4")
    HTLR F 4 BRIGHT A_CustomMissile("WolfEnemyBulletD4")
    Goto See4
  XDeathChecksDone:
  DeathChecksDone:
    HTLR A 32
    TNT1 A 0 A_PlaySoundEx("Hitler/Death1", "Body")
    HTLR A 64
    HTLR I 1
	TNT1 A 0 A_PlaySound("quake2/Misc/GibExplosion")
	TNT1 A 0 A_SpawnItemEx("GibDropperMediumBig",0,0,64,0,0,0,0,SXF_NOCHECKPOSITION|SXF_USEBLOODCOLOR)
    HTLR J 6 A_PlaySoundEx("Hitler/Death2", "Body")
    HTLR K 6 
    HTLR L 6 
    HTLR M 6
    HTLR N 6 A_NoBlocking
    HTLR O 6
  Death.Corpse:
    HTLR P -1 A_BossDeath
    Stop
  }
}

ACTOR DeadMechSuit
{
  Radius 8
  Height 12
  +NOBLOCKMAP
  +NOGRAVITY
  +NOTELEPORT
  +CANNOTPUSH
  States
  {
  Spawn:
    MHTL K -1
    Stop
  }
}

actor MechSuitDeathItem : ammo
{          
  inventory.pickupmessage ""
  inventory.pickupsound ""
  inventory.amount 0
  inventory.maxamount 1
  states
  {
  Spawn:
    TNT1 A -1
    stop
  }
}

actor MechSuitActive : ammo
{          
  inventory.pickupmessage ""
  inventory.pickupsound ""
  inventory.amount 0
  inventory.maxamount 1
  states
  {
  Spawn:
    TNT1 A -1
    stop
  }
}

ACTOR Fragment10
{
  Radius 4
  Height 8
  Speed 1
  Projectile
  -NoGravity
  +LowGravity
  +DoomBounce
  Damage 1
  Scale 0.75
  +ClientSideOnly
  States
  {
  Spawn:
    MET7 ABCDABCDABCDABCDABCDABCDABCDABCD 4
  Death:
    MET7 AA -1 A_Gravity
    Stop
  }
}