

ACTOR Chomper_Spit : Phillip_Spit
{
	Speed 10
	Damage (5)
DamageType "ChomperProj"
Scale 0.08
}



//Same as above, but with a different see sound.
//So sickles monster doesn't play the fire sound while attacking.

ACTOR Chomper_SpitDeflect : Chomper_Spit
{
DamageType "DeflectedProjectile"
	SeeSound "Sil/Encio"//"Sword/Deflect"
States
	{
	Death:
		BLLT A 0 BRIGHT A_SpawnItem("Blood")
		Stop
	}
}


//===========================================================================
//
// Chomper
//
//===========================================================================
ACTOR Chomper //502//replaces 
{
	//$Category Doosk Monsters
	//$Sprite CHMPA0
	//$Title Chomper
	//$Color 6
	var int user_delaychompatk;
	Game Doom
	SpawnID 111
	Health 1355
	PainChance 180

	+NOPAIN
	Speed 4
	Radius 24
	Height 64
	Mass 1000
	Monster
	ReactionTime 105
	+FLOAT +NOGRAVITY
	+QUICKTORETALIATE

	SeeSound "chomper/sight"
	AttackSound "chomper/fire"
	PainSound "chomper/pain"
	DeathSound "chomper/death"
	ActiveSound "chomper/active"
	Obituary "$CHOMPR_DTH"
	Gravity 0.6
	DamageFactor "Deflectedprojectile", 5.0

	Scale 0.3
	States
	{
	Spawn:
		CHMP A 10 A_Look
		Loop

	See:
		D4DW A 0 A_JumpIf(user_delaychompatk<1,"See_allowatk")

	See_noatk:
        CHMP AA 1 A_Chase("","")
TNT1 A 0 A_SetUserVar(user_delaychompatk,user_delaychompatk-1)
		Goto See

	See_allowatk:
        CHMP AA 1 A_Chase
TNT1 A 0 A_SetUserVar(user_delaychompatk,user_delaychompatk-1)
		Goto See


	Missile:
		D4DN A 0 A_SetUserVar(user_delaychompatk,10)
TNT1 A 0 A_PlaySound("chomper/fire")
		CHMP A 0 bright A_FaceTarget
		CHMP AAAAAAAAAA 0 A_CustomMissile("Chomper_Spit",32,0,random(-10,10),CMF_OFFSETPITCH,random(-4,4))
		CHMP A 35 bright //A_CustomMissile("welder_Ball",32,0,random(-5,5),CMF_OFFSETPITCH,random(-2,2))
		Goto See


	Pain:
		D4DN A 0 A_SetUserVar(user_delaychompatk,4)
		CHMP A 0 A_Pain
		Goto See

	Death:
	XDeath:
        TNT1 A 0 A_StopSoundEx("soundslot5")
		TNT1 A 0 A_ScreamAndUnblock

TNT1 A 0 A_PlaySound("monster/explodegore")
        TNT1 A 1 A_SpawnItemEx("Dusk_GenericMonsterGore",0,0,0,0,0,0,0,32)

		TNT1 AA 35

//		TNT1 A -1 A_BossDeath

		Stop


	}
}





ACTOR LittleChomper //502//replaces 
{
	//$Category Doosk Monsters
	//$Sprite CMPSA0
	//$Title Litle chomper
	//$Color 6
	var int user_delaychompsonatk;
	Game Doom
	SpawnID 111
	Health 88
	PainChance 255

	+NOPAIN
	Speed 4
	Radius 16
	Height 56
	Mass 1000
	Monster
	ReactionTime 105
	+FLOAT +NOGRAVITY
	+QUICKTORETALIATE

	SeeSound "chomper/sight"
	AttackSound "chomper/fire"
	PainSound "chomper/pain"
	DeathSound "chomper/death"
	ActiveSound "chomper/active"
	Obituary "$CHOMPSON_DTH"
	Gravity 0.6
	DamageFactor "Deflectedprojectile", 5.0

MaxTargetRange 256

	Scale 0.3
	States
	{
	Spawn:
		CMPS A 10 A_Look
		Loop
	See:
		D4DW A 0 A_JumpIf(user_delaychompsonatk<1,"See_allowatk")

	See_noatk:
        CMPS AA 1 A_Chase("","")
TNT1 A 0 A_SetUserVar(user_delaychompsonatk,user_delaychompsonatk-1)
		Goto See
	See_allowatk:
        CMPS AA 1 A_Chase
TNT1 A 0 A_SetUserVar(user_delaychompsonatk,user_delaychompsonatk-1)
		Goto See


	Missile:
		D4DN A 0 A_SetUserVar(user_delaychompsonatk,10)
TNT1 A 0 A_PlaySound("chomper/fire")
		CMPS A 0 bright A_FaceTarget
		CMPS AAA 0 A_CustomMissile("Chomper_Spit",32,0,random(-10,10),CMF_OFFSETPITCH,random(-4,4))
		CMPS A 35 bright //A_CustomMissile("welder_Ball",32,0,random(-5,5),CMF_OFFSETPITCH,random(-2,2))
		Goto See


	Pain:
		D4DN A 0 A_SetUserVar(user_delaychompsonatk,4)
		CMPS A 0 A_Pain
		Goto See

	Death:
	XDeath:
        TNT1 A 0 A_StopSoundEx("soundslot5")
		TNT1 A 0 A_ScreamAndUnblock

TNT1 A 0 A_PlaySound("monster/explodegore")
        TNT1 A 1 A_SpawnDebris("Dusk_GenericGib", 1, 1.1, 1.1)//A_SpawnItemEx("Dusk_GenericGib",0,0,0,0,0,0,0,128)

		TNT1 AA 35

//		TNT1 A -1 A_BossDeath

		Stop


	}
}

