/////////////////////////////
// -- DOGGY ZOMBIE -- //
/////////////////////////////

ACTOR DoNothinger
{
	+CLIENTSIDEONLY
	+NOBLOCKMAP
	States
	{
	Spawn:
	TNT1 A 1
	Stop
	}
}

ACTOR DogZombie 11603
{
	Health 35
	Radius 20
	Height 30
	Speed 1.666
	PainChance 69
	PainChance "QuickMelee", 255
	DamageFactor "head", 1.0
	DamageFactor "Decapitate", 1.0
	DamageFactor "Head_Shotgun", 1.15
	DamageFactor "Shotgun", 1.25
	DamageFactor "ItemExplode", 0.00
	MinMissileChance 96
	Monster
	+FLOORCLIP
	+NOTARGET
	+NOINFIGHTING
	+MISSILEMORE
	MaxDropOffHeight 512
	MaxTargetRange 512
	Mass 200
	SeeSound "zdog/see"
	AttackSound "zdog/attack"
	PainSound "zdog/attack"
	DeathSound "zdog/death"
	ActiveSound "zdog/active"
	Obituary "%o was ravaged by a zombified dog."
	States
	{
	Spawn:
		ZDOG A 0
		ZDOG A 0 A_JumpIfInventory("HasSpawnedHead",1,"Wandering")
		//BSZM A 0 ACS_ExecuteAlways(625,0,44,0,0)
		BSZM A 0 ACS_ExecuteWithResult(49,0,0,0)
		ZDOG A 0 A_GiveInventory("HasSpawnedHead",1)
		Goto Wandering
	Wandering:
		ZDOG A 0 A_LookEx(0,0,2048,2048,100)
		ZDOG AAAAABBBBB 2 A_Wander
		ZDOG A 0 A_LookEx(0,0,2048,2048,100)
		ZDOG AAAAABBBBB 2 A_Wander
		Loop
    //=============================================================
	// INCENDIARY
	//=============================================================
	Pain.Fire:
	Pain.Dragon:
	Death.Fire:
	DragonPain:
		DOBG A 0 ACS_ExecuteAlways(72,0,1,30,10)
		DOGB A 1
		DOGB A 0 A_SpawnItemEx("Flaming_Doggy",0,0,0)
		Stop
	Death.Dragon:
	FireDeath:
		TNT1 A 0 ACS_ExecuteAlways(72,0,1,30,10)
		VZOF K 0 A_NoBlocking
		VZOF K 0 A_UnsetShootable
		DOGB EFGHIJ 2 bright
	BurningCorpse:
		BSZF A 0 A_JumpIfInventory("CorpseDecayTime",200,"Charred")
		DOGB K 2 bright A_SpawnItemEx("CorpseFlameFX",0,0,0)
		VZOF K 0 A_GiveInventory("CorpseDecayTime",1)
		Loop
	Charred:
		BSZF A 0
		BSZF A 0 A_SpawnItemEx("Charred_Doggy",0,0,0)
		Stop
	//=============================================================
	See:
		ZDOG A 0 A_AlertMonsters
		ZDOG A 0 A_TakeInventory("Forgotten",100)
		ZDOG AAABBB 1 A_Chase
		ZDOG CCCDDD 1 A_Chase
		TNT1 A 0
		Goto See+2
	ForgetTarget:
		ZDOG A 0 A_GiveInventory("Forgotten",1)
		ZDOG A 0 A_JumpIfInventory("Forgotten",18,1)
		Goto See+2
		ZDOG A 0
		ZDOG A 0 A_TakeInventory("Forgotten",100)
		ZDOG A 0 A_ClearTarget
		Goto Wandering
	Melee:
		ZDOG E 4 A_FaceTarget
		ZDOG F 4 A_FaceTarget
		ZDOG G 5 A_CustomMeleeAttack(3 * random(4, 10), "imp/melee", "")
		Goto See+2
	Missile:
		ZDOG A 2 A_FaceTarget
		ZDOG E 0 A_PlaySoundEx("zdog/attack","Body")
		ZDOG E 0 A_ChangeVelocity(0,0,velz+1.666)
		ZDOG E 0 A_Recoil(-13)//(-30)
		ZDOG EEE 2 A_CustomMeleeAttack(random(2, 4), "imp/melee", "")
		ZDOG FFF 2 A_CustomMeleeAttack(random(2, 4), "imp/melee", "")
		ZDOG GGG 2 A_CustomMeleeAttack(random(2, 4), "imp/melee", "")
		Goto See
	Pain:
		ZDOG I 1
		ZDOG I 2 A_Pain
		Goto See+2
	Pain.QuickMelee:
		BSZM A 0 A_FaceTarget
		BSZM A 0 A_Recoil(25)
		ZDOG A 1
		ZDOG A 2 A_Pain
		Goto See+2
	Death:
		TNT1 A 0 ACS_ExecuteAlways(72,0,0,30,10)
		ZDOG I 4 A_Scream
		ZDOG J 4 A_NoBlocking
		ZDOG KLMN 4
		BSZM I 0 A_SpawnItemEx("DogZombieBody",0,0,0)
		Stop
	Death.PointBlank:
	Death.ExplosiveDamage:
		BSZM M 0 ACS_ExecuteAlways(72,0,0,35,10)
		TNT1 A 0 A_SpawnItemEx("GibChunkSpawner_Doggy",0,0,32)
		//BSZM M 5
		TNT1 N 0 A_Scream
		//BSZM O 5 A_NoBlocking
		TNT1 A 0 A_NoBlocking
		//BSZM PQR 5
		//BSZM S -1
		TNT1 A -1
		Stop
	}
}

ACTOR ZombieDogBlue
{
	Health 35
	Radius 20
	Height 30
	Speed 2.666
	PainChance 24
	PainChance "QuickMelee", 255
	DamageFactor "head", 1.0
	DamageFactor "Decapitate", 1.0
	DamageFactor "ItemExplode", 0.00
	DamageFactor "Head_Shotgun", 1.15
	DamageFactor "Shotgun", 1.25
	Monster
	+FLOORCLIP
	+NOTARGET
	+NOINFIGHTING
	MaxDropOffHeight 512
	MinMissileChance 254
	SeeSound "zdog/see"
	Mass 200
	AttackSound "zdog/attack"
	PainSound "zdog/attack"
	DeathSound "zdog/death"
	ActiveSound "zdog/active"
	Obituary "%o was ravaged by a zombified dog."
	States
	{
	Spawn:
		ZDON A 0
		ZDON A 0 A_JumpIfInventory("HasSpawnedHead",1,"Wandering")
		BSZM A 0 ACS_ExecuteWithResult(49,0,0,0)
		ZDON A 0 A_GiveInventory("HasSpawnedHead",1)
		Goto Wandering
	Wandering:
		ZDON A 0 A_LookEx(0,0,2048,2048,100)
		ZDON AAAAABBBBB 2 A_Wander
		ZDON A 0 A_LookEx(0,0,2048,2048,100)
		ZDON AAAAABBBBB 2 A_Wander
		Loop
	ForgetTarget:
		ZDOG A 0 A_GiveInventory("Forgotten",1)
		ZDOG A 0 A_JumpIfInventory("Forgotten",18,1)
		Goto See+2
		ZDOG A 0
		ZDOG A 0 A_TakeInventory("Forgotten",100)
		ZDOG A 0 A_ClearTarget
		Goto Wandering
    //=============================================================
	// INCENDIARY
	//=============================================================
	Pain.Fire:
	Pain.Dragon:
	Death.Fire:
	DragonPain:
		DOBG A 0 ACS_ExecuteAlways(72,0,0,30,10)
		DOGB A 1
		DOGB A 0 A_SpawnItemEx("Flaming_Doggy",0,0,0)
		Stop
	Death.Dragon:
	FireDeath:
		TNT1 A 0 ACS_ExecuteAlways(72,0,1,30,10)
		VZOF K 0 A_NoBlocking
		VZOF K 0 A_UnsetShootable
		DOGB EFGHIJ 2 bright
	BurningCorpse:
		BSZF A 0 A_JumpIfInventory("CorpseDecayTime",200,"Charred")
		DOGB K 2 bright A_SpawnItemEx("CorpseFlameFX",0,0,0)
		VZOF K 0 A_GiveInventory("CorpseDecayTime",1)
		Loop
	Charred:
		DOGB L -1
		Stop
	//=============================================================
	See:
		ZDON A 0 A_AlertMonsters
		ZDON A 0 A_TakeInventory("Forgotten",100)
		ZDON AAABBB 1 A_Chase
		ZDON CCCDDD 1 A_Chase
		TNT1 A 0
		Goto See+2
	Melee:
		ZDON E 4 A_FaceTarget
		ZDON F 4 A_FaceTarget
		ZDON G 5 A_CustomMeleeAttack(3 * random(4, 10), "imp/melee", "")
		Goto See+2
	Missile:
		ZDON A 2 A_FaceTarget
		ZDON E 0 A_PlaySoundEx("zdog/attack","Body")
		ZDON E 0 A_ChangeVelocity(0,0,velz+2.666)
		ZDON E 0 A_Recoil(-16)//(-30)
		ZDON EEE 2 A_CustomMeleeAttack(random(2, 4), "imp/melee", "")
		ZDON FFF 2 A_CustomMeleeAttack(random(2, 4), "imp/melee", "")
		ZDON GGG 2 A_CustomMeleeAttack(random(2, 4), "imp/melee", "")
		Goto See
	Pain:
		ZDON I 1
		ZDON I 2 A_Pain
		Goto See+2
	Pain.QuickMelee:
		BSZM A 0 A_FaceTarget
		BSZM A 0 A_Recoil(25)
		ZDON A 1
		ZDON A 2 A_Pain
		Goto See+2
	Death:
		TNT1 A 0 ACS_ExecuteAlways(72,0,0,30,10)
		ZDON I 4 A_Scream
		ZDON J 4 A_NoBlocking
		ZDON KLMN 4
		BSZM I 0 A_SpawnItemEx("DogZombieBodyBlue",0,0,0)
		Stop
	Death.PointBlank:
	Death.ExplosiveDamage:
		BSZM M 0 ACS_ExecuteAlways(72,0,0,35,10)
		TNT1 A 0 A_SpawnItemEx("GibChunkSpawner_Doggy",0,0,32)
		//BSZM M 5
		TNT1 N 0 A_Scream
		//BSZM O 5 A_NoBlocking
		TNT1 A 0 A_NoBlocking
		//BSZM PQR 5
		//BSZM S -1
		TNT1 A -1
		Stop
	}
}

ACTOR DogZombieBody
{
	+THRUACTORS
	+SHOOTABLE
	+MOVEWITHSECTOR
	-NOBLOOD
	-SOLID
	+FLOORCLIP
	+CORPSE
	+NOTELEPORT
	Health 150
	Mass 300000000
	Radius 22
	Height 4
	DamageFactor "Fire", 50.0
	DamageFactor "Dragon", 50.0
	States
	{
	Spawn:
		ZDOG O 1
		Loop
	Pain.Fire:
	Pain.Dragon:
	Death.Fire:
	Death.Dragon:
		TNT1 A 0
		TNT1 A 0 A_SpawnItemEx("BurningDoggyCorpse",0,0,0)
		Stop
	Pain.PointBlank:
	Death.PointBlank:
	Death.ExplosiveDamage:
		TNT1 A 0
		TNT1 A 0 A_SpawnItemEx("GibChunkSpawner",0,0,10)
		Stop
	}
}

ACTOR DogZombieBodyBlue : DogZombieBody
{
	States
	{
	Spawn:
		ZDON O 1
		Loop
	Pain.PointBlank:
	Death.PointBlank:
	Death.ExplosiveDamage:
		TNT1 A 0
		TNT1 A 0 A_SpawnItemEx("GibChunkSpawner",0,0,10)
		Stop
	}
}