

actor bonemonkpuff : DooskPuff
{
  SeeSound "Weapon/Hit" //  SeeSound "Sickles/Flesh" 
  AttackSound "Sickles/Wall"
	Scale 0.5

	RenderStyle Stencil
	StencilColor Yellow
}



ACTOR Bonemonk_ProjFX
{
	+NOBLOCKMAP
+NOINTERACTION
	Gravity 0.125
	RenderStyle Stencil
	StencilColor Red

	Scale 0.5
	States
	{
	Spawn:
		PART A 1 A_FadeOut(0.04)
		Loop
	}
}




//===========================================================================
//
// Projectile
//
//===========================================================================
ACTOR Bonemonk_Ball
{
	Game Doom
	SpawnID 126
	Radius 6
	Height 8
	Speed 30
	Damage 4//5
	Projectile
	+RANDOMIZE
	RenderStyle Add
	Alpha 0.75
	SeeSound "DSEMPTY"
	DeathSound "sil/encio"
DamageType "MonkProj"
//	Scale 2.0
	States
	{
	Spawn:
		PRJ1 A 2 BRIGHT A_SpawnItemEx("Bonemonk_ProjFX", random2[BoltSpark]()*0.015625, random2[BoltSpark]()*0.015625, 0, 0,0,0,0,SXF_ABSOLUTEPOSITION, 50)
		Loop
	Death:
		"####" "#" 1 Thing_ChangeTid(0,1998)
		"####" "#" 1 BRIGHT

	TNT1 A 0 A_PlaySound("Projectile/impact")
		BLLT A 0 BRIGHT A_SpawnItem("bonemonkpuff")
		Stop

	Crash:
		TNT1 A 1 BRIGHT 
		Stop


	}
}


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

ACTOR Bonemonk_ballDeflect : bonemonk_ball
{
DamageType "DeflectedProjectile"
	SeeSound "Sil/Encio"//"Sword/Deflect"
States
	{
	Death:
	TNT1 A 0 A_PlaySound("Projectile/impact")
		BLLT A 0 BRIGHT A_SpawnItem("Bonemonkpuff")
		Stop
	}
}






//===========================================================================
//
// Bonemonk
//
//===========================================================================
ACTOR Bonemonk //501//replaces Cacodemon
{
	//$Category Doosk Monsters
	//$Sprite BNMZA0
	//$Title Bonemonk
	//$Color 6
	Game Doom
	SpawnID 19
	Health 176//121
	PainChance 100
	+QUICKTORETALIATE

	+FLOAT
	+NOGRAVITY
//	+FORCEPAIN
	Speed 5
	Radius 31
	Height 56
	Mass 400
	Monster
	ReactionTime 105
	+FLOORCLIP
	SeeSound "bonemonk/sight"
	AttackSound "mage/fire"
	PainSound "bonemonk/pain"
	DeathSound "monster/explodegore"
	ActiveSound "bonemonk/active"
	Obituary "$BONEMONK_DTH"
	DamageFactor "Deflectedprojectile", 5.0

	Scale 0.35
	States
	{
	Spawn:
		BNMZ A 10 A_Look
		Loop
	See:
        BNMA AABBCDDEEFGHHIIJKLLMNNOOPQRRS 1 A_Chase
		Loop

	Missile:
TNT1 A 0 A_PlaySound("mage/pre_fire")
		BNMB ABCDEFGHIJKLMNOPQR 1 A_FaceTarget
TNT1 A 0 A_PlaySound("mage/fire")		TNT1 A 0 bright A_CustomMissile("Bonemonk_Ball",32,0)
		BNMB STUVWXYZ 1 A_FaceTarget
		BNMC ABCDEFGHIJKLMN 1 A_FaceTarget
		Goto See

	Pain://Model has lots of frames, yet it only uses few of them.
		BNMD A 0 A_Pain
BNMD CEHISY 1 
BNME FP 1 
		Goto See

	Death:
	XDeath:
		BPLZ A 0 A_ChangeFlag("noclip",true)
		BPLZ A 0 A_SetFloorClip
		BNMZ A 0 A_ScreamAndUnblock

        TNT1 A 1 A_SpawnItemEx("Dusk_GenericMonsterGore",0,0,0,0,0,0,0,32)

		TNT1 A -1
		Stop




	}
}




