2016-10-17 10:58:23 +00:00
|
|
|
|
|
|
|
// Ironlich -----------------------------------------------------------------
|
|
|
|
|
|
|
|
class Ironlich : Actor
|
|
|
|
{
|
|
|
|
Default
|
|
|
|
{
|
|
|
|
Health 700;
|
|
|
|
Radius 40;
|
|
|
|
Height 72;
|
|
|
|
Mass 325;
|
|
|
|
Speed 6;
|
|
|
|
Painchance 32;
|
|
|
|
Monster;
|
|
|
|
+NOBLOOD
|
|
|
|
+DONTMORPH
|
|
|
|
+DONTSQUASH
|
|
|
|
+BOSSDEATH
|
|
|
|
SeeSound "ironlich/sight";
|
|
|
|
AttackSound "ironlich/attack";
|
|
|
|
PainSound "ironlich/pain";
|
|
|
|
DeathSound "ironlich/death";
|
|
|
|
ActiveSound "ironlich/active";
|
|
|
|
Obituary "$OB_IRONLICH";
|
|
|
|
HitObituary "$OB_IRONLICHHIT";
|
2018-06-24 10:31:55 +00:00
|
|
|
Tag "$FN_IRONLICH";
|
2016-10-17 10:58:23 +00:00
|
|
|
DropItem "BlasterAmmo", 84, 10;
|
|
|
|
DropItem "ArtiEgg", 51, 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
States
|
|
|
|
{
|
|
|
|
Spawn:
|
|
|
|
LICH A 10 A_Look;
|
|
|
|
Loop;
|
|
|
|
See:
|
|
|
|
LICH A 4 A_Chase;
|
|
|
|
Loop;
|
|
|
|
Missile:
|
|
|
|
LICH A 5 A_FaceTarget;
|
|
|
|
LICH B 20 A_LichAttack;
|
|
|
|
Goto See;
|
|
|
|
Pain:
|
|
|
|
LICH A 4;
|
|
|
|
LICH A 4 A_Pain;
|
|
|
|
Goto See;
|
|
|
|
Death:
|
|
|
|
LICH C 7;
|
|
|
|
LICH D 7 A_Scream;
|
|
|
|
LICH EF 7;
|
|
|
|
LICH G 7 A_NoBlocking;
|
|
|
|
LICH H 7;
|
|
|
|
LICH I -1 A_BossDeath;
|
|
|
|
Stop;
|
|
|
|
}
|
2016-11-23 20:26:59 +00:00
|
|
|
|
|
|
|
//----------------------------------------------------------------------------
|
|
|
|
//
|
|
|
|
// PROC A_LichAttack
|
|
|
|
//
|
|
|
|
//----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
void A_LichAttack ()
|
|
|
|
{
|
|
|
|
static const int atkResolve1[] = { 50, 150 };
|
|
|
|
static const int atkResolve2[] = { 150, 200 };
|
|
|
|
|
|
|
|
// Ice ball (close 20% : far 60%)
|
|
|
|
// Fire column (close 40% : far 20%)
|
|
|
|
// Whirlwind (close 40% : far 20%)
|
|
|
|
// Distance threshold = 8 cells
|
|
|
|
|
2017-06-06 07:12:23 +00:00
|
|
|
let targ = target;
|
|
|
|
if (targ == null)
|
2016-11-23 20:26:59 +00:00
|
|
|
{
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
A_FaceTarget ();
|
|
|
|
if (CheckMeleeRange ())
|
|
|
|
{
|
|
|
|
int damage = random[LichAttack](1, 8) * 6;
|
2017-06-06 07:12:23 +00:00
|
|
|
int newdam = targ.DamageMobj (self, self, damage, 'Melee');
|
|
|
|
targ.TraceBleed (newdam > 0 ? newdam : damage, self);
|
2016-11-23 20:26:59 +00:00
|
|
|
return;
|
|
|
|
}
|
2017-06-06 07:12:23 +00:00
|
|
|
int dist = Distance2D(targ) > 8 * 64;
|
2016-11-23 20:26:59 +00:00
|
|
|
int randAttack = random[LichAttack]();
|
|
|
|
if (randAttack < atkResolve1[dist])
|
|
|
|
{ // Ice ball
|
2017-06-06 07:12:23 +00:00
|
|
|
SpawnMissile (targ, "HeadFX1");
|
2020-01-04 13:15:32 +00:00
|
|
|
A_StartSound ("ironlich/attack2", CHAN_BODY);
|
2016-11-23 20:26:59 +00:00
|
|
|
}
|
|
|
|
else if (randAttack < atkResolve2[dist])
|
|
|
|
{ // Fire column
|
2017-06-06 07:12:23 +00:00
|
|
|
Actor baseFire = SpawnMissile (targ, "HeadFX3");
|
2016-11-23 20:26:59 +00:00
|
|
|
if (baseFire != null)
|
|
|
|
{
|
|
|
|
baseFire.SetStateLabel("NoGrow");
|
|
|
|
for (int i = 0; i < 5; i++)
|
|
|
|
{
|
|
|
|
Actor fire = Spawn("HeadFX3", baseFire.Pos, ALLOW_REPLACE);
|
|
|
|
if (i == 0)
|
|
|
|
{
|
2020-01-04 13:15:32 +00:00
|
|
|
A_StartSound ("ironlich/attack1", CHAN_BODY);
|
2016-11-23 20:26:59 +00:00
|
|
|
}
|
2016-12-31 14:40:16 +00:00
|
|
|
if (fire != null)
|
|
|
|
{
|
|
|
|
fire.target = baseFire.target;
|
|
|
|
fire.angle = baseFire.angle;
|
|
|
|
fire.Vel = baseFire.Vel;
|
|
|
|
fire.SetDamage(0);
|
|
|
|
fire.health = (i+1) * 2;
|
|
|
|
fire.CheckMissileSpawn (radius);
|
|
|
|
}
|
2016-11-23 20:26:59 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{ // Whirlwind
|
2017-06-06 07:12:23 +00:00
|
|
|
Actor mo = SpawnMissile (targ, "Whirlwind");
|
2016-11-23 20:26:59 +00:00
|
|
|
if (mo != null)
|
|
|
|
{
|
|
|
|
mo.AddZ(-32);
|
2017-06-06 07:12:23 +00:00
|
|
|
mo.tracer = targ;
|
2016-11-23 20:26:59 +00:00
|
|
|
mo.health = 20*TICRATE; // Duration
|
2020-01-04 13:15:32 +00:00
|
|
|
A_StartSound ("ironlich/attack3", CHAN_BODY);
|
2016-11-23 20:26:59 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2016-10-17 10:58:23 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// Head FX 1 ----------------------------------------------------------------
|
|
|
|
|
|
|
|
class HeadFX1 : Actor
|
|
|
|
{
|
|
|
|
Default
|
|
|
|
{
|
|
|
|
Radius 12;
|
|
|
|
Height 6;
|
|
|
|
Speed 13;
|
|
|
|
FastSpeed 20;
|
|
|
|
Damage 1;
|
|
|
|
Projectile;
|
|
|
|
-ACTIVATEIMPACT
|
|
|
|
-ACTIVATEPCROSS
|
|
|
|
+THRUGHOST
|
2017-06-01 18:03:51 +00:00
|
|
|
+ZDOOMTRANS
|
2016-10-17 10:58:23 +00:00
|
|
|
RenderStyle "Add";
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
States
|
|
|
|
{
|
|
|
|
Spawn:
|
|
|
|
FX05 ABC 6 BRIGHT;
|
|
|
|
Loop;
|
|
|
|
Death:
|
|
|
|
FX05 D 5 BRIGHT A_LichIceImpact;
|
|
|
|
FX05 EFG 5 BRIGHT;
|
|
|
|
Stop;
|
|
|
|
}
|
2016-11-23 20:26:59 +00:00
|
|
|
|
|
|
|
//----------------------------------------------------------------------------
|
|
|
|
//
|
|
|
|
// PROC A_LichIceImpact
|
|
|
|
//
|
|
|
|
//----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
void A_LichIceImpact()
|
|
|
|
{
|
|
|
|
for (int i = 0; i < 8; i++)
|
|
|
|
{
|
|
|
|
Actor shard = Spawn("HeadFX2", Pos, ALLOW_REPLACE);
|
2016-12-31 14:40:16 +00:00
|
|
|
if (shard != null)
|
|
|
|
{
|
|
|
|
shard.target = target;
|
|
|
|
shard.angle = i*45.;
|
|
|
|
shard.VelFromAngle();
|
|
|
|
shard.Vel.Z = -.6;
|
|
|
|
shard.CheckMissileSpawn (radius);
|
|
|
|
}
|
2016-11-23 20:26:59 +00:00
|
|
|
}
|
|
|
|
}
|
2016-10-17 10:58:23 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// Head FX 2 ----------------------------------------------------------------
|
|
|
|
|
|
|
|
class HeadFX2 : Actor
|
|
|
|
{
|
|
|
|
Default
|
|
|
|
{
|
|
|
|
Radius 12;
|
|
|
|
Height 6;
|
|
|
|
Speed 8;
|
|
|
|
Damage 3;
|
|
|
|
Projectile;
|
|
|
|
-ACTIVATEIMPACT
|
|
|
|
-ACTIVATEPCROSS
|
2017-06-01 18:03:51 +00:00
|
|
|
+ZDOOMTRANS
|
2016-10-17 10:58:23 +00:00
|
|
|
RenderStyle "Add";
|
|
|
|
}
|
|
|
|
|
|
|
|
States
|
|
|
|
{
|
|
|
|
Spawn:
|
|
|
|
FX05 HIJ 6 BRIGHT;
|
|
|
|
Loop;
|
|
|
|
Death:
|
|
|
|
FX05 DEFG 5 BRIGHT;
|
|
|
|
Stop;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// Head FX 3 ----------------------------------------------------------------
|
|
|
|
|
|
|
|
class HeadFX3 : Actor
|
|
|
|
{
|
|
|
|
Default
|
|
|
|
{
|
|
|
|
Radius 14;
|
|
|
|
Height 12;
|
|
|
|
Speed 10;
|
|
|
|
FastSpeed 18;
|
|
|
|
Damage 5;
|
|
|
|
Projectile;
|
|
|
|
+WINDTHRUST
|
2017-06-01 18:03:51 +00:00
|
|
|
+ZDOOMTRANS
|
2016-10-17 10:58:23 +00:00
|
|
|
-ACTIVATEIMPACT
|
|
|
|
-ACTIVATEPCROSS
|
|
|
|
-NOBLOCKMAP
|
|
|
|
RenderStyle "Add";
|
|
|
|
}
|
|
|
|
|
|
|
|
States
|
|
|
|
{
|
|
|
|
Spawn:
|
|
|
|
FX06 ABC 4 BRIGHT A_LichFireGrow;
|
|
|
|
Loop;
|
|
|
|
NoGrow:
|
|
|
|
FX06 ABC 5 BRIGHT;
|
|
|
|
Loop;
|
|
|
|
Death:
|
|
|
|
FX06 DEFG 5 BRIGHT;
|
|
|
|
Stop;
|
|
|
|
}
|
2016-11-23 20:26:59 +00:00
|
|
|
|
|
|
|
//----------------------------------------------------------------------------
|
|
|
|
//
|
|
|
|
// PROC A_LichFireGrow
|
|
|
|
//
|
|
|
|
//----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
void A_LichFireGrow ()
|
|
|
|
{
|
|
|
|
health--;
|
|
|
|
AddZ(9.);
|
|
|
|
if (health == 0)
|
|
|
|
{
|
|
|
|
RestoreDamage();
|
|
|
|
SetStateLabel("NoGrow");
|
|
|
|
}
|
|
|
|
}
|
2016-10-17 10:58:23 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// Whirlwind ----------------------------------------------------------------
|
|
|
|
|
2016-11-23 20:26:59 +00:00
|
|
|
class Whirlwind : Actor
|
2016-10-17 10:58:23 +00:00
|
|
|
{
|
|
|
|
Default
|
|
|
|
{
|
|
|
|
Radius 16;
|
|
|
|
Height 74;
|
|
|
|
Speed 10;
|
|
|
|
Damage 1;
|
|
|
|
Projectile;
|
|
|
|
-ACTIVATEIMPACT
|
|
|
|
-ACTIVATEMCROSS
|
|
|
|
+SEEKERMISSILE
|
|
|
|
+EXPLOCOUNT
|
|
|
|
+StepMissile
|
|
|
|
RenderStyle "Translucent";
|
|
|
|
DefThreshold 60;
|
|
|
|
Threshold 50;
|
|
|
|
Alpha 0.4;
|
|
|
|
}
|
|
|
|
|
|
|
|
States
|
|
|
|
{
|
|
|
|
Spawn:
|
|
|
|
FX07 DEFG 3;
|
|
|
|
FX07 ABC 3 A_WhirlwindSeek;
|
|
|
|
Goto Spawn+4;
|
|
|
|
Death:
|
|
|
|
FX07 GFED 4;
|
|
|
|
Stop;
|
|
|
|
}
|
2016-11-23 20:26:59 +00:00
|
|
|
|
|
|
|
override int DoSpecialDamage (Actor target, int damage, Name damagetype)
|
|
|
|
{
|
|
|
|
int randVal;
|
|
|
|
|
|
|
|
if (!target.bDontThrust)
|
|
|
|
{
|
|
|
|
target.angle += Random2[WhirlwindDamage]() * (360 / 4096.);
|
|
|
|
target.Vel.X += Random2[WhirlwindDamage]() / 64.;
|
|
|
|
target.Vel.Y += Random2[WhirlwindDamage]() / 64.;
|
|
|
|
}
|
|
|
|
|
2019-01-28 17:42:56 +00:00
|
|
|
if ((Level.maptime & 16) && !target.bBoss && !target.bDontThrust)
|
2016-11-23 20:26:59 +00:00
|
|
|
{
|
|
|
|
randVal = min(160, random[WhirlwindSeek]());
|
|
|
|
target.Vel.Z += randVal / 32.;
|
|
|
|
if (target.Vel.Z > 12)
|
|
|
|
{
|
|
|
|
target.Vel.Z = 12;
|
|
|
|
}
|
|
|
|
}
|
2019-01-28 17:42:56 +00:00
|
|
|
if (!(Level.maptime & 7))
|
2016-11-23 20:26:59 +00:00
|
|
|
{
|
|
|
|
target.DamageMobj (null, target, 3, 'Melee');
|
|
|
|
}
|
|
|
|
return -1;
|
|
|
|
}
|
|
|
|
|
|
|
|
//----------------------------------------------------------------------------
|
|
|
|
//
|
|
|
|
// PROC A_WhirlwindSeek
|
|
|
|
//
|
|
|
|
//----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
void A_WhirlwindSeek()
|
|
|
|
{
|
|
|
|
|
|
|
|
health -= 3;
|
|
|
|
if (health < 0)
|
|
|
|
{
|
|
|
|
Vel = (0,0,0);
|
|
|
|
SetStateLabel("Death");
|
|
|
|
bMissile = false;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
if ((threshold -= 3) < 0)
|
|
|
|
{
|
2018-12-21 11:32:36 +00:00
|
|
|
threshold = random[WhirlwindSeek](58, 89);
|
2020-01-04 13:15:32 +00:00
|
|
|
A_StartSound("ironlich/attack3", CHAN_BODY);
|
2016-11-23 20:26:59 +00:00
|
|
|
}
|
|
|
|
if (tracer && tracer.bShadow)
|
|
|
|
{
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
A_SeekerMissile(10, 30);
|
|
|
|
}
|
|
|
|
|
2016-10-17 10:58:23 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2016-11-23 20:26:59 +00:00
|
|
|
|