class SpectralMonster : Actor
{
Default
{
Monster;
+SPECIAL
+SPECTRAL
+NOICEDEATH
}
override void Touch (Actor toucher)
{
toucher.DamageMobj (self, self, 5, 'Melee');
}
//============================================================================
void A_SpectreChunkSmall ()
{
Actor foo = Spawn("AlienChunkSmall", pos + (0, 0, 10), ALLOW_REPLACE);
if (foo != null)
{
int t;
t = random[SpectreChunk](0, 7);
foo.Vel.X = t - random[SpectreChunk](0, 15);
t = random[SpectreChunk](0, 7);
foo.Vel.Y = t - random[SpectreChunk](0, 15);
foo.Vel.Z = random[SpectreChunk](0, 15);
}
}
void A_SpectreChunkLarge ()
{
Actor foo = Spawn("AlienChunkLarge", pos + (0, 0, 10), ALLOW_REPLACE);
if (foo != null)
{
int t;
t = random[SpectreChunk](0, 7);
foo.Vel.X = t - random[SpectreChunk](0, 15);
t = random[SpectreChunk](0, 7);
foo.Vel.Y = t - random[SpectreChunk](0, 15);
foo.Vel.Z = random[SpectreChunk](0, 7);
}
}
void A_Spectre3Attack ()
{
if (target == null)
return;
Actor foo = Spawn("SpectralLightningV2", Pos + (0, 0, 32), ALLOW_REPLACE);
if (foo != null)
{
foo.Vel.Z = -12;
foo.target = self;
foo.FriendPlayer = 0;
foo.tracer = target;
}
Angle -= 90.;
for (int i = 0; i < 20; ++i)
{
Angle += 9.;
SpawnSubMissile ("SpectralLightningBall2", self);
}
Angle -= 90.;
}
//============================================================================
//
// A_SpotLightning
//
//============================================================================
void A_SpotLightning()
{
if (target == null) return;
Actor spot = Spawn("SpectralLightningSpot", (target.pos.xy, target.floorz), ALLOW_REPLACE);
if (spot != null)
{
spot.threshold = 25;
spot.target = self;
spot.FriendPlayer = 0;
spot.tracer = target;
}
}
}