ACTOR PhaseShotgunCommando 22452
{
	Health 260
	Radius 20
	Height 56
	Speed 6
	Mass 100
	PainChance 43
	BloodColor "cf 00 b0"
	Species "EliteZombies"
	DropItem "NewShell" 255 4
	DropItem "NewShellBox", 128
	DropItem "HealthFlask" 55
	DropItem "ArmorCharge" 55
	DropItem "AmmoPack" 40
	DropItem "HandGrenadeAmmo" 100 1
	DropItem "MineAmmo" 50 1
	DropItem "PortableMedkit" 190
    DropItem "ArmorPlate" 190
    DropItem "BackPack" 56
	DropItem "PhaseSphere" 20 1
	DropItem "MarineBeacon" 40 1
	MONSTER 
	+FLOORCLIP
	+MISSILEMORE
	+QUICKTORETALIATE
	AttackSound "weapons/12gaugefire"
	SeeSound "superzombie/sight"
	PainSound "superzombie/pain"
	DeathSound "superzombie/death"
	ActiveSound "superzombie/active"
	Obituary "%o was shredded by a sneaky Phase Shotgun Commando."
	Tag "$NEPhShotg"
	var int user_attack;
	var int user_lowlag;
	states
	{
  Spawn:
	PSGC A 0 NoDelay ACS_NamedExecuteAlways("ModifyMonster",0,1)
	Goto Idle
  Idle:
    PSGC A 10 A_Look
	PSGC Z 10 A_Look
    Loop
   See:
	TNT1 A 0 A_JumpIf(user_lowlag == 1,"MoreSee")
	TNT1 A 0 A_JumpIfTargetInLOS("MoreSee",0,0,0,0)
	PSGC ABCD 2 A_Chase
	Loop
  MoreSee:
	TNT1 A 0 A_SetUserVar("user_lowlag",1)
    PSGC AABB 3 A_Chase
    TNT1 A 0 A_SpawnItem("FootStep",0,0,0,0)
    PSGC CCDD 3 A_Chase
    TNT1 A 0 A_SpawnItem("FootStep",0,0,0,0)
	TNT1 A 0 A_Jump(46,"Phase")
    Loop
  Chase:
	PSGC AA 1 A_FastChase
	PSGC A 0 A_JumpIfCloser(130,"Dodge")
	PSGC AA 1 A_Chase
	PSGC A 0 A_JumpIfCloser(130,"Dodge")
	PSGC BB 1 A_Chase
	PSGC A 0 A_JumpIfCloser(130,"Dodge")
	PSGC BB 1 A_Chase
	TNT1 A 0 A_SpawnItemEx("FootStep",0,0,2,0,0,-20)
	PSGC A 0 A_JumpIfCloser(150,"Dodge")
	PSGC CC 1 A_Chase
	PSGC A 0 A_JumpIfCloser(150,"Dodge")
	PSGC CC 1 A_FastChase
	PSGC A 0 A_JumpIfCloser(130,"Dodge")
	PSGC DD 1 A_FastChase
	PSGC A 0 A_JumpIfCloser(130,"Dodge")
	PSGC DD 1 A_Chase
	TNT1 A 0 A_SpawnItemEx("FootStep",0,0,2,0,0,-20)
	PSGC A 0 A_Jump(64,"Dodge")
	TNT1 A 0 A_Jump(46,"Phase")
	Loop
  Strafing:
	PSGC A 0 A_SpawnItem("FootStep",0,0,0,0)
	TNT1 A 0 A_Chase("","Missile",CHF_DONTMOVE)
	PSGC AABB 3 A_GiveInventory("CommandoStrafing",1)
	PSGC C 0 A_SpawnItem("FootStep",0,0,0,0)
	TNT1 A 0 A_Chase("","Missile",CHF_DONTMOVE)
    PSGC CCDD 3 A_GiveInventory("CommandoStrafing",1)
	TNT1 A 0 A_Jump(46,"Phase")
	Goto See	
  SeeNoDodge:
	PSGC AABB 2 A_Chase
	TNT1 A 0 A_SpawnItemEx("FootStep",0,0,2,0,0,-20)
	PSGC CCDD 2 A_Chase
	TNT1 A 0 A_SpawnItemEx("FootStep",0,0,2,0,0,-20)
	PSGC AABB 2 A_Chase
	TNT1 A 0 A_SpawnItemEx("FootStep",0,0,2,0,0,-20)
	PSGC CCDD 2 A_Chase
	TNT1 A 0 A_SpawnItemEx("FootStep",0,0,2,0,0,-20)
	PSGC AABB 2 A_Chase
	TNT1 A 0 A_SpawnItemEx("FootStep",0,0,2,0,0,-20)
	PSGC CCDD 2 A_Chase
	TNT1 A 0 A_SpawnItemEx("FootStep",0,0,2,0,0,-20)
	TNT1 A 0 A_Jump(46,"Phase")
	Goto Chase
  Dodge:
	PSGC A 1 A_FaceTarget
	PSGC E 0 ThrustThingZ(0, 20, 0, 0)
	PSGC A 0 A_Jump(256, "DodgeRight", "DodgeLeft")
	TNT1 A 0 A_Jump(46,"Phase")
  DodgeLeft:
	PSGC E 0 ThrustThing(angle*256/360+192, 15, 0, 0)
	TNT1 A 0 A_Jump(46,"Phase")
	Goto SeeNoDodge
  DodgeRight:
	PSGC E 0 ThrustThing(angle*256/360+64, 15, 0, 0)
	TNT1 A 0 A_Jump(46,"Phase")
	Goto SeeNoDodge
  Missile:
	TNT1 A 0
	TNT1 A 0 A_SetUserVar("user_attack",1)
	TNT1 A 0 A_PlaySound("HeavyChaingun/Sart",CHAN_WEAPON,1.0,0)
	PSGC EEEEEEEEEE 1 A_FaceTarget(45)
	TNT1 A 0 A_Jump(98,"Refire2")
  Refire:
	TNT1 A 0 A_SetUserVar("user_attack",1)
	TNT1 A 0 A_SetTranslucent(1)
	TNT1 A 0 A_PlaySound("HeavyChaingun/Loop",CHAN_WEAPON,1.0,1)
	TNT1 AAAA 0 A_CustomMissile("MonsterTracer2",random(28,34),0,random(-6,6),CMF_OFFSETPITCH,frandom(-3.0,3.0))
	TNT1 A 0 A_SpawnItemEx("ShellCasing",12,-6,36,random(2,6),0,random(1,3),random(-80,-90),SXF_NOCHECKPOSITION|SXF_CLIENTSIDE)
	TNT1 A 0 A_PlaySound("weapons/12gaugefire",6)
	TNT1 A 0 Bright A_CustomBulletAttack(22.5,18.3,4,random(1,5)*3,"ZBulletPuff",2048,CBAF_NOrandom)
	PSGC E 4 Bright A_CustomBulletAttack(0,0,1,random(1,5)*3,"ZBulletPuff",2048,CBAF_NOrandom)
	TNT1 A 0 A_FaceTarget
	TNT1 AAAA 0 A_CustomMissile("MonsterTracer2",random(28,34),0,random(-6,6),CMF_OFFSETPITCH,frandom(-3.0,3.0))
	TNT1 A 0 A_SpawnItemEx("ShellCasing",12,-6,36,random(2,6),0,random(1,3),random(-80,-90),SXF_NOCHECKPOSITION|SXF_CLIENTSIDE)
	TNT1 A 0 A_PlaySound("weapons/12gaugefire",6)
	TNT1 A 0 Bright A_CustomBulletAttack(22.5,18.3,4,random(1,5)*3,"ZBulletPuff",2048,CBAF_NOrandom)
	PSGC F 4 Bright A_CustomBulletAttack(0,0,1,random(1,5)*3,"ZBulletPuff",8192,CBAF_NOrandom)
	TNT1 A 0 A_FaceTarget
	TNT1 AAAA 0 A_CustomMissile("MonsterTracer2",random(28,34),0,random(-6,6),CMF_OFFSETPITCH,frandom(-3.0,3.0))
	TNT1 A 0 A_SpawnItemEx("ShellCasing",12,-6,36,random(2,6),0,random(1,3),random(-80,-90),SXF_NOCHECKPOSITION|SXF_CLIENTSIDE)
	TNT1 A 0 A_PlaySound("weapons/12gaugefire",6)
	TNT1 A 0 Bright A_CustomBulletAttack(22.5,18.3,4,random(1,5)*3,"ZBulletPuff",2048,CBAF_NOrandom)
	PSGC F 4 Bright A_CustomBulletAttack(0,0,1,random(1,5)*3,"ZBulletPuff",8192,CBAF_NOrandom)
	TNT1 A 0 A_MonsterRefire(0,"MissileEnd")
	TNT1 A 0 A_Jump(20,"Pause")
	TNT1 A 0 A_JumpIfInTargetLOS("Dodge",360,JLOSF_DEADNOJUMP,1000)
	Loop
  Refire2:
	TNT1 A 0 A_SetUserVar("user_attack",1)
	TNT1 A 0 A_SetTranslucent(1)
	TNT1 A 0 A_PlaySound("HeavyChaingun/Loop",CHAN_WEAPON,1.0,1)
	TNT1 AAAA 0 A_CustomMissile("MonsterTracer2",random(28,34),0,random(-6,6),CMF_OFFSETPITCH,frandom(-3.0,3.0))
	TNT1 A 0 A_SpawnItemEx("ShellCasing",12,-6,36,random(2,6),0,random(1,3),random(-80,-90),SXF_NOCHECKPOSITION|SXF_CLIENTSIDE)
	TNT1 A 0 A_PlaySound("weapons/12gaugefire",6)
	TNT1 A 0 Bright A_CustomBulletAttack(22.5,18.3,4,random(1,5)*3,"ZBulletPuff",2048,CBAF_NOrandom)
	TNT1 A 0 A_GiveInventory("CFZombieStrafing",1)
	PSGC E 4 Bright A_CustomBulletAttack(0,0,1,random(1,5)*3,"ZBulletPuff",2048,CBAF_NOrandom)
	TNT1 AAAA 0 A_CustomMissile("MonsterTracer2",random(28,34),0,random(-6,6),CMF_OFFSETPITCH,frandom(-3.0,3.0))
	TNT1 A 0 A_SpawnItemEx("ShellCasing",12,-6,36,random(2,6),0,random(1,3),random(-80,-90),SXF_NOCHECKPOSITION|SXF_CLIENTSIDE)
	TNT1 A 0 A_PlaySound("weapons/12gaugefire",6)
	TNT1 A 0 Bright A_CustomBulletAttack(22.5,18.3,4,random(1,5)*3,"ZBulletPuff",2048,CBAF_NOrandom)
	TNT1 A 0 A_GiveInventory("CFZombieStrafing",1)
	PSGC E 4 Bright A_CustomBulletAttack(0,0,1,random(1,5)*3,"ZBulletPuff",2048,CBAF_NOrandom)
	TNT1 AAAA 0 A_CustomMissile("MonsterTracer2",random(28,34),0,random(-6,6),CMF_OFFSETPITCH,frandom(-3.0,3.0))
	TNT1 A 0 A_SpawnItemEx("ShellCasing",12,-6,36,random(2,6),0,random(1,3),random(-80,-90),SXF_NOCHECKPOSITION|SXF_CLIENTSIDE)
	TNT1 A 0 A_PlaySound("weapons/12gaugefire",6)
	TNT1 A 0 Bright A_CustomBulletAttack(22.5,18.3,4,random(1,5)*3,"ZBulletPuff",2048,CBAF_NOrandom)
	TNT1 A 0 A_GiveInventory("CFZombieStrafing",1)
	PSGC F 4 Bright A_CustomBulletAttack(0,0,1,random(1,5)*3,"ZBulletPuff",2048,CBAF_NOrandom)
	TNT1 AAAA 0 A_CustomMissile("MonsterTracer2",random(28,34),0,random(-6,6),CMF_OFFSETPITCH,frandom(-3.0,3.0))
	TNT1 A 0 A_SpawnItemEx("ShellCasing",12,-6,36,random(2,6),0,random(1,3),random(-80,-90),SXF_NOCHECKPOSITION|SXF_CLIENTSIDE)
	TNT1 A 0 A_PlaySound("weapons/12gaugefire",6)
	TNT1 A 0 Bright A_CustomBulletAttack(22.5,18.3,4,random(1,5)*3,"ZBulletPuff",2048,CBAF_NOrandom)
	TNT1 A 0 A_GiveInventory("CFZombieStrafing",1)
	PSGC F 4 Bright A_CustomBulletAttack(0,0,1,random(1,5)*3,"ZBulletPuff",2048,CBAF_NOrandom)
	TNT1 A 0 A_MonsterRefire(0,"MissileEnd")
	TNT1 A 0 A_Jump(15,"Pause")
	Loop
	MissileEnd:
	TNT1 A 0
	TNT1 A 0 A_SetUserVar("user_attack",0)
	TNT1 A 0 A_PlaySound("HeavyChaingun/Down",CHAN_WEAPON,1.0,0)
	TNT1 A 0 A_Jump(46,"Phase")
	Goto See
	Pause:
	TNT1 A 0
	TNT1 A 0 A_SetUserVar("user_attack",0)
	TNT1 A 0 A_PlaySound("HeavyChaingun/Down",CHAN_WEAPON,1.0,0)
	PSGC A 3 A_FaceTarget
	TNT1 A 0 A_JumpIfInTargetLOS("Dodge",360,JLOSF_DEADNOJUMP,1000)
	SGCH A 3 A_FaceTarget
	TNT1 A 0 A_JumpIfInTargetLOS("Dodge",360,JLOSF_DEADNOJUMP,1000)
	PSGC A 3 A_FaceTarget
	TNT1 A 0 A_JumpIfInTargetLOS("Dodge",360,JLOSF_DEADNOJUMP,1000)
	PSGC A 3 A_FaceTarget
	TNT1 A 0 A_JumpIfInTargetLOS("Dodge",360,JLOSF_DEADNOJUMP,1000)
	PSGC A 3 A_FaceTarget
	TNT1 A 0 A_JumpIfInTargetLOS("Dodge",360,JLOSF_DEADNOJUMP,1000)
	TNT1 A 0 A_Jump(46,"Phase")
	Goto See
  Phase:
    TNT1 A 0 A_PlaySound("phaseimp/teleport")
    PSGC D 2 A_FaceTarget
    PSGC D 1 A_SetTranslucent(0.75)
    PSGC D 1 A_SetTranslucent(0.55)
    PSGC D 1 A_SetTranslucent(0.35)
	PSGC D 1 A_SetTranslucent(0.15)
    Goto Phased
  Phased:
    PSGC AABBCCDDAABBCCDDAABBCCDDAABBCCDD 1 A_ExtChase(0,0)
    PSGC AABBCCDDAABBCCDD 1 A_Chase
	TNT1 A 0 A_Jump(24,"UnPhase")
    Goto Phased+32
  UnPhase:
    TNT1 A 0 A_PlaySound("phaseimp/teleport")
    PSGC D 1 A_SetTranslucent(0.15)
    PSGC D 1 A_SetTranslucent(0.35)
    PSGC D 1 A_SetTranslucent(0.55)
    PSGC D 1 A_SetTranslucent(0.75)
	TNT1 A 0 A_SetTranslucent(1)
    PSGC D 2 A_FaceTarget		
    Goto See
  Pain:
	TNT1 A 0 A_SetTranslucent(1)
    PSGC G 6 A_Pain
    Goto See
  Death:
	TNT1 A 0 A_PlaySound("HeavyChaingun/Down",CHAN_WEAPON,1.0,0)
	TNT1 A 0 A_Jump(42,"PhaseMoon")
	TNT1 A 0 A_SetTranslucent(1)
    PSGC H 5
    PSGC I 5 A_Scream 
    PSGC J 5 A_Fall 
    PSGC K 5 A_SpawnItem("BodyCrash",0,0,0,0)
    PSGC LMNOP 5
	PSGC P -1
    Stop
  PhaseMoon:
    TNT1 A 0 A_SetTranslucent(1)
	TNT1 A 0 A_SpawnItem("PHellionSmokeSpawner",0,0,0,0)
	PSGC H 5
	TNT1 A 0 A_SpawnItem("PHellionSmokeSpawner",0,0,0,0)
    PSGC I 5 A_Scream
	TNT1 A 0 A_SpawnItem("PHellionSmokeSpawner",0,0,0,0)
    PSGC J 5 A_Fall
	TNT1 A 0 A_SpawnItem("PHellionSmokeSpawner",0,0,0,0)
    PSGC K 5 A_SpawnItem("BodyCrash",0,0,0,0)
	TNT1 A 0 A_SpawnItem("PHellionSmokeSpawner",0,0,0,0)
	PSGC LMNO 5
    PSGC P 140
	PSGC P 0 A_PlaySoundEx("brain/spit","Voice",0,2)
	PSGC PPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPP 2 A_SpawnItem("PHellionSmokeSpawner",0,0,0,0)
	PSGC P 0 A_PlaySoundEx("TLegZomb/Resurrect",7,0,1)
	PHMO PONMLKJGH 11 Bright
	TNT1 A 0 A_SpawnItemEx("PhaseMoon",0,0,16,0,0,0,0,32)
	Stop
  Raise:
	TNT1 A 0 A_SpawnItemEx("VileHealEffect",0,0,0,0,0,0,0,SXF_NOCHECKPOSITION)
    PSGC PONMLKJIH 5 A_SpawnItem("PHellionSmokeSpawner",0,0,0,0)
    Goto See
  }
}