2006-02-24 04:48:15 +00:00
|
|
|
#include "actor.h"
|
|
|
|
#include "a_action.h"
|
|
|
|
#include "a_strifeglobal.h"
|
|
|
|
#include "p_enemy.h"
|
2008-08-10 20:48:55 +00:00
|
|
|
#include "thingdef/thingdef.h"
|
2006-02-24 04:48:15 +00:00
|
|
|
|
2008-08-07 17:45:35 +00:00
|
|
|
class AOracle : public AActor
|
2006-02-24 04:48:15 +00:00
|
|
|
{
|
2008-08-07 17:45:35 +00:00
|
|
|
DECLARE_CLASS (AOracle, AActor)
|
|
|
|
public:
|
|
|
|
int TakeSpecialDamage (AActor *inflictor, AActor *source, int damage, FName damagetype);
|
2006-02-24 04:48:15 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
2008-08-07 17:45:35 +00:00
|
|
|
IMPLEMENT_CLASS (AOracle)
|
2006-02-24 04:48:15 +00:00
|
|
|
|
|
|
|
|
2008-08-10 20:48:55 +00:00
|
|
|
DEFINE_ACTION_FUNCTION(AActor, A_WakeOracleSpectre)
|
2006-02-24 04:48:15 +00:00
|
|
|
{
|
2008-08-06 17:49:22 +00:00
|
|
|
TThinkerIterator<AActor> it(NAME_AlienSpectre3);
|
2006-02-24 04:48:15 +00:00
|
|
|
AActor *spectre = it.Next();
|
|
|
|
|
|
|
|
if (spectre != NULL)
|
|
|
|
{
|
2006-04-20 14:21:27 +00:00
|
|
|
spectre->Sector->SoundTarget = spectre->LastHeard = self->LastHeard;
|
2006-02-24 04:48:15 +00:00
|
|
|
spectre->target = self->target;
|
|
|
|
spectre->SetState (spectre->SeeState);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
//============================================================================
|
|
|
|
//
|
|
|
|
// AOracle :: TakeSpecialDamage
|
|
|
|
//
|
|
|
|
// The Oracle is invulnerable to the first stage Sigil.
|
|
|
|
//
|
|
|
|
//============================================================================
|
|
|
|
|
2006-10-31 14:53:21 +00:00
|
|
|
int AOracle::TakeSpecialDamage (AActor *inflictor, AActor *source, int damage, FName damagetype)
|
2006-02-24 04:48:15 +00:00
|
|
|
{
|
2008-08-05 22:51:51 +00:00
|
|
|
if (inflictor != NULL && inflictor->GetClass()->TypeName == NAME_SpectralLightningV1)
|
2006-02-24 04:48:15 +00:00
|
|
|
return -1;
|
2006-04-11 16:27:41 +00:00
|
|
|
return Super::TakeSpecialDamage(inflictor, source, damage, damagetype);
|
2006-02-24 04:48:15 +00:00
|
|
|
}
|