ACTOR DuneWarrior : SSTZombieMan 30040
{
//$Category Monsters
  Obituary "%o was killed by a dune warrior."
  Health 350//400
  gibhealth -20
  Radius 20
  Height 56
  Mass 200
  Speed 14
  PainChance 8
  SeeSound "dune/sight"
  AttackSound ""
  PainSound "dune/pain"
  DeathSound "dune/death"
  Decal "BulletChip"
  DropItem "Clip" 128
  DropItem "Shell" 128
  DropItem "RocketAmmo" 128
  species "dunewarrior"
  Monster
  +FloorClip
  +MISSILEMORE
  +MISSILEEVENMORE
  +GHOST
  //+noinfightspecies
  +DONTHURTSPECIES
  +noinfighting
  +notarget
  +nodropoff
  meleerange 256
damagefactor "RedPaint", 0.3
damagefactor "OrangePaint", 0.3
damagefactor "YellowPaint", 0.3
damagefactor "GreenPaint", 0.3
damagefactor "BluePaint", 0.3
damagefactor "PurplePaint", 0.3
damagefactor "WhitePaint", 0.3
damagefactor "BlackPaint", 0.3
  PainChance "ShotgunWeak", 4
  States
  {
    Crush:
	TNT1 A 0 A_SpawnItemEx ("Gibs", 0,0,0, 0,0,0, 0, SXF_NOCHECKPOSITION|SXF_USEBLOODCOLOR|SXF_CLIENTSIDE)
	TNT1 AAAAAAAA 0 A_SpawnItemEx ("SuperDuperClientsideBloodSpotSpawner", 0,0,0, 0,0,0, 0, SXF_NOCHECKPOSITION|SXF_USEBLOODCOLOR|SXF_CLIENTSIDE)
    TNT1 AAAAAAAA 1 A_SpawnItemEx ("Bloodsquirt3", 0,0,0, 0,0,0, random(-180,180), SXF_USEBLOODCOLOR|SXF_CLIENTSIDE|SXF_NOCHECKPOSITION)
    TNT1 A -1
    Stop
  Spawn:
    ZHRT AB 10 A_Look
    Loop
  See:
    ZHRT AABBCCDD 3 A_Chase
    Loop
  Dash:
    ZHRT A 0 A_Chase("Melee","")
    ZHRT A 2 A_FaceTarget
    ZHRT A 0 A_Chase("Melee","")
    ZHRT A 2 A_FaceTarget
    ZHRT A 0 A_Chase("Melee","")
    ZHRT B 2 A_FaceTarget
    ZHRT A 0 A_Chase("Melee","")
    ZHRT B 2 A_FaceTarget
    ZHRT A 0 A_Chase("Melee","")
    ZHRT C 2 A_FaceTarget
    ZHRT A 0 A_Chase("Melee","")
    ZHRT C 2 A_FaceTarget
    ZHRT A 0 A_Chase("Melee","")
    ZHRT D 2 A_FaceTarget
    ZHRT A 0 A_Chase("Melee","")
    ZHRT D 2 A_FaceTarget
	
    ZHRT A 0 A_Chase("Melee","")
    ZHRT A 2 A_FaceTarget
    ZHRT A 0 A_Chase("Melee","")
    ZHRT A 2 A_FaceTarget
    ZHRT A 0 A_Chase("Melee","")
    ZHRT B 2 A_FaceTarget
    ZHRT A 0 A_Chase("Melee","")
    ZHRT B 2 A_FaceTarget
    ZHRT A 0 A_Chase("Melee","")
    ZHRT C 2 A_FaceTarget
    ZHRT A 0 A_Chase("Melee","")
    ZHRT C 2 A_FaceTarget
    ZHRT A 0 A_Chase("Melee","")
    ZHRT D 2 A_FaceTarget
    ZHRT A 0 A_Chase("Melee","")
    ZHRT D 2 A_FaceTarget
    Goto See
  Missile:
    ZHRT E 0 A_Jump(32, "Dash")
    ZHRT E 0 A_Jump(16, "Shotty")
    ZHRT E 0 A_Jump(96, "FireRockets")
	Goto Dash
  Melee:
    ZHRT E 0 A_Jump(128, "Shotty")
    ZHRT E 0 A_Jump(80, "Vanish")
  FireGrenade:
    ZHRT E 10 A_FaceTarget
    ZHRT F 10 A_CustomMissile("DuneWarriorGrenade", 32, 0, random(-16, 16))
    ZHRT E 10
    Goto See
  Shotty:
    ZHRT E 10 A_FaceTarget
  Slammy:
    SPOS E 0 bright A_PlaySound("weapons/slamfire")
    NULL A 0 A_SpawnItemEx ("ShotgunEcho", 0,0,0, 0,0,0, 0, 160)
    SPOS FF 0 bright A_CustomMissile ("TracerShotGun", 32, 0, random(-70,70)*0.1, CMF_OFFSETPITCH, random(-2,2))
    SPOS FFF 0 bright A_CustomMissile ("TracerShotGun", 32, 0, random(-60,60)*0.1, CMF_OFFSETPITCH, random(-2,2))
    SPOS F 0 bright A_CustomMissile ("TracerShotGun", 32, 0, random(-45,45)*0.1, CMF_OFFSETPITCH, random(-2,2))
    POSS F 0 bright A_CustomMissile ("ShellCasingSpawner", 32, 0, 0, 0, 0)
    ZHRT F 3 Bright //A_CPosAttack
    ZHRT E 2 //A_CPosAttack
    ZHRT B 10 A_FaceTarget
    ZHRT E 3 A_FaceTarget
	ZHRT F 0 A_Jump(32,"See")
	ZHRT F 0 A_CPosRefire
	Loop
  FireRockets:
    ZHRT E 12 A_FaceTarget
    ZHRT F 8 BRIGHT A_CustomMissile("SSTRocket2Red", 32, 0, random(-8, 8))
    ZHRT E 10 A_FaceTarget
    Goto See
  Vanish:
    ZHRT A 0 A_SetInvulnerable
    ZHRT A 0 A_UnSetShootable
    ZHRT A 0 A_UnSetSolid
    ZHRT A 0 A_PlaySound("dune/active")
    TFOG A 0 A_SpawnItemEx ("TeleportFogSpawner", 0, 0, random(0,3), 0, 0, random(2,3), 0, 160) 
    ZHRT A 1 A_SetTranslucent(0.8)
    ZHRT A 1 A_SetTranslucent(0.6)
    ZHRT A 1 A_SetTranslucent(0.4)
    ZHRT A 1 A_SetTranslucent(0.3)
    ZHRT A 1 A_SetTranslucent(0)
    ZHRT AABBCCDDAABBCCDDAABBCCDDAABBCCDD 4 A_Chase("", "")
    ZHRT A 0 A_PlaySound("dune/active")
    TFOG A 0 A_SpawnItemEx ("TeleportFogSpawner", 0, 0, random(0,3), 0, 0, random(2,3), 0, 160) 
    ZHRT C 1 A_SetTranslucent(0.2)
    ZHRT C 1 A_SetTranslucent(0.4)
    ZHRT D 1 A_SetTranslucent(0.6)
    ZHRT D 1 A_SetTranslucent(0.8)
    ZHRT D 1 A_SetTranslucent(1.0)
    ZHRT A 0 A_UnsetInvulnerable
    ZHRT A 0 A_SetShootable
    ZHRT A 0 A_SetSolid
    Goto See
  Pain.Fire:
  	TNT1 AAAA 0 A_SpawnItemEx("imonfire", random(-8,-2),Random(-8,8),random(20, 38), 0, random(-30,30)*0.1, random(10,30)*0.1, 0, 160)
	Goto Pain
  Pain:
    ZHRT G 1
    ZHRT G 2 A_Pain
    ZHRT G 0 A_Jump(128, "Vanish")
    Goto See
  Death.Fire:
	TNT1 A 0 A_Stop
    TNT1 A 0 ACS_ExecuteAlways(926,0, 10,0,0)
	NULL O 0 A_SpawnItemEx ("BurnDeathFX", 0,0,0, momx,momy,momz, 0, SXF_NOCHECKPOSITION|SXF_CLIENTSIDE|SXF_ABSOLUTEMOMENTUM)
	Goto Death
  Death.Plasma:
	TNT1 A 0 A_Stop
    TNT1 A 0 ACS_ExecuteAlways(926,0, 10,0,0)
	NULL O 0 A_SpawnItemEx ("PlasmaDeathFX", 0,0,0, momx,momy,momz, 0, SXF_NOCHECKPOSITION|SXF_CLIENTSIDE|SXF_ABSOLUTEMOMENTUM)
    TROO H 0 A_JumpIfHealthLower(-30,"XDeath")
	goto Death
	
  Death.Chainsaw:
	ZHRT HHHH 0 A_DropItem("SSTHealthBonus",1,127)
  Death.Shotgun:
  Death.Rocket:
  Death:
    ZHRT H 0 A_SetTranslucent(1.0)
    ZHRT H 5
    ZHRT I 5 A_Scream
    ZHRT J 5 A_NoBlocking
    ZHRT K 5
    ZHRT L -1
    Stop
  xDeath.Shotgun:
  xDeath.Rocket:
  XDeath:
    POSS M 0 A_NoBlocking//1
    POSS M 0 A_Facetarget
	NULL O 0 A_SpawnItemEx ("ZombiemanBloodFXSpawner", 0,0,0, momx,momy,momz, 0, SXF_NOCHECKPOSITION|SXF_CLIENTSIDE|SXF_TRANSFERTRANSLATION|SXF_ABSOLUTEMOMENTUM)

    NULL A 0 A_SpawnDebris ("BloodSpotSilent")
    NULL OPQ 2 A_SpawnItemEx ("BloodFXSpawner", 0,0,random(0,40), 0,0,0, 0, 160) 
	Stop
  Raise:
    ZHRT KJIH 5
    Goto See

  Pain.GreenPaint:
    TNT1 A 0 ACS_ExecuteAlways(926,0, 0,0,0)
	Goto Pain
  Pain.BluePaint:
    TNT1 A 0 ACS_ExecuteAlways(926,0, 1,0,0)
	Goto Pain
  Pain.RedPaint:
    TNT1 A 0 ACS_ExecuteAlways(926,0, 2,0,0)
	Goto Pain
  Pain.OrangePaint:
    TNT1 A 0 ACS_ExecuteAlways(926,0, 3,0,0)
	Goto Pain
  Pain.PurplePaint:
    TNT1 A 0 ACS_ExecuteAlways(926,0, 4,0,0)
	Goto Pain
  Pain.WhitePaint:
    TNT1 A 0 ACS_ExecuteAlways(926,0, 5,0,0)
	Goto Pain
  Pain.YellowPaint:
    TNT1 A 0 ACS_ExecuteAlways(926,0, 6,0,0)
	Goto Pain
  Pain.BlackPaint:
    TNT1 A 0 ACS_ExecuteAlways(926,0, 7,0,0)
	Goto Pain
  }
}

ACTOR DuneWarriorGrenade
{
  Radius 6
  Height 8
  Speed 20
  SeeSound "dune/bounce"
  DeathSound "catharsi/shotdth"
  Projectile
  BounceType "Doom"
  +Randomize
  -NoGravity
  +THRUGHOST
  States
  {
  Spawn:
    THR2 A 4 A_PlaySound("catharsi/thermtick")
    THR2 B 16
    THR2 A 4 A_PlaySound("catharsi/thermtick")
    THR2 B 16
    THR2 A 4 A_PlaySound("catharsi/thermtick")
    THR2 B 16
    THR2 A 4 A_PlaySound("catharsi/thermtick")
    THR2 B 16
    THR2 A 4 A_PlaySound("catharsi/thermtick")
    THR2 B 16
    SDFB B 0 A_CustomMissile("DuneWarriorBall", 4, 2, 0)
    SDFB B 0 A_CustomMissile("DuneWarriorBall", 4, 2, 20)
    SDFB B 0 A_CustomMissile("DuneWarriorBall", 4, 2, 40)
    SDFB B 0 A_CustomMissile("DuneWarriorBall", 4, 2, 60)
    SDFB B 0 A_CustomMissile("DuneWarriorBall", 4, 2, 80)
    SDFB B 0 A_CustomMissile("DuneWarriorBall", 4, 2, 100)
    SDFB B 0 A_CustomMissile("DuneWarriorBall", 4, 2, 120)
    SDFB B 0 A_CustomMissile("DuneWarriorBall", 4, 2, 140)
    SDFB B 0 A_CustomMissile("DuneWarriorBall", 4, 2, 160)
    SDFB B 0 A_CustomMissile("DuneWarriorBall", 4, 2, 180)
    SDFB B 0 A_CustomMissile("DuneWarriorBall", 4, 2, 200)
    SDFB B 0 A_CustomMissile("DuneWarriorBall", 4, 2, 220)
    SDFB B 0 A_CustomMissile("DuneWarriorBall", 4, 2, 240)
    SDFB B 0 A_CustomMissile("DuneWarriorBall", 4, 2, 260)
    SDFB B 0 A_CustomMissile("DuneWarriorBall", 4, 2, 280)
    SDFB B 0 A_CustomMissile("DuneWarriorBall", 4, 2, 300)
    SDFB B 0 A_CustomMissile("DuneWarriorBall", 4, 2, 320)
    SDFB B 0 A_CustomMissile("DuneWarriorBall", 4, 2, 340)
    SDFB BCDE 6 Bright A_Die
    Loop
  Death:
    SDFB B 0 A_CustomMissile("DuneWarriorBall", 4, 2, 0)
    SDFB B 0 A_CustomMissile("DuneWarriorBall", 4, 2, 20)
    SDFB B 0 A_CustomMissile("DuneWarriorBall", 4, 2, 40)
    SDFB B 0 A_CustomMissile("DuneWarriorBall", 4, 2, 60)
    SDFB B 0 A_CustomMissile("DuneWarriorBall", 4, 2, 80)
    SDFB B 0 A_CustomMissile("DuneWarriorBall", 4, 2, 100)
    SDFB B 0 A_CustomMissile("DuneWarriorBall", 4, 2, 120)
    SDFB B 0 A_CustomMissile("DuneWarriorBall", 4, 2, 140)
    SDFB B 0 A_CustomMissile("DuneWarriorBall", 4, 2, 160)
    SDFB B 0 A_CustomMissile("DuneWarriorBall", 4, 2, 180)
    SDFB B 0 A_CustomMissile("DuneWarriorBall", 4, 2, 200)
    SDFB B 0 A_CustomMissile("DuneWarriorBall", 4, 2, 220)
    SDFB B 0 A_CustomMissile("DuneWarriorBall", 4, 2, 240)
    SDFB B 0 A_CustomMissile("DuneWarriorBall", 4, 2, 260)
    SDFB B 0 A_CustomMissile("DuneWarriorBall", 4, 2, 280)
    SDFB B 0 A_CustomMissile("DuneWarriorBall", 4, 2, 300)
    SDFB B 0 A_CustomMissile("DuneWarriorBall", 4, 2, 320)
    SDFB B 0 A_CustomMissile("DuneWarriorBall", 4, 2, 340)
    SDFB BCDE 6 Bright
    Stop
  }
}

ACTOR DuneWarriorBall
{
  Radius 6
  Height 8
  Speed 15
  Damage 3
  RenderStyle "Add"
  SeeSound "catharsi/shotsit"
  DeathSound "catharsi/shotdth"
  Projectile
  +Randomize
  +THRUGHOST
  +rockettrail
  Decal "PlasmaScorchLower"
  States
  {
  Spawn:
    SDFB A 4 Bright
    Loop
  Death:
    SDFB BCDE 6 Bright
    Stop
  }
}