#include "gstrings.h"
// [BC] New #includes.
#include "deathmatch.h"
#include "cooperative.h"

static FRandom pr_spawnpuffx ("SpawnPuffX");

// The barrel of green goop ------------------------------------------------

void A_BarrelDestroy (AActor *);
void A_BarrelRespawn (AActor *);

FState AExplosiveBarrel::States[] =
{
#define S_BAR 0
	S_NORMAL (BAR1, 'A',	6, NULL 						, &States[S_BAR+1]),
	S_NORMAL (BAR1, 'B',	6, NULL 						, &States[S_BAR+0]),

#define S_BEXP (S_BAR+2)
	S_BRIGHT (BEXP, 'A',	5, NULL 						, &States[S_BEXP+1]),
	S_BRIGHT (BEXP, 'B',	5, A_Scream 					, &States[S_BEXP+2]),
	S_BRIGHT (BEXP, 'C',	5, NULL 						, &States[S_BEXP+3]),
	S_BRIGHT (BEXP, 'D',   10, A_Explode					, &States[S_BEXP+4]),
	S_BRIGHT (BEXP, 'E',   10, NULL 						, &States[S_BEXP+5]),
	S_BRIGHT (BEXP, 'E', 1050, A_BarrelDestroy				, &States[S_BEXP+6]),
	S_BRIGHT (BEXP, 'E',    5, A_BarrelRespawn				, &States[S_BEXP+6])
};

IMPLEMENT_ACTOR (AExplosiveBarrel, Doom, 2035, 125)
	PROP_SpawnHealth (20)
	PROP_RadiusFixed (10)
Exemple #2
0
	FState *GetUpState ();
	FState *GetDownState ();
	FState *GetReadyState ();
	FState *GetAtkState ();
	FState *GetHoldAtkState ();

	const char *PickupMessage ()
	{
		return GStrings("TXT_WEAPON_F2");
	}
};

FState AFWeapAxe::States[] =
{
#define S_AXE 0
	S_NORMAL (WFAX, 'A',   -1, NULL					    , NULL),

#define S_FAXEREADY (S_AXE+1)
	S_NORMAL (FAXE, 'A',	1, A_FAxeCheckReady			, &States[S_FAXEREADY]),

#define S_FAXEDOWN (S_FAXEREADY+1)
	S_NORMAL (FAXE, 'A',	1, A_Lower				    , &States[S_FAXEDOWN]),

#define S_FAXEUP (S_FAXEDOWN+1)
	S_NORMAL (FAXE, 'A',	1, A_FAxeCheckUp			, &States[S_FAXEUP]),

#define S_FAXEATK (S_FAXEUP+1)
	S_NORMAL2 (FAXE, 'B',	4, A_FAxeCheckAtk		    , &States[S_FAXEATK+1], 15, 32),
	S_NORMAL2 (FAXE, 'C',	3, NULL					    , &States[S_FAXEATK+2], 15, 32),
	S_NORMAL2 (FAXE, 'D',	2, NULL					    , &States[S_FAXEATK+3], 15, 32),
	S_NORMAL2 (FAXE, 'D',	1, A_FAxeAttack			    , &States[S_FAXEATK+4], -5, 70),
};

IMPLEMENT_POINTY_CLASS (APod)
	DECLARE_POINTER (Generator)
END_POINTERS;

void APod::Serialize (FArchive &arc)
{
	Super::Serialize (arc);
	arc << Generator;
}

FState APod::States[] =
{
#define S_POD_WAIT 0
	S_NORMAL (PPOD, 'A',   10, NULL 						, &States[S_POD_WAIT+0]),

#define S_POD_PAIN (S_POD_WAIT+1)
	S_NORMAL (PPOD, 'B',   14, A_PodPain					, &States[S_POD_WAIT+0]),

#define S_POD_DIE (S_POD_PAIN+1)
	S_BRIGHT (PPOD, 'C',	5, A_RemovePod					, &States[S_POD_DIE+1]),
	S_BRIGHT (PPOD, 'D',	5, A_Scream 					, &States[S_POD_DIE+2]),
	S_BRIGHT (PPOD, 'E',	5, A_Explode					, &States[S_POD_DIE+3]),
	S_BRIGHT (PPOD, 'F',   10, NULL 						, &AActor::States[S_FREETARGMOBJ]),

#define S_POD_GROW (S_POD_DIE+4)
	S_NORMAL (PPOD, 'I',	3, NULL 						, &States[S_POD_GROW+1]),
	S_NORMAL (PPOD, 'J',	3, NULL 						, &States[S_POD_GROW+2]),
	S_NORMAL (PPOD, 'K',	3, NULL 						, &States[S_POD_GROW+3]),
	S_NORMAL (PPOD, 'L',	3, NULL 						, &States[S_POD_GROW+4]),
#include "actor.h"
#include "a_action.h"
#include "a_strifeglobal.h"
#include "p_enemy.h"

void A_WakeOracleSpectre (AActor *);

// Oracle -------------------------------------------------------------------

FState AOracle::States[] =
{
	S_NORMAL (ORCL, 'A', -1, NULL,						NULL),

	S_NORMAL (ORCL, 'B',  5, NULL,						&States[2]),
	S_NORMAL (ORCL, 'C',  5, NULL,						&States[3]),
	S_NORMAL (ORCL, 'D',  5, NULL,						&States[4]),
	S_NORMAL (ORCL, 'E',  5, NULL,						&States[5]),
	S_NORMAL (ORCL, 'F',  5, NULL,						&States[6]),
	S_NORMAL (ORCL, 'G',  5, NULL,						&States[7]),
	S_NORMAL (ORCL, 'H',  5, NULL,						&States[8]),
	S_NORMAL (ORCL, 'I',  5, NULL,						&States[9]),
	S_NORMAL (ORCL, 'J',  5, NULL,						&States[10]),
	S_NORMAL (ORCL, 'K',  5, NULL,						&States[11]),
	S_NORMAL (ORCL, 'L',  5, A_NoBlocking,				&States[12]),
	S_NORMAL (ORCL, 'M',  5, NULL,						&States[13]),
	S_NORMAL (ORCL, 'N',  5, A_WakeOracleSpectre,		&States[14]),
	S_NORMAL (ORCL, 'O',  5, NULL,						&States[15]),
	S_NORMAL (ORCL, 'P',  5, NULL,						&States[16]),
	S_NORMAL (ORCL, 'Q', -1, NULL,						NULL)
};
// Silver Shield (Shield1) --------------------------------------------------

class ASilverShield : public ABasicArmorPickup
{
	DECLARE_ACTOR (ASilverShield, ABasicArmorPickup)
protected:
	virtual const char *PickupMessage ()
	{
		return GStrings("TXT_ITEMSHIELD1");
	}
};

FState ASilverShield::States[] =
{
	S_NORMAL (SHLD, 'A', -1, NULL, NULL)
};

IMPLEMENT_ACTOR (ASilverShield, Heretic, 85, 68)
	PROP_Flags (MF_SPECIAL)
	PROP_Flags2 (MF2_FLOATBOB)
	PROP_BasicArmorPickup_SavePercent (FRACUNIT/2)
	PROP_BasicArmorPickup_SaveAmount (100)
	PROP_SpawnState (0)
	PROP_Inventory_Icon ("SHLDA0")
END_DEFAULTS

// Enchanted shield (Shield2) -----------------------------------------------

class AEnchantedShield : public ABasicArmorPickup
{
Exemple #6
0
void A_SinkGib (AActor *);

// Serpent ------------------------------------------------------------------

class ASerpent : public AActor
{
	DECLARE_ACTOR (ASerpent, AActor)
public:
	bool bLeader;
	void Serialize (FArchive &arc);
};

FState ASerpent::States[] =
{
#define S_SERPENT_LOOK1 0
	S_NORMAL (SSPT, 'H',   10, A_Look				    , &States[S_SERPENT_LOOK1]),

#define S_SERPENT_SWIM1 (S_SERPENT_LOOK1+1)
	S_NORMAL (SSPT, 'H',	1, A_SerpentChase		    , &States[S_SERPENT_SWIM1+1]),
	S_NORMAL (SSPT, 'H',	1, A_SerpentChase		    , &States[S_SERPENT_SWIM1+2]),
	S_NORMAL (SSPT, 'H',	2, A_SerpentHumpDecide	    , &States[S_SERPENT_SWIM1]),

#define S_SERPENT_PAIN1 (S_SERPENT_SWIM1+3)
	S_NORMAL (SSPT, 'L',	5, NULL					    , &States[S_SERPENT_PAIN1+1]),
	S_NORMAL (SSPT, 'L',	5, A_Pain				    , &States[S_SERPENT_PAIN1+2]),
	S_NORMAL (SSDV, 'A',	4, NULL					    , &States[S_SERPENT_PAIN1+3]),
	S_NORMAL (SSDV, 'B',	4, NULL					    , &States[S_SERPENT_PAIN1+4]),
	S_NORMAL (SSDV, 'C',	4, NULL					    , &States[S_SERPENT_PAIN1+5]),
	S_NORMAL (SSDV, 'D',	4, A_UnSetShootable		    , &States[S_SERPENT_PAIN1+6]),
	S_NORMAL (SSDV, 'E',	3, A_SerpentDiveSound	    , &States[S_SERPENT_PAIN1+7]),
	S_NORMAL (SSDV, 'F',	3, NULL					    , &States[S_SERPENT_PAIN1+8]),
void A_BeastAttack (AActor *);
void A_BeastPuff (AActor *);

// Beast --------------------------------------------------------------------

class ABeast : public AActor
{
	DECLARE_ACTOR (ABeast, AActor)
public:
	void NoBlockingSet ();
};

FState ABeast::States[] =
{
#define S_BEAST_LOOK 0
	S_NORMAL (BEAS, 'A',   10, A_Look					, &States[S_BEAST_LOOK+1]),
	S_NORMAL (BEAS, 'B',   10, A_Look					, &States[S_BEAST_LOOK+0]),

#define S_BEAST_WALK (S_BEAST_LOOK+2)
	S_NORMAL (BEAS, 'A',	3, A_Chase					, &States[S_BEAST_WALK+1]),
	S_NORMAL (BEAS, 'B',	3, A_Chase					, &States[S_BEAST_WALK+2]),
	S_NORMAL (BEAS, 'C',	3, A_Chase					, &States[S_BEAST_WALK+3]),
	S_NORMAL (BEAS, 'D',	3, A_Chase					, &States[S_BEAST_WALK+4]),
	S_NORMAL (BEAS, 'E',	3, A_Chase					, &States[S_BEAST_WALK+5]),
	S_NORMAL (BEAS, 'F',	3, A_Chase					, &States[S_BEAST_WALK+0]),

#define S_BEAST_ATK (S_BEAST_WALK+6)
	S_NORMAL (BEAS, 'H',   10, A_FaceTarget 			, &States[S_BEAST_ATK+1]),
	S_NORMAL (BEAS, 'I',   10, A_BeastAttack			, &States[S_BEAST_WALK+0]),

#define S_BEAST_PAIN (S_BEAST_ATK+2)
	PROP_SpawnState (S_SRCRFX1)
	PROP_DeathState (S_SRCRFXI1)
END_DEFAULTS

AT_SPEED_SET (SorcererFX1, speed)
{
	SimpleSpeedSetter (ASorcererFX1, 20*FRACUNIT, 28*FRACUNIT, speed);
}

// Sorcerer 2 (D'Sparil without his serpent) --------------------------------

FState ASorcerer2::States[] =
{
#define S_SOR2_LOOK 0
	S_NORMAL (SOR2, 'M',   10, A_Look					, &States[S_SOR2_LOOK+1]),
	S_NORMAL (SOR2, 'N',   10, A_Look					, &States[S_SOR2_LOOK+0]),

#define S_SOR2_WALK (S_SOR2_LOOK+2)
	S_NORMAL (SOR2, 'M',	4, A_Chase					, &States[S_SOR2_WALK+1]),
	S_NORMAL (SOR2, 'N',	4, A_Chase					, &States[S_SOR2_WALK+2]),
	S_NORMAL (SOR2, 'O',	4, A_Chase					, &States[S_SOR2_WALK+3]),
	S_NORMAL (SOR2, 'P',	4, A_Chase					, &States[S_SOR2_WALK+0]),

#define S_SOR2_RISE (S_SOR2_WALK+4)
	S_NORMAL (SOR2, 'A',	4, NULL 					, &States[S_SOR2_RISE+1]),
	S_NORMAL (SOR2, 'B',	4, NULL 					, &States[S_SOR2_RISE+2]),
	S_NORMAL (SOR2, 'C',	4, A_SorRise				, &States[S_SOR2_RISE+3]),
	S_NORMAL (SOR2, 'D',	4, NULL 					, &States[S_SOR2_RISE+4]),
	S_NORMAL (SOR2, 'E',	4, NULL 					, &States[S_SOR2_RISE+5]),
	S_NORMAL (SOR2, 'F',	4, NULL 					, &States[S_SOR2_RISE+6]),
void A_PainAttack (AActor *);
void A_PainDie (AActor *);

void A_SkullAttack (AActor *self);

class APainElemental : public AActor
{
	DECLARE_ACTOR (APainElemental, AActor)
public:
	bool Massacre ();
};

FState APainElemental::States[] =
{
#define S_PAIN_STND 0
	S_NORMAL (PAIN, 'A',   10, A_Look						, &States[S_PAIN_STND]),

#define S_PAIN_RUN (S_PAIN_STND+1)
	S_NORMAL (PAIN, 'A',	3, A_Chase						, &States[S_PAIN_RUN+1]),
	S_NORMAL (PAIN, 'A',	3, A_Chase						, &States[S_PAIN_RUN+2]),
	S_NORMAL (PAIN, 'B',	3, A_Chase						, &States[S_PAIN_RUN+3]),
	S_NORMAL (PAIN, 'B',	3, A_Chase						, &States[S_PAIN_RUN+4]),
	S_NORMAL (PAIN, 'C',	3, A_Chase						, &States[S_PAIN_RUN+5]),
	S_NORMAL (PAIN, 'C',	3, A_Chase						, &States[S_PAIN_RUN+0]),

#define S_PAIN_ATK (S_PAIN_RUN+6)
	S_NORMAL (PAIN, 'D',	5, A_FaceTarget 				, &States[S_PAIN_ATK+1]),
	S_NORMAL (PAIN, 'E',	5, A_FaceTarget 				, &States[S_PAIN_ATK+2]),
	S_BRIGHT (PAIN, 'F',	5, A_FaceTarget 				, &States[S_PAIN_ATK+3]),
	S_BRIGHT (PAIN, 'F',	0, A_PainAttack 				, &States[S_PAIN_RUN+0]),
Exemple #10
0
void A_BishopSpawnBlur (AActor *);
void A_BishopPainBlur (AActor *);
void A_BishopChase (AActor *);
void A_BishopAttack (AActor *);
void A_BishopAttack2 (AActor *);
void A_BishopPuff (AActor *);
void A_SetAltShadow (AActor *);
void A_BishopMissileWeave (AActor *);
void A_BishopMissileSeek (AActor *);

// Bishop -------------------------------------------------------------------

FState ABishop::States[] =
{
#define S_BISHOP_LOOK 0
	S_NORMAL (BISH, 'A',   10, A_Look					, &States[S_BISHOP_LOOK+0]),

#define S_BISHOP_BLUR (S_BISHOP_LOOK+1)
	S_NORMAL (BISH, 'A',	2, A_BishopDoBlur			, &States[S_BISHOP_BLUR+1]),
	S_NORMAL (BISH, 'A',	4, A_BishopSpawnBlur		, &States[S_BISHOP_BLUR+1]),

#define S_BISHOP_WALK (S_BISHOP_BLUR+2)
	S_NORMAL (BISH, 'A',	2, A_Chase					, &States[S_BISHOP_WALK+1]),
	S_NORMAL (BISH, 'A',	2, A_BishopChase			, &States[S_BISHOP_WALK+2]),
	S_NORMAL (BISH, 'A',	2, NULL 					, &States[S_BISHOP_WALK+3]),
	S_NORMAL (BISH, 'B',	2, A_BishopChase			, &States[S_BISHOP_WALK+4]),
	S_NORMAL (BISH, 'B',	2, A_Chase					, &States[S_BISHOP_WALK+5]),
	S_NORMAL (BISH, 'B',	2, A_BishopChase			, &States[S_BISHOP_WALK+6]),	// S_BISHOP_DECIDE

#define S_BISHOP_DECIDE (S_BISHOP_WALK+6)
	S_NORMAL (BISH, 'A',	1, A_BishopDecide			, &States[S_BISHOP_WALK+0]),
Exemple #11
0
public:
	const char *PickupMessage ()
	{
		return GStrings("TXT_WEAPON_M2");
	}
};

FState AMWeapFrost::States[] =
{
#define S_COS1 0
	S_BRIGHT (WMCS, 'A',	8, NULL					    , &States[S_COS1+1]),
	S_BRIGHT (WMCS, 'B',	8, NULL					    , &States[S_COS1+2]),
	S_BRIGHT (WMCS, 'C',	8, NULL					    , &States[S_COS1]),

#define S_CONEREADY (S_COS1+3)
	S_NORMAL (CONE, 'A',	1, A_WeaponReady		    , &States[S_CONEREADY]),

#define S_CONEDOWN (S_CONEREADY+1)
	S_NORMAL (CONE, 'A',	1, A_Lower				    , &States[S_CONEDOWN]),

#define S_CONEUP (S_CONEDOWN+1)
	S_NORMAL (CONE, 'A',	1, A_Raise				    , &States[S_CONEUP]),

#define S_CONEATK (S_CONEUP+1)
	S_NORMAL (CONE, 'B',	3, NULL					    , &States[S_CONEATK+1]),
	S_NORMAL (CONE, 'C',	4, NULL					    , &States[S_CONEATK+2]),
	S_NORMAL (CONE, 'D',	3, NULL					    , &States[S_CONEATK+3]),
	S_NORMAL (CONE, 'E',	5, NULL					    , &States[S_CONEATK+4]),
	S_NORMAL (CONE, 'F',	3, A_FireConePL1		    , &States[S_CONEATK+5]),
	S_NORMAL (CONE, 'G',	3, NULL					    , &States[S_CONEATK+6]),
	S_NORMAL (CONE, 'A',	9, NULL					    , &States[S_CONEATK+7]),
#include "deathmatch.h"

static FRandom pr_tele ("TeleportSelf");

// Teleport (self) ----------------------------------------------------------

class AArtiTeleport : public AInventory
{
	DECLARE_ACTOR (AArtiTeleport, AInventory)
public:
	bool Use (bool pickup);
};

FState AArtiTeleport::States[] =
{
	S_NORMAL (ATLP, 'A',	4, NULL, &States[1]),
	S_NORMAL (ATLP, 'B',	4, NULL, &States[2]),
	S_NORMAL (ATLP, 'C',	4, NULL, &States[3]),
	S_NORMAL (ATLP, 'B',	4, NULL, &States[0])
};

IMPLEMENT_ACTOR (AArtiTeleport, Raven, 36, 18)
	PROP_Flags (MF_SPECIAL|MF_COUNTITEM)
	PROP_Flags2 (MF2_FLOATBOB)
	PROP_SpawnState (0)
	PROP_Inventory_DefMaxAmount
	PROP_Inventory_FlagsSet (IF_INVBAR|IF_PICKUPFLASH|IF_FANCYPICKUPSOUND)
	PROP_Inventory_Icon ("ARTIATLP")
	PROP_Inventory_PickupSound ("misc/p_pkup")
	PROP_Inventory_PickupMessage("$TXT_ARTITELEPORT")
END_DEFAULTS
void P_TeleportToDeathmatchStarts (AActor *victim);

// Teleport Other Artifact --------------------------------------------------

class AArtiTeleportOther : public AInventory
{
	DECLARE_ACTOR (AArtiTeleportOther, AInventory)
public:
	bool Use (bool pickup);
	const char *PickupMessage ();
};

FState AArtiTeleportOther::States[] =
{
#define S_ARTI_TELOTHER1 0
	S_NORMAL (TELO, 'A',	5, NULL					    , &States[S_ARTI_TELOTHER1+1]),
	S_NORMAL (TELO, 'B',	5, NULL					    , &States[S_ARTI_TELOTHER1+2]),
	S_NORMAL (TELO, 'C',	5, NULL					    , &States[S_ARTI_TELOTHER1+3]),
	S_NORMAL (TELO, 'D',	5, NULL					    , &States[S_ARTI_TELOTHER1]),
};

IMPLEMENT_ACTOR (AArtiTeleportOther, Hexen, 10040, 17)
	PROP_Flags (MF_SPECIAL)
	PROP_Flags2 (MF2_FLOATBOB)
	PROP_SpawnState (S_ARTI_TELOTHER1)
	PROP_Inventory_DefMaxAmount
	PROP_Inventory_FlagsSet (IF_INVBAR|IF_PICKUPFLASH|IF_FANCYPICKUPSOUND)
	PROP_Inventory_Icon ("ARTITELO")
	PROP_Inventory_PickupSound ("misc/p_pkup")
END_DEFAULTS
Exemple #14
0
// Knight -------------------------------------------------------------------

class AKnight : public AActor
{
	DECLARE_ACTOR (AKnight, AActor)
public:
	void NoBlockingSet ();
	const char *GetObituary ();
	const char *GetHitObituary ();
};

FState AKnight::States[] =
{
#define S_KNIGHT_STND 0
	S_NORMAL (KNIG, 'A',   10, A_Look					, &States[S_KNIGHT_STND+1]),
	S_NORMAL (KNIG, 'B',   10, A_Look					, &States[S_KNIGHT_STND+0]),

#define S_KNIGHT_WALK (S_KNIGHT_STND+2)
	S_NORMAL (KNIG, 'A',	4, A_Chase					, &States[S_KNIGHT_WALK+1]),
	S_NORMAL (KNIG, 'B',	4, A_Chase					, &States[S_KNIGHT_WALK+2]),
	S_NORMAL (KNIG, 'C',	4, A_Chase					, &States[S_KNIGHT_WALK+3]),
	S_NORMAL (KNIG, 'D',	4, A_Chase					, &States[S_KNIGHT_WALK+0]),

#define S_KNIGHT_ATK (S_KNIGHT_WALK+4)
	S_NORMAL (KNIG, 'E',   10, A_FaceTarget 			, &States[S_KNIGHT_ATK+1]),
	S_NORMAL (KNIG, 'F',	8, A_FaceTarget 			, &States[S_KNIGHT_ATK+2]),
	S_NORMAL (KNIG, 'G',	8, A_KnightAttack			, &States[S_KNIGHT_ATK+3]),
	S_NORMAL (KNIG, 'E',   10, A_FaceTarget 			, &States[S_KNIGHT_ATK+4]),
	S_NORMAL (KNIG, 'F',	8, A_FaceTarget 			, &States[S_KNIGHT_ATK+5]),
	S_NORMAL (KNIG, 'G',	8, A_KnightAttack			, &States[S_KNIGHT_WALK+0]),
Exemple #15
0
void A_FatRaise (AActor *);
void A_FatAttack1 (AActor *);
void A_FatAttack2 (AActor *);
void A_FatAttack3 (AActor *);

class AFatso : public AActor
{
	DECLARE_ACTOR (AFatso, AActor)
public:
	const char *GetObituary () { return GStrings("OB_FATSO"); }
};

FState AFatso::States[] =
{
#define S_FATT_STND 0
	S_NORMAL (FATT, 'A',   15, A_Look						, &States[S_FATT_STND+1]),
	S_NORMAL (FATT, 'B',   15, A_Look						, &States[S_FATT_STND]),

#define S_FATT_RUN (S_FATT_STND+2)
	S_NORMAL (FATT, 'A',	4, A_Chase						, &States[S_FATT_RUN+1]),
	S_NORMAL (FATT, 'A',	4, A_Chase						, &States[S_FATT_RUN+2]),
	S_NORMAL (FATT, 'B',	4, A_Chase						, &States[S_FATT_RUN+3]),
	S_NORMAL (FATT, 'B',	4, A_Chase						, &States[S_FATT_RUN+4]),
	S_NORMAL (FATT, 'C',	4, A_Chase						, &States[S_FATT_RUN+5]),
	S_NORMAL (FATT, 'C',	4, A_Chase						, &States[S_FATT_RUN+6]),
	S_NORMAL (FATT, 'D',	4, A_Chase						, &States[S_FATT_RUN+7]),
	S_NORMAL (FATT, 'D',	4, A_Chase						, &States[S_FATT_RUN+8]),
	S_NORMAL (FATT, 'E',	4, A_Chase						, &States[S_FATT_RUN+9]),
	S_NORMAL (FATT, 'E',	4, A_Chase						, &States[S_FATT_RUN+10]),
	S_NORMAL (FATT, 'F',	4, A_Chase						, &States[S_FATT_RUN+11]),
	S_NORMAL (FATT, 'F',	4, A_Chase						, &States[S_FATT_RUN+0]),
Exemple #16
0
		Owner->player->Powers &= ~PW_SPEED;
	}
}

// Minotaur (aka Dark Servant) powerup ---------------------------------------

IMPLEMENT_STATELESS_ACTOR (APowerMinotaur, Any, -1, 0)
	PROP_Powerup_EffectTics (MAULATORTICS)
	PROP_Inventory_Icon ("SPMINO0")
END_DEFAULTS

// Targeter powerup ---------------------------------------------------------

FState APowerTargeter::States[] =
{
	S_NORMAL (TRGT, 'A', -1, NULL, NULL),
	S_NORMAL (TRGT, 'B', -1, NULL, NULL),
	S_NORMAL (TRGT, 'C', -1, NULL, NULL)
};

IMPLEMENT_ACTOR (APowerTargeter, Any, -1, 0)
	PROP_Powerup_EffectTics (160*TICRATE)
	PROP_Inventory_FlagsSet (IF_HUBPOWER)
END_DEFAULTS

void APowerTargeter::InitEffect ()
{
	player_t *player;

	if ((player = Owner->player) == NULL)
		return;
Exemple #17
0
#include "info.h"

// Hate Target --------------------------------------------------------------

class AHateTarget : public AActor
{
	DECLARE_ACTOR (AHateTarget, AActor)
public:
	void BeginPlay ();
	void Tick ();
	angle_t AngleIncrements (void);
};

FState AHateTarget::States[] =
{
	S_NORMAL (TNT1, 'A',   -1, NULL							, NULL)
};

IMPLEMENT_ACTOR (AHateTarget, Any, 9076, 0)
	PROP_RadiusFixed (20)
	PROP_HeightFixed (56)
	PROP_Flags (MF_SHOOTABLE|MF_NOSECTOR|MF_NOGRAVITY|MF_NOBLOOD)
	PROP_SpawnState (0)
	PROP_MassLong (INT_MAX)
END_DEFAULTS

void AHateTarget::BeginPlay ()
{
	Super::BeginPlay ();
	if (angle != 0)
	{	// Each degree translates into 10 units of health
#include "m_random.h"
#include "s_sound.h"
#include "d_player.h"
#include "a_action.h"
#include "p_local.h"
#include "p_enemy.h"
#include "a_action.h"
#include "a_hexenglobal.h"
#include "templates.h"

// The cleric ---------------------------------------------------------------

FState AClericPlayer::States[] =
{
#define S_CPLAY 0
	S_NORMAL (CLER, 'A',   -1, NULL					    , NULL),

#define S_CPLAY_RUN1 (S_CPLAY+1)
	S_NORMAL (CLER, 'A',	4, NULL					    , &States[S_CPLAY_RUN1+1]),
	S_NORMAL (CLER, 'B',	4, NULL					    , &States[S_CPLAY_RUN1+2]),
	S_NORMAL (CLER, 'C',	4, NULL					    , &States[S_CPLAY_RUN1+3]),
	S_NORMAL (CLER, 'D',	4, NULL					    , &States[S_CPLAY_RUN1]),

#define S_CPLAY_PAIN (S_CPLAY_RUN1+4)
	S_NORMAL (CLER, 'H',	4, NULL					    , &States[S_CPLAY_PAIN+1]),
	S_NORMAL (CLER, 'H',	4, A_Pain				    , &States[S_CPLAY]),

#define S_CPLAY_ATK1 (S_CPLAY_PAIN+2)
	S_NORMAL (CLER, 'E',	6, NULL					    , &States[S_CPLAY_ATK1+1]),
	S_NORMAL (CLER, 'F',	6, NULL					    , &States[S_CPLAY_ATK1+2]),
	S_NORMAL (CLER, 'G',	6, NULL					    , &States[S_CPLAY]),
Exemple #19
0
#define S_SKULL_ATK (S_SKULL_RUN+2)
	S_BRIGHT (SKUL, 'C',   10, A_FaceTarget 				, &States[S_SKULL_ATK+1]),
	S_BRIGHT (SKUL, 'D',	4, A_SkullAttack				, &States[S_SKULL_ATK+2]),
	S_BRIGHT (SKUL, 'C',	4, NULL 						, &States[S_SKULL_ATK+3]),
	S_BRIGHT (SKUL, 'D',	4, NULL 						, &States[S_SKULL_ATK+2]),

#define S_SKULL_PAIN (S_SKULL_ATK+4)
	S_BRIGHT (SKUL, 'E',	3, NULL 						, &States[S_SKULL_PAIN+1]),
	S_BRIGHT (SKUL, 'E',	3, A_Pain						, &States[S_SKULL_RUN+0]),

#define S_SKULL_DIE (S_SKULL_PAIN+2)
	S_BRIGHT (SKUL, 'F',	6, NULL 						, &States[S_SKULL_DIE+1]),
	S_BRIGHT (SKUL, 'G',	6, A_Scream 					, &States[S_SKULL_DIE+2]),
	S_BRIGHT (SKUL, 'H',	6, NULL 						, &States[S_SKULL_DIE+3]),
	S_BRIGHT (SKUL, 'I',	6, A_NoBlocking					, &States[S_SKULL_DIE+4]),
	S_NORMAL (SKUL, 'J',	6, NULL 						, &States[S_SKULL_DIE+5]),
	S_NORMAL (SKUL, 'K',	6, NULL 						, NULL)
};

IMPLEMENT_ACTOR (ALostSoul, Doom, 3006, 110)
	PROP_SpawnHealth (100)
	PROP_RadiusFixed (16)
	PROP_HeightFixed (56)
	PROP_Mass (50)
	PROP_SpeedFixed (8)
	PROP_Damage (3)
	PROP_MaxPainChance
	PROP_Flags (MF_SOLID|MF_SHOOTABLE|MF_FLOAT|MF_NOGRAVITY|MF_COUNTKILL)
	PROP_Flags2 (MF2_MCROSS|MF2_PUSHWALL|MF2_PASSMOBJ)
	PROP_Flags4 (MF4_NOICEDEATH|MF4_MISSILEMORE|MF4_DONTFALL)
	PROP_RenderStyle (STYLE_SoulTrans)
Exemple #20
0
// Pig (non-player) ---------------------------------------------------------

class APig : public AActor
{
    DECLARE_ACTOR (APig, AActor)
public:
    void Destroy ();
    const char *GetObituary ();
    void Die (AActor *source, AActor *inflictor);
};

FState APig::States[] =
{
#define S_PIG_LOOK1 0
    S_NORMAL (PIGY, 'B',   10, A_PigLook			    , &States[S_PIG_LOOK1]),

#define S_PIG_WALK1 (S_PIG_LOOK1+1)
    S_NORMAL (PIGY, 'A',	3, A_PigChase			    , &States[S_PIG_WALK1+1]),
    S_NORMAL (PIGY, 'B',	3, A_PigChase			    , &States[S_PIG_WALK1+2]),
    S_NORMAL (PIGY, 'C',	3, A_PigChase			    , &States[S_PIG_WALK1+3]),
    S_NORMAL (PIGY, 'D',	3, A_PigChase			    , &States[S_PIG_WALK1]),

#define S_PIG_PAIN (S_PIG_WALK1+4)
    S_NORMAL (PIGY, 'D',	4, A_PigPain			    , &States[S_PIG_WALK1]),

#define S_PIG_ATK1 (S_PIG_PAIN+1)
    S_NORMAL (PIGY, 'A',	5, A_FaceTarget			    , &States[S_PIG_ATK1+1]),
    S_NORMAL (PIGY, 'A',   10, A_PigAttack			    , &States[S_PIG_WALK1]),

#define S_PIG_DIE1 (S_PIG_ATK1+2)
#include "a_action.h"
#include "p_local.h"
#include "p_enemy.h"
#include "a_action.h"
#include "a_hexenglobal.h"

static FRandom pr_fpatk ("FPunchAttack");

void A_FSwordFlames (AActor *);

// The fighter --------------------------------------------------------------

FState AFighterPlayer::States[] =
{
#define S_FPLAY 0
	S_NORMAL (PLAY, 'A',   -1, NULL 					, NULL),

#define S_FPLAY_RUN (S_FPLAY+1)
	S_NORMAL (PLAY, 'A',	4, NULL 					, &States[S_FPLAY_RUN+1]),
	S_NORMAL (PLAY, 'B',	4, NULL 					, &States[S_FPLAY_RUN+2]),
	S_NORMAL (PLAY, 'C',	4, NULL 					, &States[S_FPLAY_RUN+3]),
	S_NORMAL (PLAY, 'D',	4, NULL 					, &States[S_FPLAY_RUN+0]),

#define S_FPLAY_ATK (S_FPLAY_RUN+4)
	S_NORMAL (PLAY, 'E',	8, NULL 					, &States[S_FPLAY_ATK+1]),
	S_NORMAL (PLAY, 'F',	8, NULL 					, &States[S_FPLAY]),

#define S_FPLAY_PAIN (S_FPLAY_ATK+2)
	S_NORMAL (PLAY, 'G',	4, NULL 					, &States[S_FPLAY_PAIN+1]),
	S_NORMAL (PLAY, 'G',	4, A_Pain					, &States[S_FPLAY]),
Exemple #22
0
#include "a_pickups.h"
#include "a_strifeglobal.h"
#include "gstrings.h"

// Coin ---------------------------------------------------------------------

FState ACoin::States[] =
{
	S_NORMAL (COIN, 'A', -1, NULL, NULL)
};

IMPLEMENT_ACTOR (ACoin, Strife, 93, 0)
	PROP_StrifeType (168)
	PROP_StrifeTeaserType (161)
	PROP_StrifeTeaserType2 (165)
	PROP_SpawnState (0)
	PROP_Flags (MF_SPECIAL|MF_DROPPED|MF_NOTDMATCH)
	PROP_Flags2 (MF2_FLOORCLIP)
	PROP_Inventory_MaxAmountLong (INT_MAX)
	PROP_Inventory_FlagsSet (IF_INVBAR)
	PROP_Inventory_Icon ("I_COIN")
	PROP_Tag ("coin")
	PROP_Inventory_PickupMessage("$TXT_COIN")
END_DEFAULTS

const char *ACoin::PickupMessage ()
{
	if (Amount == 1)
	{
		return Super::PickupMessage();
	}
#include "a_action.h"
#include "gstrings.h"

static FRandom pr_wizatk3 ("WizAtk3");

void A_WizAtk1 (AActor *);
void A_WizAtk2 (AActor *);
void A_WizAtk3 (AActor *);
void A_GhostOff (AActor *);

// Class definitions --------------------------------------------------------

FState AWizard::States[] =
{
#define S_WIZARD_LOOK 0
	S_NORMAL (WZRD, 'A',   10, A_Look						, &States[S_WIZARD_LOOK+1]),
	S_NORMAL (WZRD, 'B',   10, A_Look						, &States[S_WIZARD_LOOK+0]),

#define S_WIZARD_WALK (S_WIZARD_LOOK+2)
	S_NORMAL (WZRD, 'A',	3, A_Chase						, &States[S_WIZARD_WALK+1]),
	S_NORMAL (WZRD, 'A',	4, A_Chase						, &States[S_WIZARD_WALK+2]),
	S_NORMAL (WZRD, 'A',	3, A_Chase						, &States[S_WIZARD_WALK+3]),
	S_NORMAL (WZRD, 'A',	4, A_Chase						, &States[S_WIZARD_WALK+4]),
	S_NORMAL (WZRD, 'B',	3, A_Chase						, &States[S_WIZARD_WALK+5]),
	S_NORMAL (WZRD, 'B',	4, A_Chase						, &States[S_WIZARD_WALK+6]),
	S_NORMAL (WZRD, 'B',	3, A_Chase						, &States[S_WIZARD_WALK+7]),
	S_NORMAL (WZRD, 'B',	4, A_Chase						, &States[S_WIZARD_WALK+0]),

#define S_WIZARD_ATK (S_WIZARD_WALK+8)
	S_NORMAL (WZRD, 'C',	4, A_WizAtk1					, &States[S_WIZARD_ATK+1]),
	S_NORMAL (WZRD, 'C',	4, A_WizAtk2					, &States[S_WIZARD_ATK+2]),
#include "p_enemy.h"
#include "s_sound.h"
#include "m_random.h"
#include "a_strifeglobal.h"

void A_201fc (AActor *);

void A_AlertMonsters (AActor *);
void A_Countdown (AActor *);
void A_Tracer2 (AActor *);

// Container for all spectral lightning deaths ------------------------------

FState ASpectralLightningBase::States[] =
{
	S_NORMAL (ZAP1, 'B', 3, A_Explode,			&States[1]),
	S_NORMAL (ZAP1, 'A', 3, A_AlertMonsters,	&States[2]),
	S_NORMAL (ZAP1, 'B', 3, NULL,				&States[3]),
	S_NORMAL (ZAP1, 'C', 3, NULL,				&States[4]),
	S_NORMAL (ZAP1, 'D', 3, NULL,				&States[5]),
	S_NORMAL (ZAP1, 'E', 3, NULL,				&States[6]),
	S_NORMAL (ZAP1, 'F', 3, NULL,				&States[7]),
	S_NORMAL (ZAP1, 'E', 3, NULL,				&States[8]),
	S_NORMAL (ZAP1, 'D', 2, NULL,				&States[9]),
	S_NORMAL (ZAP1, 'C', 2, NULL,				&States[10]),
	S_NORMAL (ZAP1, 'B', 2, NULL,				&States[11]),
	S_NORMAL (ZAP1, 'A', 1, NULL,				NULL),
};

IMPLEMENT_ACTOR (ASpectralLightningBase, Strife, -1, 0)
	PROP_DeathState (0)