Actor D3Trite 20502
{
  //$Title "DOOM 3 Trite"
  //$Category XV117Monsters
  HitObituary "%o was nipped by a Trite"
  Health 30
  Radius 19
  Height 23
  Mass 100
  Speed 10
	FastSpeed 14
  Scale 0.5
  PainChance 200
	PainChance "CauseWaterSplash", 0
	PainChance "CauseObjectsToSplash", 0
	PainChance "Avoid", 35
	PainChance "Head", 255
    PainChance "Taunt", 255
    PainChance "Kick", 255
    PainChance "SuperKick", 255
	damagefactor "Head", 3.0
	damagefactor "TeleportRemover", 0.0
	PainChance "ExplosiveImpact", 255
	PainChance "Explosive", 255
	damagefactor "Avoid", 1.0
	damagefactor "Explosive", 5.0
	damagefactor "ExplosiveImpact", 5.0
	damagefactor "Saw", 5.0
	damagefactor "ShotgunPuff", 1.25
	damagefactor "Shotgun", 1.25
	damagefactor "SSG", 1.25
	damagefactor "Plasma", 5.0
	damagefactor "Crush", 10.0
	Monster
	damagefactor "Blood", 0.0 damagefactor "BlueBlood", 0.0 damagefactor "GreenBlood", 0.0
    BloodType "Green_Blood", "GreenSawBlood", "GreenSawBlood"
    damagefactor "Shrapnel", 5.0
	damagefactor "Kick", 1.0
    damagefactor "SuperKick", 1.0
    damagefactor "Fatality", 1.0
	damagefactor "PlasmaRifle", 2.5
  BloodColor DarkGreen
  PainSound "Trite/Pain"
  SeeSound "Trite/Sight"
  DeathSound "Trite/Death"
  ActiveSound "Trite/Active"
  MeleeSound "Trite/MeleeHit"
  Tag "Trite"
  MeleeDamage 3
  MeleeThreshold 64
  MaxTargetRange 160
  MinMissileChance 10
  Damage 3
  Monster
  +FloorClip
  +DontHurtSpecies
  +NOBLOCKMONST
  +NoTarget
  States
  {
  Spawn:
    TRIT A 1 A_Look
    Loop
  See:
    TRIT A 2 A_Chase("", "", 0)
    TRIT A 2 A_Chase
    TRIT A 0 A_PlaySoundEx("Trite/Step", "SoundSlot7", 0)
    TRIT BB 2 A_Chase("Melee", "Missile", 2)
    TRIT B 0 A_PlaySoundEx("Trite/Step", "SoundSlot7", 0)
    TRIT CC 2 A_Chase
    TRIT C 0 A_PlaySoundEx("Trite/Step", "SoundSlot7", 0)
    TRIT DD 2 A_Chase("Melee", "Missile", 2)
    TRIT D 0 A_PlaySoundEx("Trite/Step", "SoundSlot7", 0)
    Loop
  Melee:
    TRIT A 6 A_FaceTarget
    TRIT A 0 A_Jump(192, 2)
    TRIT A 0 A_PlaySound("Trite/Attack")
    TRIT E 6 A_CustomMissile("TriteAttack2",10,0,0,0)
    TNT1 A 0 A_JumpIfInventory("Fatality_Marine", 1, "FatalityMarine")
    Goto See
  Missile:
    TRIT A 0 A_Jump(128, "See")
    TRIT AAA 3 A_FaceTarget
    TRIT F 0 A_PlaySound("Trite/Attack")
    TRIT F 0 A_SkullAttack
    TRIT F 10 ThrustThingZ(0, 6, 0, 1)
    TRIT F 0 A_CustomMissile("TriteAttack2",10,0,0,0)
    TRIT E 8 A_Stop
    Goto See
	FatalityMarine:
       TNT1 A 0 A_SetInvulnerable
	   TNT1 A 0 A_PlaySound("Trite/Sight")
	   TNT1 A 0 A_PlaySound("DSFDTHE")
	   TRFA ABC 6 A_SetScale(1.0)
	   TNT1 AA 0 A_CustomMissile ("XDeath1", 1, 0, random (0, 360), 2, random (0, 160))
	   TNT1 A 0 A_PlaySound("XDeath1")
       TRFA D 7 A_SetScale(1.0)
	   TNT1 A 0 A_CustomMissile ("XDeath2", 1, 0, random (0, 360), 2, random (0, 160))
	   TNT1 AA 0 A_CustomMissile ("XDeath1", 1, 0, random (0, 360), 2, random (0, 160))
	   TRFA E 6 A_SetScale(1.0)
	   TNT1 AA 0 A_CustomMissile ("SuperWallRedBlood", 46, 0, random (170, 190), 2, random (0, 40))
        TNT1 AAAAAAA 0 A_CustomMissile ("BrainBlood", 50, 0, random (0, 360), 2, random (0, 160))
		TNT1 A 0 A_CustomMissile ("XDeath3", 40, 0, random (0, 360), 2, random (0, 160))
	   TNT1 A 0 A_SpawnItem ("BigBloodSpot")
	   EXPL A 0 Radius_Quake (2, 24, 0, 15, 0)
	   TNT1 A 0 A_PlaySoundEx("Trite/Splat", "SoundSlot7", 0)
       TNT1 AAAAA 0 A_CustomMissile ("PlayerFlyingBlood", 25, 0, random (0, 360), 2, random (0, 160))
	   XPL4 BCDEF 5 A_SetScale(1.0)
	   TNT1 A 0 A_CustomMissile ("XDeath1", 1, 0, random (0, 360), 2, random (0, 160))
	   XPL4 G -1 A_SetScale(1.0)
       TNT1 A 0 A_TakeInventory("Fatality_Marine",1)
	   TNT1 A 0 A_SpawnItem ("MediumBloodSpot")
	    TNT1 A 0 A_SpawnItem ("TriteMarineFatalized")
       TNT1 A 0 A_UnSetInvulnerable
	   Stop
  Web:
    TRIT F 0
    TRIT F 0 A_ChangeFlag("LowGravity", 1)
    TRIT F 0 A_ChangeFlag("NoDamage", 1)
    TRIT F 0 A_ChangeFlag("NoPain", 1)
    TRIT F 0 A_PlaySound("Trite/WebStart")
    TRIT F 1 A_CheckFloor(1)
    Goto Web+5
    TRIT A 0 A_ChangeFlag("NoDamage", 0)
    TRIT A 0 A_ChangeFlag("NoPain", 0)
    TRIT A 0 A_ChangeFlag("LowGravity", 0)
    TRIT A 12 A_PlaySound("Trite/WebEnd")
    Goto Spawn
  Pain:
    TRIT E 3
    TRIT E 3 A_Pain
    Goto See
  Death:
    TRIT G 5 A_Scream
    TNT1 A 0 A_PlaySound("misc/xdeath2")
    TNT1 AA 0 A_CustomMissile ("GreenBloodTrails", 35, 0, random (0, 360), 2, random (0, 160))
    TRIT H 0 A_PlaySoundEx("Trite/Splat", "SoundSlot7", 0)
    TRIT H 5 A_NoBlocking
    TRIT IJK 5    
    Stop
  }
}

ACTOR TriteAttack1
{
	Radius 10
	Height 18
	DamageType Arm
	Projectile 
	+RANDOMIZE
    Damage 2
	+FORCEXYBILLBOARD
    +THRUGHOST
	+MTHRUSPECIES
	+THRUSPECIES
    +BLOODSPLATTER 
	RenderStyle Add
	Alpha 0.6
	HitObituary "$OB_IMPHIT"
    Obituary "$OB_IMPHIT"
	+DONTHARMCLASS
	SeeSound "None"
	DeathSound "none"
	Decal "none"
    Speed 20
	States
	{
	Spawn:
		TNT1 A 4 BRIGHT
		Stop
	Death:
        TNT1 A 0 A_PlaySound("Trite/MeleeHit")
		TNT1 A 0 BRIGHT
		Stop
	}
    
}



ACTOR TriteAttack2: TriteAttack1
{
	+THRUGHOST
	+THRUSPECIES
	+MTHRUSPECIES
	+DONTHARMCLASS
	DamageType ImpFatalityMarine
    Damage 1 
}

actor TriteMarineFatalized: CurbstompedMarine
{
    States
    {
    Spawn:
XPL4 G 9100 
       Loop    
    }
}

//==========Mapper Notes

//The Web state is activated through the ACS fuction SetActorState
//and is used to lower the Trite to the floor as though it was on a web.
//(Note that this only really helps if it's spawned above the floor.)


//==========Credits
//Decorate: Ghastly_dragon
//Sprites: Monolith, Id Software
//Sprite Edit: Captain Toenail
//Sounds: Id Software
