
actor intoxigatorpuff : DooskPuff
{
  SeeSound "Weapon/Hit" //  SeeSound "Sickles/Flesh" 
  AttackSound "Sickles/Wall"
	Scale 0.6

	RenderStyle Stencil
	StencilColor green
}



ACTOR Intoxigator_SpitFX
{
	+NOBLOCKMAP
+NOINTERACTION
	Gravity 0.125
	RenderStyle Stencil
	StencilColor Green

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


//===========================================================================
//
// Projectile (also shared with horrors and chomper)
//
//===========================================================================
ACTOR Intoxigator_Spit
{
	Game Doom
//	SpawnID 10
	Radius 6
	Height 8
	Speed 25
//	FastSpeed 20
	Damage 3
	Projectile
	+RANDOMIZE
	RenderStyle Stencil
	StencilColor Green
	Alpha 1
	SeeSound "sil/encio"
	DeathSound "sil/encio"
DamageType "elcocoProj"
Scale 0.08
	States
	{
	Spawn:
		BLLT A 1 BRIGHT A_SpawnItemEx("Intoxigator_SpitFX", 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/wetimpact")
		BLLT A 0 BRIGHT A_SpawnItem("intoxigatorpuff")
		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 Intoxigator_SpitDeflect : Intoxigator_Spit
{
DamageType "DeflectedProjectile"
	SeeSound "Sil/Encio"//"Sword/Deflect"
States
	{
	Death:
	TNT1 A 0 A_PlaySound("projectile/wetimpact")
		BLLT A 0 BRIGHT A_SpawnItem("IntoxigatorPuff")
		Stop
	}
}



//===========================================================================
//
//  Intoxigator (El coco gigante)
//
//===========================================================================
ACTOR Intoxigator //502
{
	//$Category Doosk Monsters
	//$Sprite NTXAA0
	//$Title Intoxigator
	//$Color 6
	var int user_delaycocoatk;
	Game Doom
	SpawnID 111
	Health 1000//2200//1550
	PainChance 130
	+QUICKTORETALIATE

//	+FORCEPAIN
	Speed 5
	Radius 20
	Height 56
	Mass 400
	Monster
	ReactionTime 105
	+FLOORCLIP
	+NOPAIN
	SeeSound "elcocogigante/sight"
	AttackSound "elcocogigante/fire"
	PainSound "elcocogigante/pain"
	DeathSound "monster/explodegore"
	ActiveSound "elcocogigante/active"
	Obituary "$COCO_DTH"
	DamageFactor "Deflectedprojectile", 5.0

Gravity 0.75
	Scale 0.55
	States
	{
	Spawn:
        NTXA A 0 A_StopSoundEx("soundslot5")
		NTXA A 10 A_Look
		Loop
	See:
		D4DW A 0 A_JumpIf(user_delaycocoatk<1,"See_allowatk")
	See_noatk:
        NTXA A 0 A_PlaySoundEx("elcocogigante/loop","soundslot5",1)
        NTXA CDEFGHIJKLMNOPQRSTUVWXYZ 1 A_Chase("","")
TNT1 A 0 A_SetUserVar(user_delaycocoatk,user_delaycocoatk-1)
        NTXB ABCDEFGHIJKLMNOPQRSTUVWXYZ 1 A_Chase("","")
		NTXC ABCDEFGHI 1 A_Chase("Missile","")
		Goto See
	See_allowatk:
        NTXA A 0 A_PlaySoundEx("elcocogigante/loop","soundslot5",1)
        NTXA CDEFGHIJKLMNOPQRSTUVWXYZ 1 A_Chase
TNT1 A 0 A_SetUserVar(user_delaycocoatk,user_delaycocoatk-1)
        NTXB ABCDEFGHIJKLMNOPQRSTUVWXYZ 1 A_Chase
		NTXC ABCDEFGHI 1 A_Chase
		Goto See


	Missile:
TNT1 A 0 A_SetUserVar(user_delaycocoatk,1)
        NTXD A 0 A_StopSoundEx("soundslot5")
NTXD A 0 A_PlaySound("elcocogigante/pre_fire")
		NTXD ABCCDDEFGHHI 1 A_FaceTarget
NTXD I 0 A_PlaySound("elcocogigante/fire")
		NTXD IIIIIIIIIIIIIII 0 A_CustomMissile("Intoxigator_Spit",32,0,random(-10,10),CMF_OFFSETPITCH,random(-4,4))
		NTXD I 35 A_FaceTarget
		Goto See

	Pain:
		NTXD A 0 A_Pain
		Goto See

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

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


	}
}





//El coco son
ACTOR IntoxigatorSon //502
{
	//$Category Doosk Monsters
	//$Sprite NTSAA0
	//$Title Intoxigator's son
	//$Color 6
	var int user_delaycocosonatk;
	Game Doom
	SpawnID 111
	Health 800//968
	PainChance 130
	+QUICKTORETALIATE

//	+FORCEPAIN
	Speed 7
	Radius 20
	Height 56
	Mass 400
	Monster
	ReactionTime 105
	+FLOORCLIP
	+NOPAIN
	+BOSSDEATH//baronofhell
	SeeSound "intoxigatorson/sight"
	AttackSound "elcocogigante/fire"
	PainSound "elcocogigante/pain"
	DeathSound "monster/explodegore"
	ActiveSound "elcocogigante/active"
	Obituary "$COCOSON_DTH"
	DamageFactor "Deflectedprojectile", 5.0

Gravity 0.75
	Scale 0.35
	States
	{
	Spawn:
        NTSA A 0 A_StopSoundEx("soundslot5")
		NTSA A 10 A_Look
		Loop
	See:
		D4DW A 0 A_JumpIf(user_delaycocosonatk<1,"See_allowatk")
	See_noatk:
        NTSA A 0 A_PlaySoundEx("elcocogigante/loop","soundslot5",1)
        NTSA CDEFGHIJKLMNOPQRSTUVWXYZ 1 A_Chase("","")
TNT1 A 0 A_SetUserVar(user_delaycocosonatk,user_delaycocosonatk-1)
        NTSB ABCDEFGHIJKLMNOPQRSTUVWXYZ 1 A_Chase("","")
		NTSC ABCDEFGHI 1 A_Chase("Missile","")
		Goto See
	See_allowatk:
        NTSA A 0 A_PlaySoundEx("elcocogigante/loop","soundslot5",1)
        NTSA CDEFGHIJKLMNOPQRSTUVWXYZ 1 A_Chase
TNT1 A 0 A_SetUserVar(user_delaycocosonatk,user_delaycocosonatk-1)
        NTSB ABCDEFGHIJKLMNOPQRSTUVWXYZ 1 A_Chase
		NTSC ABCDEFGHI 1 A_Chase
		Goto See

	Missile:
TNT1 A 0 A_SetUserVar(user_delaycocosonatk,1)
        NTSD A 0 A_StopSoundEx("soundslot5")
NTSD A 0 A_PlaySound("intoxigatorson/pre_fire")
		NTSD ABCCDDEFGHHI 1 A_FaceTarget
NTSD A 0 A_PlaySound("elcocogigante/fire")
		NTSD IIIIIIIIIIIIIII 0 A_CustomMissile("Intoxigator_Spit",32,0,random(-10,10),CMF_OFFSETPITCH,random(-4,4))
		NTSD I 35 A_FaceTarget
		Goto See

	Pain:
		NTSD A 0 A_Pain
		Goto See

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

        TNT1 A 1 A_SpawnItemEx("Dusk_GenericMonsterGore",0,0,0,0,0,0,0,32)
		TNT1 AA 35
		TNT1 A 1 A_BossDeath   
		Stop


	}
}



