

ACTOR Dusk_Guardian_Grenade
{
    Radius 4
    Height 9
    Health 50 //(50+50+20direct = 120)
    Damage 20
    Speed 17
    Mass 0
    BounceFactor 0.59//420//69
	WallBounceFactor 0.520

    Gravity 0.25
    BounceType "Hexen"
    -ROCKETTRAIL
    PROJECTILE
    +CANBOUNCEWATER
    -NOGRAVITY
    +FORCERADIUSDMG
//+BOUNCEAUTOOFF
//+BOUNCEAUTOOFFFLOORONLY
+USEBOUNCESTATE


  ReactionTime 210 //(6 seconds) 
    +NOBLOCKMAP
    +MISSILE
    +BRIGHT
//	+SEEKERMISSILE //Not actually used for anything other than checking radius.

DamageType "GuardianGren"

    SeeSound "mortar/bounce"
//    DeathSound "weapons/rocklx"
    Obituary "$MORT_OB"
Scale 0.15
    States
    {
    Spawn:
//        MORT A 0 NoDelay ACS_NamedExecuteWithResult("Doosk_MortarFired")
    Idle:
        MORT A 1
    MORT A 0 A_CountDown
	Loop
IdleSound:
tnt1 a 0 A_PlaySound("mortar/bounce")
Goto Idle


bounce.ceiling:
bounce.wall:
tnt1 a 0 A_PlaySound("mortar/bounce")
Goto Idle
bounce.floor:
TNT1 A 0 A_JumpIf(velz > 1, "IdleSound")
Goto BounceDed

BounceDed:
MORT A 0 A_Stop
BounceDead:
MORT A 1 A_CountDown
Loop




    Death:
    //      TNT1 A 0 A_SetScale(0.75)
        MISL B 0 //A_Explode
        MISL B 1 A_SpawnItemEx("Dusk_GrenadeExplodeVisualAir",0,0,0,0,0,0,0,32)
        Stop
    }
}
 



//===========================================================================
//
// Guardian
//
//===========================================================================
ACTOR Guardian //502//replaces 
{
	//$Category Doosk Monsters/Bosses
	//$Sprite GRDCA0
	//$Title Guardian
	//$Color 6
	Game Doom
	SpawnID 111
	Health 1760//300
	GibHealth 150
	PainChance 0

	+NOPAIN
	Speed 5
	Radius 24
	Height 64
	Mass 1000
	Monster
	ReactionTime 105
	+BOSS 
	+FLOORCLIP
	+BOSSDEATH	//Cyberdemon

DamageFactor "GuardianGren", 0.0

	SeeSound "guardian/sight"
	AttackSound "guardian/fire"
	PainSound "guardian/pain"
	DeathSound "guardian/death"
	ActiveSound "guardian/active"
	Obituary "$GUARD_DTH"
	Gravity 0.6

	Scale 0.5
	States
	{
	Spawn:
        GRDC A 0 A_StopSoundEx("soundslot5")
		GRDC A 10 A_Look
		Loop
	See:
        GRDA A 0 A_PlaySoundEx("guardian/loop","soundslot5",1)
        GRDA AABBCCDDEEFFGGHHII 1 A_Chase
		Loop

	Missile:
        GRDB A 0 A_StopSoundEx("soundslot5")
TNT1 A 0 A_PlaySound("guardian/pre_fire")
		GRDB AABBCCDDEEFFGGHHIIJJKKLLMMNN 1 bright A_FaceTarget
//12 shots 4x3
TNT1 A 0 A_PlaySound("guardian/fire")
		GRDB OOO 0 bright A_CustomMissile("Dusk_Guardian_Grenade",32,5,random(-20,20),CMF_OFFSETPITCH,random(-5,20))
		GRDB O 8 bright A_FaceTarget

TNT1 A 0 A_PlaySound("guardian/fire")
		GRDB OOO 0 bright A_CustomMissile("Dusk_Guardian_Grenade",32,5,random(-20,20),CMF_OFFSETPITCH,random(-5,20))
		GRDB O 8 bright A_FaceTarget

TNT1 A 0 A_PlaySound("guardian/fire")
		GRDB OOO 0 bright A_CustomMissile("Dusk_Guardian_Grenade",32,5,random(-20,20),CMF_OFFSETPITCH,random(-5,20))
		GRDB O 8 bright A_FaceTarget

TNT1 A 0 A_PlaySound("guardian/fire")
		GRDB OOO 0 bright A_CustomMissile("Dusk_Guardian_Grenade",32,5,random(-20,20),CMF_OFFSETPITCH,random(-5,20))
		GRDB OOPPQQRRSSTTUUVVWWXXYY 1 bright A_FaceTarget
		Goto See


	Pain:
		GRDC A 0 A_Pain
		Goto See

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

//TNT1 A 0 A_PlaySound("monster/explodegore")
        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 AAAA 35

		TNT1 A 1 A_BossDeath

		Stop


	}
}



