Actor Trite replaces PainElemental
{
//$Category Monsters
  HitObituary "%o was nipped by a Trite"
Tag "Trite"	
  Health 15
  Radius 19
  Height 23
  Mass 100
  Speed 6
  Scale .5
  //-TELESTOMP
	//-NOTELEFRAG
//	+NOTELESTOMP
	//+TELESTOMP
	bloodtype "GreenBloodTrails"
  PainChance 192
  BloodColor DarkGreen
  PainSound "Trite/Pain"
  DamageFactor "Blood", 0.0 DamageFactor "BlueBlood", 0.0 DamageFactor "GreenBlood", 0.0
	damagefactor "killme", 0.0
	damagefactor "Avoid", 0.0
  SeeSound "Trite/Sight"
  DeathSound "Trite/Death"
  ActiveSound "Trite/Active"
  MeleeSound "Trite/MeleeHit"
  MeleeDamage 2
  MeleeThreshold 64
  MaxTargetRange 160
  MinMissileChance 10
  Damage (random(15,15))
  Monster
  +FloorClip
Species "FlyingBalls"
  +DontHurtSpecies
  +DONTHARMSPECIES
  +NOBLOCKMONST
  +THRUSPECIES
  +NoTarget
  States
  {
 ReplaceVanilla:
		TNT1 A 0 A_ChangeFlag("THRUACTORS", 1)
		TNT1 A 0 A_ChangeFlag("COUNTKILL", 0)
		TNT1 A 0 A_SpawnItemEx ("Vanilla_Trite",0,0,0,0,0,0,0,SXF_NOCHECKPOSITION |SXF_TRANSFERSPECIAL| SXF_TRANSFERAMBUSHFLAG ,0)
		Stop
  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))
	//TNT1 A 0 A_CustomMissile ("GreenXDeath1", 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 (random(15,15))
	+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 (random(15,15)) 
}

actor TriteMarineFatalized: CurbstompedMarine
{
    States
    {
    Spawn:
XPL4 G 9100 
       Loop    }}
ACTOR HellWarrior: Trite 
{}
///////////////////////////======VANILLA======//////////////////////////////////

Actor Vanilla_Trite : Trite
{
	DropItem "DemonStrengthRune" 8
	States
	{
		Spawn:
		TRIT A 1 A_Look
	}
}

//==========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
