actor SSTRevenant : Revenant replaces Revenant
{
damagefactor "RedPaint", 0.3
damagefactor "OrangePaint", 0.3
damagefactor "YellowPaint", 0.3
damagefactor "GreenPaint", 0.3
damagefactor "BluePaint", 0.3
damagefactor "PurplePaint", 0.3
damagefactor "WhitePaint", 0.3
damagefactor "BlackPaint", 0.3
  PainChance "ShotgunWeak", 25

dropitem "RocketAmmo" 12 1 //formerly 8
  spawnid 20
  obituary "%o couldn't evade a revenant's fireball."
  hitobituary "%o was punched by a revenant."
  health 300
  radius 20
  height 56
  mass 500
  speed 10
  painchance 100
  seesound "skeleton/sight"
  painsound "skeleton/pain"
  deathsound "skeleton/death"
  activesound "skeleton/active"
  damagetype "rocket"
  MONSTER
  +FLOORCLIP
  +LONGMELEERANGE
  +MISSILEMORE
  xscale 0.9//1.0
  yscale 0.85
  states
  {
  Spawn:
    SKEL AB 10 A_Look
    loop
  See:
    SKEL AABBCCDDEEFF 2 A_Chase
    loop
  Melee:
    SKEL G 0 A_FaceTarget
    SKEL G 6 A_SkelWhoosh
    SKEL H 6 A_FaceTarget
    SKEL I 6 A_SkelFist
    goto See
  Missile:
    SKEL J 0 bright A_FaceTarget
    SKEL J 10 bright A_FaceTarget
    SKEL K 10 A_SkelMissile         // See RevenantTracer
    SKEL K 10 A_FaceTarget
    goto See
  Pain:
    SKEL L 5
    SKEL L 5 A_Pain
    goto See
  Death.Plasma:
	TNT1 A 0 A_Stop
    TNT1 A 0 ACS_ExecuteAlways(926,0, 10,0,0)
	NULL O 0 A_SpawnItemEx ("PlasmaDeathFX", 0,0,0, momx,momy,momz, 0, SXF_NOCHECKPOSITION|SXF_CLIENTSIDE|SXF_ABSOLUTEMOMENTUM)
	goto Death
  Death:
    SKEL L 0 A_Jump(128, "DeathB")
    SKEL LM 6
    SKEL N 6 A_Scream
    SKEL O 6 A_NoBlocking
    SKEL P 6
    SKEL Q -1
    stop
  DeathB:
    SKEL RS 4
    SKEL T 4 A_Scream
    SKEL U 4 A_NoBlocking
    SKEL VWX 4
    SKEL Y -1
    stop
  Raise:
    SKEL QPONML 5
    goto See

    Crush:
	TNT1 A 0 A_SpawnItemEx ("Gibs", 0,0,0, 0,0,0, 0, SXF_NOCHECKPOSITION|SXF_USEBLOODCOLOR|SXF_CLIENTSIDE)
	TNT1 AAAAAAAA 0 A_SpawnItemEx ("SuperDuperClientsideBloodSpotSpawner", 0,0,0, 0,0,0, 0, SXF_NOCHECKPOSITION|SXF_USEBLOODCOLOR|SXF_CLIENTSIDE)
    TNT1 AAAAAAAA 1 A_SpawnItemEx ("Bloodsquirt3", 0,0,0, 0,0,0, random(-180,180), SXF_USEBLOODCOLOR|SXF_CLIENTSIDE|SXF_NOCHECKPOSITION)
    TNT1 A -1
    Stop
  Pain.GreenPaint:
    TNT1 A 0 ACS_ExecuteAlways(926,0, 0,0,0)
	Goto See
  Pain.BluePaint:
    TNT1 A 0 ACS_ExecuteAlways(926,0, 1,0,0)
	Goto See
  Pain.RedPaint:
    TNT1 A 0 ACS_ExecuteAlways(926,0, 2,0,0)
	Goto See
  Pain.OrangePaint:
    TNT1 A 0 ACS_ExecuteAlways(926,0, 3,0,0)
	Goto See
  Pain.PurplePaint:
    TNT1 A 0 ACS_ExecuteAlways(926,0, 4,0,0)
	Goto See
  Pain.WhitePaint:
    TNT1 A 0 ACS_ExecuteAlways(926,0, 5,0,0)
	Goto See
  Pain.YellowPaint:
    TNT1 A 0 ACS_ExecuteAlways(926,0, 6,0,0)
	Goto See
  Pain.BlackPaint:
    TNT1 A 0 ACS_ExecuteAlways(926,0, 7,0,0)
	Goto See
  }
}

actor SSTRevenantTracer : RevenantTracer replaces RevenantTracer
{
  Game Doom
  SpawnID 53
  Radius 11
  Height 8
  Speed 10
  Damage 8
  Projectile 
  +SEEKERMISSILE 
  +RANDOMIZE
	+FORCEXYBILLBOARD
  SeeSound "skeleton/attack"
  DeathSound "skeleton/tracex"
  RenderStyle Add
  damagetype "rocket"
  reactiontime 13
  States
  {
  Spawn:
	FBXP A 0
	FBXP A 0 A_Jump(176,"NonHoming")
    FATB B 1 bright
	Goto Homing
  Homing:
    FATB AB 1 bright A_Tracer   // See RevenantTracerSmoke
    FATB A 0 A_PlaySoundEx ("sidewinder", soundslot6, 1)
    loop
  NonHoming:
	TNT1 A 0 A_ChangeVelocity(momx*2,momy*2,momz*2, CVF_REPLACE)
    FATB ABABABABABAB 1 bright A_SpawnItemEx("revenantrockettrail", random(-4,4), random(-4,4), random(-4,4), 0,0,0, 0, 160)
	FBXP A 0 A_Jump(80,"Boosted")
    FATB ABABABABABAB 1 bright A_SpawnItemEx("revenantrockettrail", random(-3,3), random(-3,3), random(-3,3), 0,0,0, 0, 160)
	FBXP A 0 A_Jump(64,"Boosted")
    FATB AB 1 bright A_SpawnItemEx("revenantrockettrail", random(-2,2), random(-2,2), random(-2,2), 0,0,0 , 0, 160)
  NonHomingLoop:
    FATB AB 1 bright A_SpawnItemEx("revenantrockettrail", random(-2,2), random(-2,2), random(-2,2), random(-1,1), random(-1,1), random(-1,1), 0, 160)
    loop
  Boosted:
    FATB A 0 A_PlaySoundEx ("rocket/screech", soundslot6, 0)
  	NULL A 0 A_SpawnItemEx ("RocketSource", 0,0,0, 0,0,0, 0, 160) 
	TNT1 A 0 A_ChangeVelocity(momx*1.5,momy*1.5,momz*1.5, CVF_REPLACE)
  BoostedLoop:
    FATB A 1 bright
	NULL A 0 A_CustomMissile("RocketSmokeTrail1", random(0,4), 0, 0, 2, momz*2)//A_SpawnItemEx ("RocketSmokeTrail1", 0, random(0,4), 0, 2, 0, 0, 0, SXF_NOCHECKPOSITION|SXF_CLIENTSIDE|SXF_TRANSFERPITCH) //A_CustomMissile("RocketSmokeTrail1", 0, 0, 0, 2, pitch)
    FATB A 1 bright
	NULL A 0 A_CustomMissile("RocketSmokeTrail1", 0, random(0,4), 0, 2, momz*2)//A_SpawnItemEx ("RocketSmokeTrail1", 0, 0, random(0,4), 2, 0, 0, 0, SXF_NOCHECKPOSITION|SXF_CLIENTSIDE|SXF_TRANSFERPITCH) 
    FATB B 1 bright
	NULL A 0 A_CustomMissile("RocketSmokeTrail1", random(-4,0), 0, 0, 2, momz*2)//A_SpawnItemEx ("RocketSmokeTrail1", 0, random(-4,0), 0, 2, 0, 0, 0, SXF_NOCHECKPOSITION|SXF_CLIENTSIDE|SXF_TRANSFERPITCH) 
    FATB B 1 bright
	NULL A 0 A_CustomMissile("RocketSmokeTrail1", 0, random(-4,0), 0, 2, momz*2)//A_SpawnItemEx ("RocketSmokeTrail1", 0, 0, random(-4,0), 2, 0, 0, 0, SXF_NOCHECKPOSITION|SXF_CLIENTSIDE|SXF_TRANSFERPITCH) 
	
	TNT1 A 0 A_SetAngle(angle+random(-5,5))
	TNT1 A 0 A_SetPitch(pitch+random(-5,5))
	TNT1 A 0 A_ChangeVelocity(cos(pitch) * 30, 0, (-sin(pitch) * 30)+velz, CVF_RELATIVE|CVF_REPLACE)
    // THANKS TDRR for help with my maths!
	TNT1 A 0 A_CountDown
	loop
  Death:
	FBXP AA 0 A_StopsoundEx(soundslot6)
    FBXP A 1 bright
    NULL A 0 A_SpawnItemEx ("RocketEcho", 0,0,0, 0,0,0, 0, 160)
	NULL A 0 A_SpawnItemEx ("PowEffectSpawner", 0, 0, 0, 0, 0, 0, 0, 160) 
    FBXP A 5 bright
    FBXP B 4 bright
    FBXP C 2 bright
    stop
  }
}

actor SSTRevenantTracerSmoke replaces RevenantTracerSmoke
{
  +NOBLOCKMAP
  +NOGRAVITY
  +NOTELEPORT
  RenderStyle None
  vspeed 0
  States
  {	
  Spawn:
    SMOK A 0
	TNT1 A 0 A_SpawnItemEx("SSTRevenantTracerSmoke2", 0,0,0, 0,0,0, 0, SXF_NOCHECKPOSITION|SXF_CLIENTSIDE)//SXF_ABSOLUTEMOMENTUM|
    Stop
  }
}

actor SSTRevenantTracerSmoke2 //replaces RevenantTracerSmoke//: RevenantTracerSmoke
{
  +NOBLOCKMAP
  +NOGRAVITY
  +NOTELEPORT
	+FORCEXYBILLBOARD
  RenderStyle Translucent 
  Alpha 0.2
  scale 0.22//0.25
  vspeed 0
  States
  {	
  Spawn:
    SMOK A 0
    SMOK A 0 A_Stop
    SMOK A 0 Thing_ChangeTID (0, 1330) 
	SMOK AABBCCDDEEFFGGH 3 BRIGHT
	SMOK HIIJJKKLLMMNNOOPPQQ 3 BRIGHT A_Fadeout(0.01) //4
    Stop
  }
}
ACTOR revenantrockettrail
{
	+NOTELEPORT
  Translation "112:127=212:223"
   Radius 1
   Height 1
   Speed 0
   Damage 0
   PROJECTILE
	+FORCEXYBILLBOARD
   RENDERSTYLE ADD
   ALPHA 0.22
   Scale 0.25
   States
   {
   Spawn:
    TNT1 A 0
	TNT1 A 1 Thing_ChangeTID (0, 1330)
	FIR3 AABBCCDDEE 1 Bright A_Fadeout(0.02)
	FIR3 FFGGHHII 1 Bright A_ChangeVelocity(momx*0.5,momy*0.5,momz*0.5, CVF_REPLACE)
	Stop
   }
}
