Actor HeavyCarbineGuy
{
//Creator: ConsulCast
//Origin: Nexus Infinity
//Sprite: HCPO
//Title: "Heavy Carbine Guy"
Health 400
Radius 20
Height 56
Speed 10
PainChance 100
Species "Zombie"
Monster
DamageFactor "Normal", 0.75
DamageFactor "HCGuy", 0.0
DropItem "HandGrenadeAmmo" 80 2
DropItem "MineAmmo" 45 1
DropItem "AmmoPack" 40
DropItem "AmmoPack" 40
DropItem "PortableMedkit" 159
DropItem "ArmorBooster" 186
DropItem "PortableMedkit" 159
DropItem "ArmorBooster" 186
Obituary "%o was hit in the head by a Heavy Carbine Guy."
AttackSound "weapons/carbine"
SeeSound "grunt/sight"
PainSound "grunt/pain"
DeathSound "grunt/death"
ActiveSound "grunt/active"
Tag "Heavy Carbine Guy"
+FLOORCLIP
+AVOIDMELEE
+MISSILEEVENMORE
+MISSILEMORE
+NOPAIN
States
{
  Spawn:
	HCPO A 10 A_Look
	Loop
  See:
	HCPO A 0 A_Jumpiftargetinlos("Strafing")
	HCPO AA 3 A_Chase
	TNT1 A 0 A_SpawnItem("FootStep",0,0,0,0)
	HCPO BB 3 A_Chase
	TNT1 A 0 A_SpawnItem("FootStep",0,0,0,0)
	HCPO CC 3 A_Chase
	TNT1 A 0 A_SpawnItem("FootStep",0,0,0,0)
	HCPO DD 3 A_Chase
	HCPO A 0 A_Jumpiftargetinlos("Strafing")
	Loop
  Strafing:
	TNT1 A 0 A_SpawnItem("FootStep",0,0,0,0)
	TNT1 A 0 A_Chase("","Missile",CHF_DONTMOVE)
	HCPO AA 3 Bright A_GiveInventory("HEMCommandoStrafing",1)
	TNT1 A 0 A_Chase("","Missile",CHF_DONTMOVE)
	HCPO BB 3 Bright A_GiveInventory("HEMCommandoStrafing",1)
	TNT1 A 0 A_SpawnItem("FootStep",0,0,0,0)
	TNT1 A 0 A_Chase("","Missile",CHF_DONTMOVE)
	HCPO CC 3 Bright A_GiveInventory("HEMCommandoStrafing",1)	
	TNT1 A 0 A_Chase("","Missile",CHF_DONTMOVE)
	HCPO DD 3 Bright A_GiveInventory("HEMCommandoStrafing",1)
	Goto See
  Missile:
	HCPO E 4 A_FaceTarget
	TNT1 A 0 A_Giveinventory("HEMCommandoStrafing",1)
	TNT1 A 0 A_SpawnItemEx("RifleCasing", 12, 6, 30, Random(2, 6), 0, Random(1, 3), Random(-80, -90), 128)
	TNT1 A 0 A_CustomMissile("MonsterTracer",Random(30,34),0,Random(3,-3),0)
	HCPO F 2 Bright A_CustomBulletAttack(12,0,1,Random(3,6)*3)
	HCPO E 3 A_FaceTarget		
	TNT1 A 0 A_Giveinventory("BulletLoss",1)
	TNT1 A 0 A_JumpIfInventory("BulletLoss",30,"Reload")
	TNT1 A 0 A_Jumpifcloser(100,"GrenadeYeet")
	Goto Missile+1
  Reload:
	TNT1 A 0 A_PlayWeaponSound("weapons/arreload")
	HCPO EEEEE 10 Bright A_GiveInventory("HEMCommandoStrafing",1)
	TNT1 A 0 A_SpawnItemEx("AREmptyMagSpawner", -8, 7, 30, 4, 0, (0.1)*Random(30, 40), Random(-80, -90), 128)
	TNT1 A 0 A_TakeInventory("BulletLoss",30)
	Goto See	
  GrenadeYeet:
	HCPO CE 5 Bright A_FaceTarget
	TNT1 A 0 A_PlaySound("weapons/carbinelaunch",0,1.0,0)
	HCPO E 1 Bright A_CustomMissile("HCGrenade",32,0,0,2,4)
	Goto Retreat
  Retreat:
	HCPO E 5 A_Recoil(45)
	goto see
  Death:
	HCPO H 5 A_Scream
	HCPO I 5 A_Fall
	HCPO J 5
	HCPO K 5 A_SpawnItem("BodyCrash",0,0,0,0)
	HCPO L -1
	Stop
  XDeath:
	HCPO M 3 A_XScream
	HCPO N 3 A_SpawnItemEx("GibbedGenerator",0,0,0,0,0,0,0,128,0)
	HCPO O 3 A_Fall
	HCPO PQR 3
	HCPO S -1
	Stop
  Raise:
	TNT1 A 0 A_SpawnItemEx("VileHealEffect",0,0,0,0,0,0,0,SXF_NOCHECKPOSITION)
	HCPO KJIH 5
	}
}

Actor HCGrenade : ThrownGrenade { DamageType "HCGuy" Damage 8 }

ACTOR BulletLoss : Ammo { Inventory.MaxAmount 30 }