

//===========================================================================
//
// Projectile
//
//===========================================================================
ACTOR Dusk_Cowgirl_Rocket
{
	Game Doom
	SpawnID 127
	Radius 11
	Height 8
	Speed 30
	Damage (random(1,2)*5)
	Projectile
	+RANDOMIZE
	+DEHEXPLOSION
	-ROCKETTRAIL
	SeeSound "cowgirl/fire"
	DeathSound "Projectile/explosive"
	DamageType "CowgirlAntiXplod"
//	Obituary "$COWGRL_PRJ"
Scale 0.35
	States
	{
	Spawn:
		RIVP A 1 Bright Light("OrangeSmallPoint1")
		Loop

	XDeath:	
	Death: 
		TNT1 A 0 A_Explode(30,128,1,0,18)	//max damage taken by self rocket (rocket jump) is 50
		TNT1 A 0 A_Explode(30,144,0,0,128)	//then another 34 extra damage for impacting a player + (16)dmg on the projectile =100dmg

		MISL B 1 A_SpawnItemEx("Dusk_RocketExplodeVisualAir",0,0,0,0,0,0,0,32)
		Stop
	}
}





//===========================================================================
//
// Cowgirl/Mama/Twins
//
//===========================================================================
ACTOR Cowgirl //501//replaces archvile
{
	//$Category Doosk Monsters
	//$Sprite CWGZA0
	//$Title Cowgirl
	//$Color 6
	var int user_delaycowgatk;
	var int user_cowfireamount;
	Game Doom
	SpawnID 111
	Health 880//700 archvile
	GibHealth 75
	PainChance 0
	+QUICKTORETALIATE

	+NOPAIN
	Speed 5
	Radius 20
	Height 56
	Mass 400
	Monster
	ReactionTime 105
	+FLOORCLIP
	SeeSound "cowgirl/sight"
//	AttackSound "cowgirl/pre_melee"
	PainSound "cowgirl/pain"
	DeathSound "Projectile/explosive"
	ActiveSound "cowgirl/active"
	Obituary "$COWGRL_DTH"

	DamageFactor "CowgirlAntiXplod", 0.0

	Dropitem HealthBonus, 5
	Scale 0.4
	States
	{
	Spawn:
        CWGZ A 0 A_StopSoundEx("soundslot5")
		CWGZ A 10 A_Look
		Loop
	See:
        CWGA A 0 A_PlaySoundEx("cowgirl/loop","soundslot5",1)
		D4DW A 0 A_JumpIf(user_delaycowgatk<1,"See_atk")

	See_noatk:
		CWGA AABBCDEEFFGHIIJKKLMMNOOPQQRSS 1 A_Chase("","")
TNT1 A 0 A_SetUserVar(user_delaycowgatk,user_delaycowgatk-1)
		Loop

	See_atk:
		CWGA AABBCDEEFFGHIIJKKLMMNOOPQQRSS 1 A_Chase
TNT1 A 0 A_SetUserVar(user_delaycowgatk,user_delaycowgatk-1)
		Loop



	Missile:
        CWGB A 0 A_StopSoundEx("soundslot5")
TNT1 A 0 A_PlaySound("cowgirl/pre_fire")
		CWGB ABCCDDEFGHHIJJKLLMNOOPQQRRRSSTUUVV 1 bright A_FaceTarget
TNT1 A 0 A_SetUserVar(user_cowfireamount,0)
Fireseq1:
TNT1 A 0 A_CheckSight("Fireseq1_Noshot")
TNT1 A 0 A_PlaySound("cowgirl/fire")	TNT1 A 0 A_FaceTarget	
TNT1 A 0 A_SetUserVar(user_cowfireamount,user_cowfireamount+1)
		CWGB V 16 bright A_CustomMissile("Dusk_Cowgirl_Rocket")
Fireseq2:
TNT1 A 0 A_CheckSight("Fireseq2_Noshot")
TNT1 A 0 A_PlaySound("cowgirl/fire")	TNT1 A 0 A_FaceTarget	
TNT1 A 0 A_SetUserVar(user_cowfireamount,user_cowfireamount+1)
		CWGB V 16 bright A_CustomMissile("Dusk_Cowgirl_Rocket")
Fireseq3:
TNT1 A 0 A_CheckSight("Fireseq3_Noshot")
TNT1 A 0 A_PlaySound("cowgirl/fire")	TNT1 A 0 A_FaceTarget
TNT1 A 0 A_SetUserVar(user_cowfireamount,user_cowfireamount+1)
		CWGB V 0 A_CustomMissile("Dusk_Cowgirl_Rocket")
		CWGC ABCCDEEFGGHIIJKK 1 bright A_FaceTarget
Fireseq4:
		D4DW A 0 A_JumpIf(user_cowfireamount==3,"Fireseq4_Noshot")
TNT1 A 0 A_CheckSight("Fireseq4_Noshot")
TNT1 A 0 A_PlaySound("cowgirl/fire")	TNT1 A 0 A_FaceTarget
TNT1 A 0 A_SetUserVar(user_cowfireamount,user_cowfireamount+1)
		CWGB V 0 A_CustomMissile("Dusk_Cowgirl_Rocket")
		CWGC LMNNOOPQQRSSTUUV 1 bright A_FaceTarget
Fireseq5:
		D4DW A 0 A_JumpIf(user_cowfireamount==3,"Fireseq5_Noshot")
TNT1 A 0 A_CheckSight("Fireseq5_Noshot")
TNT1 A 0 A_PlaySound("cowgirl/fire")	TNT1 A 0 A_FaceTarget
TNT1 A 0 A_SetUserVar(user_cowfireamount,0)
TNT1 A 0 A_SetUserVar(user_delaycowgatk,user_delaycowgatk-1)
		CWGB V 0 A_CustomMissile("Dusk_Cowgirl_Rocket")
		CWGC WWXX 1 bright A_FaceTarget
		Goto See






Fireseq1_NoShot:
	TNT1 A 0 A_FaceTarget	
		CWGB V 16 
		Goto Fireseq2
Fireseq2_NoShot:
	TNT1 A 0 A_FaceTarget	
		CWGB V 16 
		Goto Fireseq3
Fireseq3_NoShot:
	TNT1 A 0 A_FaceTarget
		CWGC ABCCDEEFGGHIIJKK 1 
		Goto Fireseq4
Fireseq4_NoShot:
	TNT1 A 0 A_FaceTarget
		CWGC LMNNOOPQQRSSTUUV 1 
		Goto Fireseq5
Fireseq5_NoShot:
	TNT1 A 0 A_FaceTarget
TNT1 A 0 A_SetUserVar(user_cowfireamount,0)
TNT1 A 0 A_SetUserVar(user_delaycowgatk,user_delaycowgatk-1)
		CWGC WWXX 1 
		Goto See



	Pain:
		CWGZ A 2 A_Pain
		Goto See
		
	Death:
	XDeath:
        CWGZ A 0 A_StopSoundEx("soundslot5")
		TNT1 A 0 A_ScreamAndUnblock
//TNT1 A 0 A_PlaySound("monster/explodegore")
		WNDB P 0 Fast A_CustomBulletAttack(1, 1, 1, 10,"BulletPuff",128)//Using this, so melee activates at 64px while making effect up to 128 px. Silly, but it works.


        TNT1 A 1 A_SpawnItemEx("Dusk_ExplosiveMonsterGore",0,0,0,0,0,0,0,32)
//        TNT1 A 1 A_SpawnItemEx("Dusk_GenericMonsterExplosion",0,0,0,0,0,0,0,32)
		TNT1 A 0 A_CustomMissile("Dusk_GenericMonsterExplosion")

		TNT1 A -1
		Stop
	}
}





//Mostly the same as Cowgirl, except more health.
ACTOR Mama : Cowgirl //501
{
	//$Category Doosk Monsters/Bosses
	//$Sprite CWGZA0
	//$Title Mama (Cowgirl variant)
	//$Color 6
	Health 2500

	Radius 20
	Height 56
	Mass 400
	SeeSound "cowgirl/daughters"
	Obituary "$MAMA_DTH"

	+BOSS 

	+BOSSDEATH	//Spidermast


	Dropitem Stimpack
	Scale 0.5

	States
	{

	XDeath:
	Death:
        CWGZ A 0 A_StopSoundEx("soundslot5")
		TNT1 A 0 A_ScreamAndUnblock
TNT1 A 0 A_PlaySound("monster/explodegore")
		WNDB P 0 Fast A_CustomBulletAttack(1, 1, 1, 15,"BulletPuff",128)//Using this, so melee activates at 64px while making effect up to 128 px. Silly, but it works.


        TNT1 A 1 A_SpawnItemEx("Dusk_ExplosiveMonsterGore",0,0,0,0,0,0,0,32)
		TNT1 A 0 A_CustomMissile("Dusk_GenericMonsterExplosion")
//        TNT1 A 1 A_SpawnItemEx("Dusk_GenericMonsterExplosion",0,0,0,0,0,0,0,32)
		TNT1 AAAA 35
		TNT1 A 1 A_BossDeath
		Stop
	}
}



//Twins are just two cowgirls with shared health pool. So programming the twins as separate monsters is kinda pointless.





