mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-10 23:01:50 +00:00
- Fixed: Macil2 and the Oracle need to be immune to SpectralLightningV2 as well as V1, since
they are both created by the first-stage Sigil. AlienSpectre3 should have also been immune to them but was not. In addition, Macil1 was erroneously immune to V1, when he should not be immune to any spectral damage. (Though, since he's immortal, all that really amounts to is that he can enter his pain state.) SVN r2106 (trunk)
This commit is contained in:
parent
74a7293133
commit
6ba548511b
10 changed files with 80 additions and 18 deletions
|
@ -982,6 +982,7 @@ inline AActor *Spawn (const PClass *type, fixed_t x, fixed_t y, fixed_t z, repla
|
|||
}
|
||||
|
||||
AActor *Spawn (const char *type, fixed_t x, fixed_t y, fixed_t z, replace_t allowreplacement);
|
||||
AActor *Spawn (FName classname, fixed_t x, fixed_t y, fixed_t z, replace_t allowreplacement);
|
||||
|
||||
template<class T>
|
||||
inline T *Spawn (fixed_t x, fixed_t y, fixed_t z, replace_t allowreplacement)
|
||||
|
|
|
@ -13,6 +13,20 @@
|
|||
#include "doomstat.h"
|
||||
*/
|
||||
|
||||
class AAlienSpectre1 : public ASpectralMonster
|
||||
{
|
||||
DECLARE_CLASS (AAlienSpectre1, ASpectralMonster)
|
||||
};
|
||||
IMPLEMENT_CLASS(AAlienSpectre1);
|
||||
|
||||
class AAlienSpectre3 : public AAlienSpectre1
|
||||
{
|
||||
DECLARE_CLASS (AAlienSpectre3, AAlienSpectre1)
|
||||
public:
|
||||
int TakeSpecialDamage (AActor *inflictor, AActor *source, int damage, FName damagetype);
|
||||
};
|
||||
IMPLEMENT_CLASS(AAlienSpectre3);
|
||||
|
||||
static FRandom pr_spectrespawn ("AlienSpectreSpawn");
|
||||
static FRandom pr_spectrechunk ("212e4");
|
||||
|
||||
|
@ -190,3 +204,23 @@ DEFINE_ACTION_FUNCTION(AActor, A_AlienSpectreDeath)
|
|||
S_Sound (CHAN_VOICE, voc, 1, ATTN_NORM);
|
||||
player->player->SetLogNumber (log);
|
||||
}
|
||||
|
||||
//============================================================================
|
||||
//
|
||||
// AAlienSpetre3 :: TakeSpecialDamage
|
||||
//
|
||||
// The third spectre type (the Oracle's) is invulnerable to the first stage
|
||||
// Sigil, just like the Oracle.
|
||||
//
|
||||
//============================================================================
|
||||
|
||||
int AAlienSpectre3::TakeSpecialDamage (AActor *inflictor, AActor *source, int damage, FName damagetype)
|
||||
{
|
||||
if (inflictor != NULL)
|
||||
{
|
||||
FName name = inflictor->GetClass()->TypeName;
|
||||
if (name == NAME_SpectralLightningV1 || name == NAME_SpectralLightningV2)
|
||||
return -1;
|
||||
}
|
||||
return Super::TakeSpecialDamage(inflictor, source, damage, damagetype);
|
||||
}
|
||||
|
|
|
@ -7,29 +7,41 @@
|
|||
#include "a_strifeglobal.h"
|
||||
*/
|
||||
|
||||
// Macil (version 2) ---------------------------------------------------------
|
||||
// Macil (version 1) ---------------------------------------------------------
|
||||
|
||||
class AMacil1 : public AActor
|
||||
{
|
||||
DECLARE_CLASS (AMacil1, AActor)
|
||||
};
|
||||
|
||||
IMPLEMENT_CLASS (AMacil1)
|
||||
|
||||
// Macil (version 2) ---------------------------------------------------------
|
||||
|
||||
class AMacil2 : public AMacil1
|
||||
{
|
||||
DECLARE_CLASS (AMacil2, AMacil1)
|
||||
public:
|
||||
int TakeSpecialDamage (AActor *inflictor, AActor *source, int damage, FName damagetype);
|
||||
};
|
||||
|
||||
IMPLEMENT_CLASS (AMacil1)
|
||||
IMPLEMENT_CLASS (AMacil2)
|
||||
|
||||
//============================================================================
|
||||
//
|
||||
// AMacil2 :: TakeSpecialDamage
|
||||
//
|
||||
// Macil is invulnerable to the first stage Sigil.
|
||||
// Macil2 is invulnerable to the first stage Sigil.
|
||||
//
|
||||
//============================================================================
|
||||
|
||||
int AMacil1::TakeSpecialDamage (AActor *inflictor, AActor *source, int damage, FName damagetype)
|
||||
int AMacil2::TakeSpecialDamage (AActor *inflictor, AActor *source, int damage, FName damagetype)
|
||||
{
|
||||
if (inflictor != NULL && inflictor->GetClass()->TypeName == NAME_SpectralLightningV1)
|
||||
return -1;
|
||||
|
||||
if (inflictor != NULL)
|
||||
{
|
||||
FName name = inflictor->GetClass()->TypeName;
|
||||
if (name == NAME_SpectralLightningV1 || name == NAME_SpectralLightningV2)
|
||||
return -1;
|
||||
}
|
||||
return Super::TakeSpecialDamage(inflictor, source, damage, damagetype);
|
||||
}
|
||||
|
|
|
@ -42,7 +42,11 @@ DEFINE_ACTION_FUNCTION(AActor, A_WakeOracleSpectre)
|
|||
|
||||
int AOracle::TakeSpecialDamage (AActor *inflictor, AActor *source, int damage, FName damagetype)
|
||||
{
|
||||
if (inflictor != NULL && inflictor->GetClass()->TypeName == NAME_SpectralLightningV1)
|
||||
return -1;
|
||||
if (inflictor != NULL)
|
||||
{
|
||||
FName name = inflictor->GetClass()->TypeName;
|
||||
if (name == NAME_SpectralLightningV1 || name == NAME_SpectralLightningV2)
|
||||
return -1;
|
||||
}
|
||||
return Super::TakeSpecialDamage(inflictor, source, damage, damagetype);
|
||||
}
|
||||
|
|
|
@ -64,14 +64,14 @@ DEFINE_ACTION_FUNCTION(AActor, A_SpectralLightning)
|
|||
x = self->x + pr_zap5.Random2(3) * FRACUNIT * 50;
|
||||
y = self->y + pr_zap5.Random2(3) * FRACUNIT * 50;
|
||||
|
||||
flash = Spawn (self->threshold > 25 ? PClass::FindClass("SpectralLightningV2") :
|
||||
PClass::FindClass("SpectralLightningV1"), x, y, ONCEILINGZ, ALLOW_REPLACE);
|
||||
flash = Spawn (self->threshold > 25 ? PClass::FindClass(NAME_SpectralLightningV2) :
|
||||
PClass::FindClass(NAME_SpectralLightningV1), x, y, ONCEILINGZ, ALLOW_REPLACE);
|
||||
|
||||
flash->target = self->target;
|
||||
flash->velz = -18*FRACUNIT;
|
||||
flash->health = self->health;
|
||||
|
||||
flash = Spawn("SpectralLightningV2", self->x, self->y, ONCEILINGZ, ALLOW_REPLACE);
|
||||
flash = Spawn(NAME_SpectralLightningV2, self->x, self->y, ONCEILINGZ, ALLOW_REPLACE);
|
||||
|
||||
flash->target = self->target;
|
||||
flash->velz = -18*FRACUNIT;
|
||||
|
|
|
@ -21,6 +21,7 @@
|
|||
|
||||
// Include all the other Strife stuff here to reduce compile time
|
||||
#include "a_acolyte.cpp"
|
||||
#include "a_spectral.cpp"
|
||||
#include "a_alienspectres.cpp"
|
||||
#include "a_coin.cpp"
|
||||
#include "a_crusader.cpp"
|
||||
|
@ -33,7 +34,6 @@
|
|||
#include "a_reaver.cpp"
|
||||
#include "a_rebels.cpp"
|
||||
#include "a_sentinel.cpp"
|
||||
#include "a_spectral.cpp"
|
||||
#include "a_stalker.cpp"
|
||||
#include "a_strifeitems.cpp"
|
||||
#include "a_strifeweapons.cpp"
|
||||
|
|
|
@ -153,6 +153,7 @@ xx(Mauler)
|
|||
|
||||
xx(AcolyteBlue)
|
||||
xx(SpectralLightningV1)
|
||||
xx(SpectralLightningV2)
|
||||
xx(TeleportDest)
|
||||
xx(TeleportDest2)
|
||||
|
||||
|
|
|
@ -3674,11 +3674,21 @@ AActor *AActor::StaticSpawn (const PClass *type, fixed_t ix, fixed_t iy, fixed_t
|
|||
|
||||
AActor *Spawn (const char *type, fixed_t x, fixed_t y, fixed_t z, replace_t allowreplacement)
|
||||
{
|
||||
const PClass *cls = PClass::FindClass(type);
|
||||
if (cls == NULL)
|
||||
FName classname(type, true);
|
||||
if (classname == NAME_None)
|
||||
{
|
||||
I_Error("Attempt to spawn actor of unknown type '%s'\n", type);
|
||||
}
|
||||
return Spawn(classname, x, y, z, allowreplacement);
|
||||
}
|
||||
|
||||
AActor *Spawn (FName classname, fixed_t x, fixed_t y, fixed_t z, replace_t allowreplacement)
|
||||
{
|
||||
const PClass *cls = PClass::FindClass(classname);
|
||||
if (cls == NULL)
|
||||
{
|
||||
I_Error("Attempt to spawn actor of unknown type '%s'\n", classname.GetChars());
|
||||
}
|
||||
return AActor::StaticSpawn (cls, x, y, z, allowreplacement);
|
||||
}
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
|
||||
// Alien Spectre 1 -----------------------------------------------------------
|
||||
|
||||
ACTOR AlienSpectre1 : SpectralMonster 129
|
||||
ACTOR AlienSpectre1 : SpectralMonster 129 native
|
||||
{
|
||||
Game Strife
|
||||
ConversationID 67,-1,-1
|
||||
|
@ -100,7 +100,7 @@ ACTOR AlienSpectre2 : AlienSpectre1 75
|
|||
// Alien Spectre 3 ----------------------------------------------------------
|
||||
// This is the Oracle's personal spectre, so it's a little different.
|
||||
|
||||
ACTOR AlienSpectre3 : AlienSpectre1 76
|
||||
ACTOR AlienSpectre3 : AlienSpectre1 76 native
|
||||
{
|
||||
Game Strife
|
||||
ConversationID 71,-1,-1
|
||||
|
|
|
@ -56,7 +56,7 @@ ACTOR Macil1 64 native
|
|||
|
||||
// Macil (version 2) ---------------------------------------------------------
|
||||
|
||||
ACTOR Macil2 : Macil1 200
|
||||
ACTOR Macil2 : Macil1 200 native
|
||||
{
|
||||
Game Strife
|
||||
ConversationID 50, 49, 50
|
||||
|
|
Loading…
Reference in a new issue