actor SuicideBomber
{
  obituary "%o was killed by a crazy suicide bomber."
  health 200
  radius 20
  height 56
  mass 150
  speed 15
  painchance 20
  DropItem "PortableMedkit" 120
  DropItem "ArmorPlate" 120
  DropItem "AmmoPack" 80
  DropItem "Missile" 256 5
  DropItem "HandGrenadeAmmo" 200 1
  DropItem "MineAmmo" 100 1
  seesound "suicide/sit"
  attacksound "shotguy/death"
  painsound "shotguy/pain"
  deathsound "shotguy/death"
  MONSTER
  +FLOORCLIP
  +MissileMore
  states
  {
  Spawn:
    ZBMB A 10 A_Look
	ZBMI A 10 A_Look
    Loop
  See:
    ZBMB AAABBBCCCDDD 2 A_Chase
    ZBMB A 0 A_PlaySound("suicide/loop")
    Loop
  Missile:
    ZBMB A 1 A_PlayWeaponSound("suicide/run")
    ZBMB AAAA 5 A_FaceTarget
	ZBMB A 1 A_Jump(256,2)
	ZBMB A 0 A_JumpIf(velx != 0 || vely != 0,1)
	Goto ChargeStop
	ZBMB A 0 A_CposRefire
	ZCHW D 0 A_PlayWeaponSound("suicide/loop")
	ZBMB A 0 A_FaceTarget
	ZBMB A 0 A_GiveInventory("SuicideJumping",1)
    ZBMB A 0 A_Recoil(-11)
    ZBMB ABCD 1 A_JumpIfCloser(90,"Melee")
	ZBMB A 0 A_FaceTarget
	ZBMB A 0 A_Recoil(-11)
    ZBMB ABCD 1 A_JumpIfCloser(90,"Melee")
	ZBMB A 0 A_FaceTarget
	ZBMB A 0 A_Recoil(-11)
    ZBMB ABCD 1 A_JumpIfCloser(90,"Melee")
	ZBMB A 0 A_FaceTarget
	ZBMB A 0 A_Recoil(-11)
	ZBMB A 0 A_JumpIf(z - floorz >= 64,"ChargeStop")
    ZBMB ABCD 1 A_JumpIfCloser(90,"Melee")
    Goto Missile+6
  ChargeStop:
    ZBMB A 1 A_Stop
    Goto See		
  Melee:
    ZBMB A 2 A_Die
    Stop
  Pain:
    ZBMB A 3
    ZBMB A 3 A_Pain
    Goto See
  Death:
    TNT1 A 0
    TNT1 A 0 A_CustomMissile("SuicideBomb",24,0,0,CMF_AIMDIRECTION)
    TNT1 A 0 A_SpawnItemEx("OrangeParticleSpawner",0,0,24,0,0,0,0,128) 
    TNT1 AAA 0 A_CustomMissile("Kaboom3",24,0,random(0,360),2,random(0,360))
	TNT1 AAA 0 A_CustomMissile("SmokeFX2",24,0,random(0,360),2,random(0,360))
    TNT1 AAAA 0 A_SpawnItemEx("Debris",0,0,24,Random(4,-4),Random(4,-4),Random(4,8),0,128)
    TNT1 A 0 A_SpawnItem("RocketEx",0,24)
	TNT1 A 0 A_Stop
    ZBMB M 5 Bright A_PlaySound("weapons/rocklx")
    ZBMB N 5 Bright A_XScream
    ZBMB O 5 A_NoBlocking
    ZBMB PQRST 5
    ZBMB U -1
    Stop
  Raise:
  	TNT1 A 0
	TNT1 A 0 A_SpawnItemEx("VileHealEffect",0,0,0,0,0,0,0,SXF_NOCHECKPOSITION)
    ZBMB TSRQPONM 3
	Goto See	
  }
}

Actor SuicideJumping : CustomInventory
{
  +INVENTORY.QUIET
  +INVENTORY.UNDROPPABLE
  +INVENTORY.ALWAYSPICKUP
  +INVENTORY.AUTOACTIVATE       
  Inventory.Amount 1
  Inventory.MaxAmount 0
  States
  {
  Pickup:
    NULL A 1 
    NULL A 1 A_CheckFloor(1)
    Stop
	NULL A 1 A_Jump(160,2)
	NULL A 1 ThrustThingZ(0,25,0,1)
    Stop
	NULL A 1
    Stop
  }
}

Actor SuicideBomb
{
Projectile
Speed 0
Damage 0
+NOCLIP
States
{
  Spawn:
	TNT1 A 0 
	TNT1 A 0 A_Explode(104,164)
    Stop
  }
}