Class Diabloist : Archvile
{
  Default
  {
    Obituary "%o was set ablaze by a Diabloist.";
    Health 1400;
    Radius 20;
    Height 56;
    Mass 500;
    Speed 15;
    PainChance 10;
    BloodColor "08 08 08";
    SeeSound "Monster/diasit";
    PainSound "Monster/diapai";
    DeathSound "Monster/diadth";
    ActiveSound "Monster/diaact";
    Monster;
    +FireResist
    +FloorClip
    +NoTarget
    +NoRadiusDmg
    +MissileMore
    +Boss
    +DontHarmClass
  }

  States
  {
  Spawn:
    DIAB AB 10 A_Look();
    Loop;
  See:
    DIAB AABBCCDDEEFF 2 A_Chase();
    Loop;
  Missile:
    DIAB G 0 Bright A_Jump(128, "Missile2");
    DIAB GH 3 Bright A_FaceTarget();
    DIAB I 3 A_SpawnProjectile("DFire", 32, 0, 0);
    DIAB HGHIHGHIHGHIGHI 3 Bright A_FaceTarget();
    DIAB G 0 Bright A_Jump(128, "Missile3");
    Goto See;
  Missile2:
    DIAB N 5 Bright A_FaceTarget();
    DIAB O 5 Bright A_SpawnProjectile("DFlare", 40, 0, Random(-4, 4));
    DIAB P 0 Bright A_FaceTarget();
    DIAB P 5 Bright A_SpawnProjectile("DFlare", 40, 0, Random(-4, 4));
    DIAB N 0 Bright A_FaceTarget();
    DIAB N 5 Bright A_SpawnProjectile("DFlare", 40, 0, Random(-4, 4));
    DIAB O 0 Bright A_FaceTarget();
    DIAB O 5 Bright A_SpawnProjectile("DFlare", 40, 0, Random(-4, 4));
    DIAB P 0 Bright A_FaceTarget();
    DIAB P 5 Bright A_SpawnProjectile("DFlare", 40, 0, Random(-4, 4));
    DIAB N 0 Bright A_FaceTarget();
    DIAB N 5 Bright A_SpawnProjectile("DFlare", 40, 0, Random(-4, 4));
    DIAB O 0 Bright A_FaceTarget();
    DIAB O 5 Bright A_SpawnProjectile("DFlare", 40, 0, Random(-4, 4));
    DIAB P 0 Bright A_FaceTarget();
    DIAB P 5 Bright A_SpawnProjectile("DFlare", 40, 0, Random(-4, 4));
    DIAB N 0 Bright A_FaceTarget();
    DIAB N 5 Bright A_SpawnProjectile("DFlare", 40, 0, Random(-4, 4));
    DIAB O 0 Bright A_FaceTarget();
    DIAB O 5 Bright A_SpawnProjectile("DFlare", 40, 0, Random(-4, 4));
    DIAB P 0 Bright A_FaceTarget();
    DIAB P 5 Bright A_SpawnProjectile("DFlare", 40, 0, Random(-4, 4));
    DIAB N 0 Bright A_FaceTarget();
    DIAB N 5 Bright A_SpawnProjectile("DFlare", 40, 0, Random(-4, 4));
    DIAB O 0 Bright A_FaceTarget();
    DIAB P 5 Bright;
    DIAB P 0 Bright A_Jump(64, "Missile3");
    DIAB P 0 Bright A_Jump(128, "Missile4");
    Goto See;
  Missile3:
    DIAB GHIJKLM 5 Bright A_FaceTarget();
    DIAB N 5 Bright A_FaceTarget();
    DIAB O 1 Bright A_Playsound ("weapons/firbfi");
    DIAB O 4 Bright A_SpawnProjectile ("DMissile",32,0,0);
    DIAB P 5 Bright;
    DIAB P 0 Bright A_Jump (128,"Missile4");
    Goto See;
  Missile4:
    DIA2 A 8 Bright A_FaceTarget();
    DIA2 B 8 Bright A_FaceTarget();
    DIA2 C 0 Bright A_SpawnProjectile ("DTracer",0,-40,0);
    DIA2 C 8 Bright A_SpawnProjectile ("DTracer",0, 40,0);
    Goto See;
  Pain:
    DIAB Q 5;
    DIAB Q 5 A_Pain();
    Goto See;
  Death:
    DIAB Q 7;
    DIAB R 7 A_Scream();
    DIAB S 7 A_NoBlocking();
    DIAB TUVW 7;
    DIAB XY 5;
    DIAB Z -1;
    Stop;
  }
}

Class DFire : Actor
{
  Default
  {
    Obituary "%o was set ablaze by a Diabloist.";
    Radius 0;
    Height 1;
    Speed 0;
    RenderStyle "Add";
    DamageType "Fire";
    Alpha 1.00;
    +NoGravity
    +SeekerMissile
    +NoTarget
    +NoDamageThrust
  }

  States
  {
  Spawn:
    HLFR A 2 Bright A_StartFire;
    HLFR BAB 2 Bright DiabolistFire(4);
    HLFR C 2 Bright DiabolistCrackle(4);
    HLFR B 2 Bright DiabolistFire(4);
    HLFR CBCDCDCDEDED 2 Bright DiabolistFire(5);
    HLFR E 2 Bright DiabolistCrackle(4);
    HLFR F 2 Bright DiabolistFire(4);
    HLFR EFE 2 Bright DiabolistFire(3);
    HLFR FGH 2 Bright DiabolistFire(2);
    HLFR GHGH 2 Bright DiabolistFire(1);
    Stop;
  }

  void DiabolistFire(int damage)
  {
    A_Explode(damage, 32);
    A_Fire();
  }

  void DiabolistCrackle(int damage)
  {
    A_Explode(damage, 32);
    A_FireCrackle();
  }
}

Class DFlare : Actor
{
  Default
  {
    Radius 5;
    Height 5;
    Speed 25;
    Damage 4;
    RenderStyle "Add";
    DamageType "Fire";
    Alpha 0.85;
    Obituary "%o was set ablaze by a Diabloist.";
    Seesound "weapons/firmfi";
    DeathSound "weapons/firex4";
    Projectile;
    +ThruGhost
  }

  States
  {
  Spawn:
    VBAL AB 3 Bright A_SpawnItemEx("MFlareFX", 0, 0, 0, 0, 0, 0, 0, 128);
    Loop;
  Death:
    CBAL CDEFG 3 Bright;
    Stop;
  }
}

Class DMissile : CFlameMissile
{
  Default
  {
    +ThruGhost
  }
}

Class DTracer : Actor
{
  Default
  {
    Radius 5;
    Height 5;
    Speed 15;
    ReactionTime 175;
    Damage 10;
    DamageType "Fire";
    RenderStyle "Add";
    Alpha 0.67;
    Obituary "%o was set ablaze by a Diabloist.";
    Seesound "weapons/diasht";
    DeathSound "weapons/firex3";
    Projectile;
    +SeekerMissile
    +FloorHugger
    +ThruGhost
    -NoGravity
  }

  States
  {
  Spawn:
    TNT1 A 1 Bright A_SeekerMissile(10, 15);
    TNT1 A 0 Bright A_Countdown();
    TNT1 A 0 Bright A_SpawnItemEx("DTracerPuff", 0, 0, 0, 0, 0, 0, 0, 128);
    Loop;
  Death:
    FTRA K 4 Bright;
    FTRA L 4 Bright A_Explode(64, 64);
    FTRA MNO 3 Bright;
    Stop;
  }
}

Class MFlareFX : Actor
{
  Default
  {
    Radius 0;
    Height 1;
    Speed 0;
    RenderStyle "Add";
    Alpha 0.67;
    Projectile;
  }

  States
  {
  Spawn:
    FDFX ABCDEF 4 Bright;
    Stop;
  }
}

Class DTracerPuff : Actor
{
  Default
  {
    Radius 1;
    Height 1;
    Speed 0;
    RenderStyle "Add";
    DamageType "Fire";
    Alpha 0.67;
    Projectile;
    +FloorHugger
    -NoGravity
  }

  States
  {
  Spawn:
    FTRA ABCDEFGHIJ 3 Bright A_Explode(4, 8);
    stop;
  }
}

Class DMissileTrail : CFlameFloor
{
  Default
  {
    +ThruGhost
  }
}

Class DMissileCircle : CircleFlame
{
  Default
  {
    +ThruGhost
  }
}

Class ZombieScientist2 : Actor
{
  Default
  {
    obituary "%o was prised open by a zombie scientist.";
    health 20;
    mass 90;
    speed 8;
    Radius 20;
    Height 52;
    painchance 200;
    seesound "grunt/sight";
    painsound "grunt/pain";
    deathsound "grunt/death";
    activesound "grunt/active";
    MONSTER;
    +FLOORCLIP
  }

  States
  {
   Spawn:
    SCZC AB 10 A_Look();
    loop;
  See:
    SCZC AABBCCDD 4 A_Chase();
    loop;
  Melee:
    SCZC E 8 A_FaceTarget();
    SCZC F 16 A_CustomMeleeAttack (random (2, 6) *5, "CrowbarHit", "skeleton/swing");
    SCZC E 4;
    goto See;
  Pain:
    SCZC G 3;
    SCZC G 3 A_Pain();
    goto See;
  Death:
    SCZC H 5;
    SCZC I 5 A_Scream();
    SCZC J 5 A_NoBlocking();
    SCZC K 5;
    SCZC L 5;
    SCZC M 5;
    SCZC N -1;
    stop;
  XDeath:
    SCZC O 5;
    SCZC P 5 A_XScream();
    SCZC Q 5 A_NoBlocking();
    SCZC RSTUV 5;
    SCZC W -1;
    stop;
  Raise:
    SCZC MLKJIH 5;
    goto See;
  }
}

