mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-26 14:01:45 +00:00
- Changed: Macil doesn't need the StrifeHumanoid's special death states so he might
as well inherit directly from AActor. - Converted Strife's Coin, Oracle, Macil and StrifeHumanoid to DECORATE. Also moved the burning hand states to StrifePlayer where they really belong. SVN r1125 (trunk)
This commit is contained in:
parent
269a54a258
commit
0e009ff18a
16 changed files with 312 additions and 422 deletions
|
@ -1,4 +1,8 @@
|
|||
August 7, 2008 (Changes by Graf Zahl)
|
||||
- Changed: Macil doesn't need the StrifeHumanoid's special death states so he might
|
||||
as well inherit directly from AActor.
|
||||
- Converted Strife's Coin, Oracle, Macil and StrifeHumanoid to DECORATE. Also moved
|
||||
the burning hand states to StrifePlayer where they really belong.
|
||||
- Added Gez's dropammofactor submission with some necessary changes. Also merged
|
||||
redundant ammo multiplication code from P_DropItem and ADehackedPickup::TryPickup.
|
||||
- Restricted native action function definitions to zdoom.pk3.
|
||||
|
|
|
@ -110,6 +110,8 @@ ACTOR(ClearReFire)
|
|||
ACTOR(SpawnSingleItem)
|
||||
ACTOR(GiveQuestItem)
|
||||
ACTOR(Bang4Cloud)
|
||||
ACTOR(HandLower)
|
||||
ACTOR(WakeOracleSpectre)
|
||||
|
||||
ACTOR(M_Refire)
|
||||
ACTOR(M_CheckAttack)
|
||||
|
|
|
@ -130,8 +130,8 @@ void A_AlienSpectreDeath (AActor *self)
|
|||
{
|
||||
C_MidPrint(GStrings("TXT_KILLED_ORACLE"));
|
||||
// If there are any Oracles still alive, kill them.
|
||||
TThinkerIterator<AOracle> it;
|
||||
AOracle *oracle;
|
||||
TThinkerIterator<AActor> it(NAME_Oracle);
|
||||
AActor *oracle;
|
||||
|
||||
while ( (oracle = it.Next()) != NULL)
|
||||
{
|
||||
|
|
|
@ -4,24 +4,7 @@
|
|||
|
||||
// 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
|
||||
IMPLEMENT_CLASS (ACoin)
|
||||
|
||||
const char *ACoin::PickupMessage ()
|
||||
{
|
||||
|
@ -76,96 +59,6 @@ AInventory *ACoin::CreateCopy (AActor *other)
|
|||
return copy;
|
||||
}
|
||||
|
||||
// 10 Gold ------------------------------------------------------------------
|
||||
|
||||
class AGold10 : public ACoin
|
||||
{
|
||||
DECLARE_ACTOR (AGold10, ACoin)
|
||||
};
|
||||
|
||||
FState AGold10::States[] =
|
||||
{
|
||||
S_NORMAL (CRED, 'A', -1, NULL, NULL)
|
||||
};
|
||||
|
||||
IMPLEMENT_ACTOR (AGold10, Strife, 138, 0)
|
||||
PROP_StrifeType (169)
|
||||
PROP_StrifeTeaserType (162)
|
||||
PROP_StrifeTeaserType2 (166)
|
||||
PROP_SpawnState (0)
|
||||
PROP_Inventory_Amount (10)
|
||||
PROP_Tag ("10_gold")
|
||||
END_DEFAULTS
|
||||
|
||||
// 25 Gold ------------------------------------------------------------------
|
||||
|
||||
class AGold25 : public ACoin
|
||||
{
|
||||
DECLARE_ACTOR (AGold25, ACoin)
|
||||
};
|
||||
|
||||
FState AGold25::States[] =
|
||||
{
|
||||
S_NORMAL (SACK, 'A', -1, NULL, NULL)
|
||||
};
|
||||
|
||||
IMPLEMENT_ACTOR (AGold25, Strife, 139, 0)
|
||||
PROP_StrifeType (170)
|
||||
PROP_StrifeTeaserType (163)
|
||||
PROP_StrifeTeaserType2 (167)
|
||||
PROP_SpawnState (0)
|
||||
PROP_Inventory_Amount (25)
|
||||
PROP_Tag ("25_gold")
|
||||
END_DEFAULTS
|
||||
|
||||
// 50 Gold ------------------------------------------------------------------
|
||||
|
||||
class AGold50 : public ACoin
|
||||
{
|
||||
DECLARE_ACTOR (AGold50, ACoin)
|
||||
};
|
||||
|
||||
FState AGold50::States[] =
|
||||
{
|
||||
S_NORMAL (CHST, 'A', -1, NULL, NULL)
|
||||
};
|
||||
|
||||
IMPLEMENT_ACTOR (AGold50, Strife, 140, 0)
|
||||
PROP_StrifeType (171)
|
||||
PROP_StrifeTeaserType (164)
|
||||
PROP_StrifeTeaserType2 (168)
|
||||
PROP_SpawnState (0)
|
||||
PROP_Inventory_Amount (50)
|
||||
PROP_Tag ("50_gold")
|
||||
END_DEFAULTS
|
||||
|
||||
// 300 Gold ------------------------------------------------------------------
|
||||
|
||||
class AGold300 : public ACoin
|
||||
{
|
||||
DECLARE_ACTOR (AGold300, ACoin)
|
||||
public:
|
||||
bool TryPickup (AActor *toucher);
|
||||
};
|
||||
|
||||
FState AGold300::States[] =
|
||||
{
|
||||
S_NORMAL (TOKN, 'A', -1, NULL, NULL)
|
||||
};
|
||||
|
||||
IMPLEMENT_ACTOR (AGold300, Strife, -1, 0)
|
||||
PROP_StrifeType (172)
|
||||
PROP_SpawnState (0)
|
||||
PROP_Inventory_AmountWord (300)
|
||||
PROP_Tag ("300_gold")
|
||||
END_DEFAULTS
|
||||
|
||||
bool AGold300::TryPickup (AActor *toucher)
|
||||
{
|
||||
toucher->GiveInventoryType (QuestItemClasses[2]);
|
||||
return Super::TryPickup (toucher);
|
||||
}
|
||||
|
||||
//===========================================================================
|
||||
//
|
||||
// ACoin :: CreateTossable
|
||||
|
@ -185,22 +78,22 @@ AInventory *ACoin::CreateTossable ()
|
|||
if (Amount >= 50)
|
||||
{
|
||||
Amount -= 50;
|
||||
tossed = Spawn<AGold50> (Owner->x, Owner->y, Owner->z, NO_REPLACE);
|
||||
tossed = static_cast<ACoin*>(Spawn("Gold50", Owner->x, Owner->y, Owner->z, NO_REPLACE));
|
||||
}
|
||||
else if (Amount >= 25)
|
||||
{
|
||||
Amount -= 25;
|
||||
tossed = Spawn<AGold25> (Owner->x, Owner->y, Owner->z, NO_REPLACE);
|
||||
tossed = static_cast<ACoin*>(Spawn("Gold25", Owner->x, Owner->y, Owner->z, NO_REPLACE));
|
||||
}
|
||||
else if (Amount >= 10)
|
||||
{
|
||||
Amount -= 10;
|
||||
tossed = Spawn<AGold10> (Owner->x, Owner->y, Owner->z, NO_REPLACE);
|
||||
tossed = static_cast<ACoin*>(Spawn("Gold10", Owner->x, Owner->y, Owner->z, NO_REPLACE));
|
||||
}
|
||||
else if (Amount > 1 || (ItemFlags & IF_KEEPDEPLETED))
|
||||
{
|
||||
Amount -= 1;
|
||||
tossed = Spawn<ACoin> (Owner->x, Owner->y, Owner->z, NO_REPLACE);
|
||||
tossed = static_cast<ACoin*>(Spawn("Coin", Owner->x, Owner->y, Owner->z, NO_REPLACE));
|
||||
}
|
||||
else // Amount == 1 && !(ItemFlags & IF_KEEPDEPLETED)
|
||||
{
|
||||
|
|
|
@ -6,153 +6,16 @@
|
|||
#include "s_sound.h"
|
||||
#include "a_strifeglobal.h"
|
||||
|
||||
void A_ShootGun (AActor *);
|
||||
void A_SentinelRefire (AActor *);
|
||||
void A_SpawnSpectre4 (AActor *);
|
||||
|
||||
// Macil (version 1) ---------------------------------------------------------
|
||||
|
||||
class AMacil1 : public AStrifeHumanoid
|
||||
{
|
||||
DECLARE_ACTOR (AMacil1, AStrifeHumanoid)
|
||||
public:
|
||||
void NoBlockingSet ();
|
||||
};
|
||||
|
||||
FState AMacil1::States[] =
|
||||
{
|
||||
#define S_MACIL_STAND 0
|
||||
S_NORMAL (LEDR, 'C', 5, A_Look2, &States[S_MACIL_STAND]),
|
||||
S_NORMAL (LEDR, 'A', 8, NULL, &States[S_MACIL_STAND]),
|
||||
S_NORMAL (LEDR, 'B', 8, NULL, &States[S_MACIL_STAND]),
|
||||
S_NORMAL (LEAD, 'A', 6, A_Wander, &States[S_MACIL_STAND+4]),
|
||||
S_NORMAL (LEAD, 'B', 6, A_Wander, &States[S_MACIL_STAND+5]),
|
||||
S_NORMAL (LEAD, 'C', 6, A_Wander, &States[S_MACIL_STAND+6]),
|
||||
S_NORMAL (LEAD, 'D', 6, A_Wander, &States[S_MACIL_STAND]),
|
||||
|
||||
#define S_MACIL_CHASE (S_MACIL_STAND+7)
|
||||
S_NORMAL (LEAD, 'A', 3, A_Chase, &States[S_MACIL_CHASE+1]),
|
||||
S_NORMAL (LEAD, 'A', 3, A_Chase, &States[S_MACIL_CHASE+2]),
|
||||
S_NORMAL (LEAD, 'B', 3, A_Chase, &States[S_MACIL_CHASE+3]),
|
||||
S_NORMAL (LEAD, 'B', 3, A_Chase, &States[S_MACIL_CHASE+4]),
|
||||
S_NORMAL (LEAD, 'C', 3, A_Chase, &States[S_MACIL_CHASE+5]),
|
||||
S_NORMAL (LEAD, 'C', 3, A_Chase, &States[S_MACIL_CHASE+6]),
|
||||
S_NORMAL (LEAD, 'D', 3, A_Chase, &States[S_MACIL_CHASE+7]),
|
||||
S_NORMAL (LEAD, 'D', 3, A_Chase, &States[S_MACIL_CHASE]),
|
||||
|
||||
#define S_MACIL_ATK (S_MACIL_CHASE+8)
|
||||
S_NORMAL (LEAD, 'E', 2, A_FaceTarget, &States[S_MACIL_ATK+1]),
|
||||
S_BRIGHT (LEAD, 'F', 2, A_ShootGun, &States[S_MACIL_ATK+2]),
|
||||
S_NORMAL (LEAD, 'E', 2, A_SentinelRefire,&States[S_MACIL_ATK]),
|
||||
|
||||
#define S_MACIL_PAIN (S_MACIL_ATK+3)
|
||||
S_NORMAL (LEAD, 'Y', 3, NULL, &States[S_MACIL_PAIN+1]),
|
||||
S_NORMAL (LEAD, 'Y', 3, A_Pain, &States[S_MACIL_CHASE]),
|
||||
|
||||
#define S_MACIL_ATK2 (S_MACIL_PAIN+2)
|
||||
S_NORMAL (LEAD, 'E', 4, A_FaceTarget, &States[S_MACIL_ATK2+1]),
|
||||
S_BRIGHT (LEAD, 'F', 4, A_ShootGun, &States[S_MACIL_ATK2+2]),
|
||||
S_NORMAL (LEAD, 'E', 2, A_SentinelRefire,&States[S_MACIL_ATK2]),
|
||||
|
||||
#define S_MACIL_DIE (S_MACIL_ATK2+3)
|
||||
S_NORMAL (LEAD, 'G', 5, NULL, &States[S_MACIL_DIE+1]),
|
||||
S_NORMAL (LEAD, 'H', 5, A_Scream, &States[S_MACIL_DIE+2]),
|
||||
S_NORMAL (LEAD, 'I', 4, NULL, &States[S_MACIL_DIE+3]),
|
||||
S_NORMAL (LEAD, 'J', 4, NULL, &States[S_MACIL_DIE+4]),
|
||||
S_NORMAL (LEAD, 'K', 3, NULL, &States[S_MACIL_DIE+5]),
|
||||
S_NORMAL (LEAD, 'L', 3, A_NoBlocking, &States[S_MACIL_DIE+6]),
|
||||
S_NORMAL (LEAD, 'M', 3, NULL, &States[S_MACIL_DIE+7]),
|
||||
S_NORMAL (LEAD, 'N', 3, NULL, &States[S_MACIL_DIE+8]),
|
||||
S_NORMAL (LEAD, 'O', 3, NULL, &States[S_MACIL_DIE+9]),
|
||||
S_NORMAL (LEAD, 'P', 3, NULL, &States[S_MACIL_DIE+10]),
|
||||
S_NORMAL (LEAD, 'Q', 3, NULL, &States[S_MACIL_DIE+11]),
|
||||
S_NORMAL (LEAD, 'R', 3, NULL, &States[S_MACIL_DIE+12]),
|
||||
S_NORMAL (LEAD, 'S', 3, NULL, &States[S_MACIL_DIE+13]),
|
||||
S_NORMAL (LEAD, 'T', 3, NULL, &States[S_MACIL_DIE+14]),
|
||||
S_NORMAL (LEAD, 'U', 3, NULL, &States[S_MACIL_DIE+15]),
|
||||
S_NORMAL (LEAD, 'V', 3, NULL, &States[S_MACIL_DIE+16]),
|
||||
S_NORMAL (LEAD, 'W', 3, A_SpawnSpectre4, &States[S_MACIL_DIE+17]),
|
||||
S_NORMAL (LEAD, 'X', -1, NULL, NULL)
|
||||
};
|
||||
|
||||
IMPLEMENT_ACTOR (AMacil1, Strife, 64, 0)
|
||||
PROP_StrifeType (49)
|
||||
PROP_StrifeTeaserType (48)
|
||||
PROP_StrifeTeaserType2 (49)
|
||||
PROP_SpawnState (S_MACIL_STAND)
|
||||
PROP_SpawnHealth (95)
|
||||
PROP_SeeState (S_MACIL_CHASE)
|
||||
PROP_PainState (S_MACIL_PAIN)
|
||||
PROP_PainChance (250)
|
||||
PROP_MissileState (S_MACIL_ATK)
|
||||
PROP_DeathState (S_MACIL_CHASE)
|
||||
PROP_Flags (MF_SOLID|MF_SHOOTABLE|MF_NOTDMATCH)
|
||||
PROP_Flags2 (MF2_FLOORCLIP|MF2_PASSMOBJ|MF2_PUSHWALL|MF2_MCROSS)
|
||||
PROP_Flags3 (MF3_ISMONSTER)
|
||||
PROP_Flags4 (MF4_FIRERESIST|MF4_NOICEDEATH|MF4_NOSPLASHALERT)
|
||||
PROP_Flags5 (MF5_NODAMAGE)
|
||||
PROP_MinMissileChance (150)
|
||||
PROP_RadiusFixed (20)
|
||||
PROP_HeightFixed (56)
|
||||
PROP_SpeedFixed (8)
|
||||
PROP_SeeSound ("macil/sight")
|
||||
PROP_PainSound ("macil/pain")
|
||||
PROP_ActiveSound ("macil/active")
|
||||
PROP_Tag ("MACIL")
|
||||
PROP_Obituary ("$OB_MACIL")
|
||||
END_DEFAULTS
|
||||
|
||||
//============================================================================
|
||||
//
|
||||
// AMacil1 :: NoBlockingSet
|
||||
//
|
||||
//============================================================================
|
||||
|
||||
void AMacil1::NoBlockingSet ()
|
||||
{
|
||||
P_DropItem (this, "BoxOfBullets", -1, 256);
|
||||
}
|
||||
|
||||
// Macil (version 2) ---------------------------------------------------------
|
||||
|
||||
class AMacil2 : public AMacil1
|
||||
class AMacil1 : public AActor
|
||||
{
|
||||
DECLARE_STATELESS_ACTOR (AMacil2, AMacil1)
|
||||
DECLARE_CLASS (AMacil1, AActor)
|
||||
public:
|
||||
void NoBlockingSet ();
|
||||
int TakeSpecialDamage (AActor *inflictor, AActor *source, int damage, FName damagetype);
|
||||
};
|
||||
|
||||
IMPLEMENT_STATELESS_ACTOR (AMacil2, Strife, 200, 0)
|
||||
PROP_StrifeType (50)
|
||||
PROP_StrifeTeaserType (49)
|
||||
PROP_StrifeTeaserType2 (50)
|
||||
PROP_PainChance (200)
|
||||
PROP_MissileState (S_MACIL_ATK2)
|
||||
PROP_DeathState (S_MACIL_DIE)
|
||||
PROP_XDeathState (S_MACIL_DIE)
|
||||
PROP_Flags (MF_SOLID|MF_SHOOTABLE|MF_COUNTKILL|MF_NOTDMATCH)
|
||||
PROP_Flags2 (MF2_FLOORCLIP|MF2_PASSMOBJ|MF2_PUSHWALL|MF2_MCROSS)
|
||||
PROP_Flags4Clear (MF4_FIRERESIST)
|
||||
PROP_Flags4Set (MF4_SPECTRAL)
|
||||
PROP_Flags5Clear (MF5_NODAMAGE)
|
||||
PROP_MinMissileChance (150)
|
||||
PROP_Tag ("MACIL")
|
||||
PROP_DeathSound ("macil/slop")
|
||||
END_DEFAULTS
|
||||
|
||||
|
||||
//============================================================================
|
||||
//
|
||||
// AMacil2 :: NoBlockingSet
|
||||
//
|
||||
// The second version of Macil spawns a specter instead of dropping something.
|
||||
//
|
||||
//============================================================================
|
||||
|
||||
void AMacil2::NoBlockingSet ()
|
||||
{
|
||||
}
|
||||
IMPLEMENT_CLASS (AMacil1)
|
||||
|
||||
//============================================================================
|
||||
//
|
||||
|
@ -162,7 +25,7 @@ void AMacil2::NoBlockingSet ()
|
|||
//
|
||||
//============================================================================
|
||||
|
||||
int AMacil2::TakeSpecialDamage (AActor *inflictor, AActor *source, int damage, FName damagetype)
|
||||
int AMacil1::TakeSpecialDamage (AActor *inflictor, AActor *source, int damage, FName damagetype)
|
||||
{
|
||||
if (inflictor != NULL && inflictor->GetClass()->TypeName == NAME_SpectralLightningV1)
|
||||
return -1;
|
||||
|
|
|
@ -3,59 +3,16 @@
|
|||
#include "a_strifeglobal.h"
|
||||
#include "p_enemy.h"
|
||||
|
||||
void A_WakeOracleSpectre (AActor *);
|
||||
|
||||
// Oracle -------------------------------------------------------------------
|
||||
|
||||
FState AOracle::States[] =
|
||||
class AOracle : public AActor
|
||||
{
|
||||
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)
|
||||
DECLARE_CLASS (AOracle, AActor)
|
||||
public:
|
||||
int TakeSpecialDamage (AActor *inflictor, AActor *source, int damage, FName damagetype);
|
||||
};
|
||||
|
||||
IMPLEMENT_ACTOR (AOracle, Strife, 199, 0)
|
||||
PROP_StrifeType (65)
|
||||
PROP_StrifeTeaserType (62)
|
||||
PROP_StrifeTeaserType2 (63)
|
||||
PROP_SpawnHealth (1)
|
||||
PROP_SpawnState (0)
|
||||
PROP_DeathState (1)
|
||||
PROP_RadiusFixed (15)
|
||||
PROP_HeightFixed (56)
|
||||
PROP_Flags (MF_SOLID|MF_SHOOTABLE|MF_NOBLOOD|MF_COUNTKILL|MF_NOTDMATCH)
|
||||
PROP_Flags2 (MF2_FLOORCLIP|MF2_PASSMOBJ|MF2_PUSHWALL|MF2_MCROSS)
|
||||
PROP_Flags4 (MF4_FIRERESIST)
|
||||
PROP_MaxDropOffHeight (32)
|
||||
PROP_MinMissileChance (150)
|
||||
PROP_Tag ("ORACLE")
|
||||
END_DEFAULTS
|
||||
|
||||
//============================================================================
|
||||
//
|
||||
// AOracle :: NoBlockingSet
|
||||
//
|
||||
//============================================================================
|
||||
IMPLEMENT_CLASS (AOracle)
|
||||
|
||||
void AOracle::NoBlockingSet ()
|
||||
{
|
||||
P_DropItem (this, "Meat", -1, 256);
|
||||
}
|
||||
|
||||
void A_WakeOracleSpectre (AActor *self)
|
||||
{
|
||||
|
|
|
@ -32,7 +32,7 @@ public:
|
|||
|
||||
class ACoin : public AInventory
|
||||
{
|
||||
DECLARE_ACTOR (ACoin, AInventory)
|
||||
DECLARE_CLASS (ACoin, AInventory)
|
||||
public:
|
||||
const char *PickupMessage ();
|
||||
bool HandlePickup (AInventory *item);
|
||||
|
@ -40,14 +40,6 @@ public:
|
|||
AInventory *CreateCopy (AActor *other);
|
||||
};
|
||||
|
||||
class AOracle : public AActor
|
||||
{
|
||||
DECLARE_ACTOR (AOracle, AActor)
|
||||
public:
|
||||
void NoBlockingSet ();
|
||||
int TakeSpecialDamage (AActor *inflictor, AActor *source, int damage, FName damagetype);
|
||||
};
|
||||
|
||||
class ADummyStrifeItem : public AInventory
|
||||
{
|
||||
DECLARE_ACTOR (ADummyStrifeItem, AInventory)
|
||||
|
|
|
@ -853,110 +853,13 @@ void A_ClearSoundTarget (AActor *self)
|
|||
}
|
||||
|
||||
|
||||
// Fire Droplet -------------------------------------------------------------
|
||||
|
||||
class AFireDroplet : public AActor
|
||||
{
|
||||
DECLARE_ACTOR (AFireDroplet, AActor)
|
||||
};
|
||||
|
||||
// [RH] I think these should be bright, even though they weren't in Strife.
|
||||
FState AFireDroplet::States[] =
|
||||
{
|
||||
S_BRIGHT (FFOT, 'A', 9, NULL, &States[1]),
|
||||
S_BRIGHT (FFOT, 'B', 9, NULL, &States[2]),
|
||||
S_BRIGHT (FFOT, 'C', 9, NULL, &States[3]),
|
||||
S_BRIGHT (FFOT, 'D', 9, NULL, NULL)
|
||||
};
|
||||
|
||||
IMPLEMENT_ACTOR (AFireDroplet, Strife, -1, 0)
|
||||
PROP_StrifeType (297)
|
||||
PROP_SpawnState (0)
|
||||
PROP_Flags (MF_NOBLOCKMAP|MF_NOCLIP)
|
||||
END_DEFAULTS
|
||||
|
||||
// Humanoid Base Class ------------------------------------------------------
|
||||
|
||||
void A_ItBurnsItBurns (AActor *);
|
||||
void A_DropFire (AActor *);
|
||||
void A_CrispyPlayer (AActor *);
|
||||
void A_HandLower (AActor *);
|
||||
void A_Yeargh (AActor *);
|
||||
|
||||
FState AStrifeHumanoid::States[] =
|
||||
{
|
||||
#define S_FIREHANDS 0
|
||||
S_BRIGHT (WAVE, 'A', 3, NULL, &States[S_FIREHANDS+1]),
|
||||
S_BRIGHT (WAVE, 'B', 3, NULL, &States[S_FIREHANDS+2]),
|
||||
S_BRIGHT (WAVE, 'C', 3, NULL, &States[S_FIREHANDS+3]),
|
||||
S_BRIGHT (WAVE, 'D', 3, NULL, &States[S_FIREHANDS]),
|
||||
|
||||
// [RH] These weren't bright in Strife, but I think they should be.
|
||||
// (After all, they are now a light source.)
|
||||
#define S_HUMAN_BURNDEATH (S_FIREHANDS+4)
|
||||
S_BRIGHT (BURN, 'A', 3, A_ItBurnsItBurns, &States[S_HUMAN_BURNDEATH+1]),
|
||||
S_BRIGHT (BURN, 'B', 3, A_DropFire, &States[S_HUMAN_BURNDEATH+2]),
|
||||
S_BRIGHT (BURN, 'C', 3, A_Wander, &States[S_HUMAN_BURNDEATH+3]),
|
||||
S_BRIGHT (BURN, 'D', 3, A_NoBlocking, &States[S_HUMAN_BURNDEATH+4]),
|
||||
S_BRIGHT (BURN, 'E', 5, A_DropFire, &States[S_HUMAN_BURNDEATH+5]),
|
||||
S_BRIGHT (BURN, 'F', 5, A_Wander, &States[S_HUMAN_BURNDEATH+6]),
|
||||
S_BRIGHT (BURN, 'G', 5, A_Wander, &States[S_HUMAN_BURNDEATH+7]),
|
||||
S_BRIGHT (BURN, 'H', 5, A_Wander, &States[S_HUMAN_BURNDEATH+8]),
|
||||
S_BRIGHT (BURN, 'I', 5, A_DropFire, &States[S_HUMAN_BURNDEATH+9]),
|
||||
S_BRIGHT (BURN, 'J', 5, A_Wander, &States[S_HUMAN_BURNDEATH+10]),
|
||||
S_BRIGHT (BURN, 'K', 5, A_Wander, &States[S_HUMAN_BURNDEATH+11]),
|
||||
S_BRIGHT (BURN, 'L', 5, A_Wander, &States[S_HUMAN_BURNDEATH+12]),
|
||||
S_BRIGHT (BURN, 'M', 3, A_DropFire, &States[S_HUMAN_BURNDEATH+13]),
|
||||
S_BRIGHT (BURN, 'N', 3, NULL, &States[S_HUMAN_BURNDEATH+14]),
|
||||
S_BRIGHT (BURN, 'O', 5, NULL, &States[S_HUMAN_BURNDEATH+15]),
|
||||
S_BRIGHT (BURN, 'P', 5, NULL, &States[S_HUMAN_BURNDEATH+16]),
|
||||
S_BRIGHT (BURN, 'Q', 5, NULL, &States[S_HUMAN_BURNDEATH+17]),
|
||||
S_BRIGHT (BURN, 'P', 5, NULL, &States[S_HUMAN_BURNDEATH+18]),
|
||||
S_BRIGHT (BURN, 'Q', 5, NULL, &States[S_HUMAN_BURNDEATH+19]),
|
||||
S_BRIGHT (BURN, 'R', 7, NULL, &States[S_HUMAN_BURNDEATH+20]),
|
||||
S_BRIGHT (BURN, 'S', 7, NULL, &States[S_HUMAN_BURNDEATH+21]),
|
||||
S_BRIGHT (BURN, 'T', 7, NULL, &States[S_HUMAN_BURNDEATH+22]),
|
||||
S_BRIGHT (BURN, 'U', 7, NULL, &States[S_HUMAN_BURNDEATH+23]),
|
||||
S_BRIGHT (BURN, 'V',700,NULL, NULL),
|
||||
|
||||
#define S_HUMAN_ZAPDEATH (S_HUMAN_BURNDEATH+24)
|
||||
S_NORMAL (DISR, 'A', 5, A_Yeargh, &States[S_HUMAN_ZAPDEATH+1]),
|
||||
S_NORMAL (DISR, 'B', 5, NULL, &States[S_HUMAN_ZAPDEATH+2]),
|
||||
S_NORMAL (DISR, 'C', 5, NULL, &States[S_HUMAN_ZAPDEATH+3]),
|
||||
S_NORMAL (DISR, 'D', 5, A_NoBlocking, &States[S_HUMAN_ZAPDEATH+4]),
|
||||
S_NORMAL (DISR, 'E', 5, NULL, &States[S_HUMAN_ZAPDEATH+5]),
|
||||
S_NORMAL (DISR, 'F', 5, NULL, &States[S_HUMAN_ZAPDEATH+6]),
|
||||
S_NORMAL (DISR, 'G', 4, NULL, &States[S_HUMAN_ZAPDEATH+7]),
|
||||
S_NORMAL (DISR, 'H', 4, NULL, &States[S_HUMAN_ZAPDEATH+8]),
|
||||
S_NORMAL (DISR, 'I', 4, NULL, &States[S_HUMAN_ZAPDEATH+9]),
|
||||
S_NORMAL (DISR, 'J', 4, NULL, &States[S_HUMAN_ZAPDEATH+10]),
|
||||
S_NORMAL (MEAT, 'D',700,NULL, NULL),
|
||||
|
||||
#define S_FIREHANDS2 (S_HUMAN_ZAPDEATH+11)
|
||||
S_BRIGHT (WAVE, 'A', 3, A_HandLower, &States[S_FIREHANDS2+1]),
|
||||
S_BRIGHT (WAVE, 'B', 3, A_HandLower, &States[S_FIREHANDS2+2]),
|
||||
S_BRIGHT (WAVE, 'C', 3, A_HandLower, &States[S_FIREHANDS2+3]),
|
||||
S_BRIGHT (WAVE, 'D', 3, A_HandLower, &States[S_FIREHANDS2]),
|
||||
};
|
||||
|
||||
IMPLEMENT_ACTOR (AStrifeHumanoid, Any, -1, 0)
|
||||
PROP_BDeathState (S_HUMAN_BURNDEATH)
|
||||
PROP_EDeathState (S_HUMAN_ZAPDEATH)
|
||||
PROP_MaxStepHeight (16)
|
||||
PROP_MaxDropOffHeight (32)
|
||||
END_DEFAULTS
|
||||
|
||||
void A_ItBurnsItBurns (AActor *self)
|
||||
{
|
||||
FSoundID burnsound = "human/imonfire";
|
||||
if (burnsound != 0)
|
||||
{
|
||||
self->DeathSound = burnsound;
|
||||
}
|
||||
A_Scream (self);
|
||||
S_Sound (self, CHAN_VOICE, "human/imonfire", 1, ATTN_NORM);
|
||||
|
||||
if (self->player != NULL && self->player->mo == self)
|
||||
{
|
||||
P_SetPsprite (self->player, ps_weapon, &AStrifeHumanoid::States[S_FIREHANDS]);
|
||||
P_SetPsprite (self->player, ps_weapon, self->FindState("FireHands"));
|
||||
P_SetPsprite (self->player, ps_flash, NULL);
|
||||
self->player->ReadyWeapon = NULL;
|
||||
self->player->PendingWeapon = WP_NOCHANGE;
|
||||
|
@ -966,7 +869,7 @@ void A_ItBurnsItBurns (AActor *self)
|
|||
|
||||
void A_DropFire (AActor *self)
|
||||
{
|
||||
AActor *drop = Spawn<AFireDroplet> (self->x, self->y, self->z + 24*FRACUNIT, ALLOW_REPLACE);
|
||||
AActor *drop = Spawn("FireDroplet", self->x, self->y, self->z + 24*FRACUNIT, ALLOW_REPLACE);
|
||||
drop->momz = -FRACUNIT;
|
||||
P_RadiusAttack (self, self, 64, 64, NAME_Fire, false);
|
||||
}
|
||||
|
@ -976,8 +879,9 @@ void A_CrispyPlayer (AActor *self)
|
|||
if (self->player != NULL && self->player->mo == self)
|
||||
{
|
||||
self->player->playerstate = PST_DEAD;
|
||||
P_SetPsprite (self->player, ps_weapon, &AStrifeHumanoid::States[S_FIREHANDS2 +
|
||||
(self->player->psprites[ps_weapon].state - &AStrifeHumanoid::States[S_FIREHANDS])]);
|
||||
P_SetPsprite (self->player, ps_weapon,
|
||||
self->player->psprites[ps_weapon].state +
|
||||
(self->FindState("FireHandsLower") - self->FindState("FireHands")));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -994,9 +898,3 @@ void A_HandLower (AActor *self)
|
|||
}
|
||||
}
|
||||
|
||||
void A_Yeargh (AActor *self)
|
||||
{
|
||||
S_Sound (self, CHAN_VOICE, "misc/disruptordeath", 1, ATTN_NORM);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -131,6 +131,7 @@ xx(AlienSpectre2)
|
|||
xx(AlienSpectre3)
|
||||
xx(AlienSpectre4)
|
||||
xx(AlienSpectre5)
|
||||
xx(Oracle)
|
||||
|
||||
xx(Chicken)
|
||||
xx(Pig)
|
||||
|
|
|
@ -183,6 +183,7 @@ class Actor extends Thinker
|
|||
action native A_ShootGun();
|
||||
action native A_RocketInFlight();
|
||||
action native A_Bang4Cloud();
|
||||
action native A_DropFire();
|
||||
action native A_GiveQuestItem(eval int itemno);
|
||||
}
|
||||
|
||||
|
|
93
wadsrc/static/actors/strife/coin.txt
Normal file
93
wadsrc/static/actors/strife/coin.txt
Normal file
|
@ -0,0 +1,93 @@
|
|||
|
||||
// Coin ---------------------------------------------------------------------
|
||||
|
||||
ACTOR Coin : Inventory 93 native
|
||||
{
|
||||
Game Strife
|
||||
ConversationID 168, 161, 165
|
||||
+DROPPED
|
||||
+NOTDMATCH
|
||||
+FLOORCLIP
|
||||
Inventory.MaxAmount 0x7fffffff
|
||||
+INVENTORY.INVBAR
|
||||
Tag "coin"
|
||||
Inventory.Icon "I_COIN"
|
||||
Inventory.PickupMessage "$TXT_COIN"
|
||||
States
|
||||
{
|
||||
Spawn:
|
||||
COIN A -1
|
||||
Stop
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// 10 Gold ------------------------------------------------------------------
|
||||
|
||||
ACTOR Gold10 : Coin 138
|
||||
{
|
||||
Game Strife
|
||||
ConversationID 169, 162, 166
|
||||
Inventory.Amount 10
|
||||
Tag "10_gold"
|
||||
Inventory.PickupMessage "$TXT_10GOLD"
|
||||
States
|
||||
{
|
||||
Spawn:
|
||||
CRED A -1
|
||||
Stop
|
||||
}
|
||||
}
|
||||
|
||||
// 25 Gold ------------------------------------------------------------------
|
||||
|
||||
ACTOR Gold25 : Coin 139
|
||||
{
|
||||
Game Strife
|
||||
ConversationID 170, 163, 167
|
||||
Inventory.Amount 25
|
||||
Tag "25_gold"
|
||||
Inventory.PickupMessage "$TXT_25GOLD"
|
||||
States
|
||||
{
|
||||
Spawn:
|
||||
SACK A -1
|
||||
Stop
|
||||
}
|
||||
}
|
||||
|
||||
// 50 Gold ------------------------------------------------------------------
|
||||
|
||||
ACTOR Gold50 : Coin 140
|
||||
{
|
||||
Game Strife
|
||||
ConversationID 171, 164, 168
|
||||
Inventory.Amount 50
|
||||
Tag "50_gold"
|
||||
Inventory.PickupMessage "$TXT_50GOLD"
|
||||
States
|
||||
{
|
||||
Spawn:
|
||||
CHST A -1
|
||||
Stop
|
||||
}
|
||||
}
|
||||
|
||||
// 300 Gold ------------------------------------------------------------------
|
||||
|
||||
ACTOR Gold300 : Coin
|
||||
{
|
||||
ConversationID 172, -1, -1
|
||||
Inventory.Amount 300
|
||||
Tag "300_gold"
|
||||
Inventory.PickupMessage "$TXT_300GOLD"
|
||||
Inventory.GiveQuest 3
|
||||
+INVENTORY.ALWAYSPICKUP
|
||||
States
|
||||
{
|
||||
Spawn:
|
||||
TOKN A -1
|
||||
Stop
|
||||
}
|
||||
}
|
||||
|
89
wadsrc/static/actors/strife/macil.txt
Normal file
89
wadsrc/static/actors/strife/macil.txt
Normal file
|
@ -0,0 +1,89 @@
|
|||
|
||||
// Macil (version 1) ---------------------------------------------------------
|
||||
|
||||
ACTOR Macil1 64 native
|
||||
{
|
||||
Game Strife
|
||||
ConversationID 49, 48, 49
|
||||
Health 95
|
||||
Radius 20
|
||||
Height 56
|
||||
Speed 8
|
||||
Painchance 250
|
||||
Monster
|
||||
-COUNTKILL
|
||||
+NOTDMATCH
|
||||
+FIRERESIST
|
||||
+NOICEDEATH
|
||||
+NOSPLASHALERT
|
||||
+NODAMAGE
|
||||
MinMissileChance 150
|
||||
SeeSound "macil/sight"
|
||||
PainSound "macil/pain"
|
||||
ActiveSound "macil/active"
|
||||
Tag "MACIL"
|
||||
Obituary "$OB_MACIL"
|
||||
DropItem "BoxOfBullets"
|
||||
MaxStepHeight 16
|
||||
MaxDropoffHeight 32
|
||||
States
|
||||
{
|
||||
Spawn:
|
||||
LEDR C 5 A_Look2
|
||||
Loop
|
||||
LEDR A 8
|
||||
Loop
|
||||
LEDR B 8
|
||||
Loop
|
||||
LEAD ABCD 6 A_Wander
|
||||
Loop
|
||||
See:
|
||||
LEAD AABBCCDD 3 A_Chase
|
||||
Loop
|
||||
Missile:
|
||||
Death:
|
||||
LEAD E 2 A_FaceTarget
|
||||
LEAD F 2 BRIGHT A_ShootGun
|
||||
LEAD E 2 A_SentinelRefire
|
||||
Loop
|
||||
Pain:
|
||||
LEAD Y 3
|
||||
LEAD Y 3 A_Pain
|
||||
Goto See
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Macil (version 2) ---------------------------------------------------------
|
||||
|
||||
ACTOR Macil2 : Macil1 200
|
||||
{
|
||||
Game Strife
|
||||
ConversationID 50, 49, 50
|
||||
Painchance 200
|
||||
+COUNTKILL
|
||||
+SPECTRAL
|
||||
-NODAMAGE
|
||||
DeathSound "macil/slop"
|
||||
DropItem "None"
|
||||
States
|
||||
{
|
||||
Missile:
|
||||
LEAD E 4 A_FaceTarget
|
||||
LEAD F 4 BRIGHT A_ShootGun
|
||||
LEAD E 2 A_SentinelRefire
|
||||
Loop
|
||||
Death:
|
||||
LEAD G 5
|
||||
LEAD H 5 A_Scream
|
||||
LEAD IJ 4
|
||||
LEAD K 3
|
||||
LEAD L 3 A_NoBlocking
|
||||
LEAD MNOPQRSTUV 3
|
||||
LEAD W 4 Bright A_SpawnItemEx("AlienSpectre4", 0, 0, 0, 0, 0, random[spectrespawn](0,255)*0.0078125, 0, SXF_NOCHECKPOSITION)
|
||||
LEAD X -1
|
||||
Stop
|
||||
}
|
||||
}
|
||||
|
||||
|
34
wadsrc/static/actors/strife/oracle.txt
Normal file
34
wadsrc/static/actors/strife/oracle.txt
Normal file
|
@ -0,0 +1,34 @@
|
|||
|
||||
// Oracle -------------------------------------------------------------------
|
||||
|
||||
ACTOR Oracle 199 native
|
||||
{
|
||||
Game Strife
|
||||
ConversationID 65, 62, 63
|
||||
Health 1
|
||||
Radius 15
|
||||
Height 56
|
||||
Monster
|
||||
+NOTDMATCH
|
||||
+FIRERESIST
|
||||
MaxDropoffHeight 32
|
||||
Tag "Oracle"
|
||||
DropItem "Meat"
|
||||
|
||||
action native A_WakeOracleSpectre ();
|
||||
|
||||
States
|
||||
{
|
||||
Spawn:
|
||||
ORCL A -1
|
||||
Stop
|
||||
Death:
|
||||
ORCL BCDEFGHIJK 5
|
||||
ORCL L 5 A_NoBlocking
|
||||
ORCL M 5
|
||||
ORCL N 5 A_WakeOracleSpectre
|
||||
ORCL OP 5
|
||||
ORCL Q -1
|
||||
Stop
|
||||
}
|
||||
}
|
53
wadsrc/static/actors/strife/strifehumanoid.txt
Normal file
53
wadsrc/static/actors/strife/strifehumanoid.txt
Normal file
|
@ -0,0 +1,53 @@
|
|||
|
||||
// Humanoid Base Class ------------------------------------------------------
|
||||
|
||||
|
||||
ACTOR StrifeHumanoid
|
||||
{
|
||||
MaxStepHeight 16
|
||||
MaxDropoffHeight 32
|
||||
|
||||
States
|
||||
{
|
||||
Burn:
|
||||
BURN A 3 Bright A_PlaySoundEx("human/imonfire", "Voice")
|
||||
BURN B 3 Bright A_DropFire
|
||||
BURN C 3 Bright A_Wander
|
||||
BURN D 3 Bright A_NoBlocking
|
||||
BURN E 5 Bright A_DropFire
|
||||
BURN FGH 5 Bright A_Wander
|
||||
BURN I 5 Bright A_DropFire
|
||||
BURN JKL 5 Bright A_Wander
|
||||
BURN M 5 Bright A_DropFire
|
||||
BURN N 5 Bright
|
||||
BURN OPQPQ 5 Bright
|
||||
BURN RSTU 7 Bright
|
||||
BURN V -1
|
||||
Stop
|
||||
Disintegrate:
|
||||
DISR A 5 A_PlaySoundEx("misc/disruptordeath", "Voice")
|
||||
DISR BC 5
|
||||
DISR D 5 A_NoBlocking
|
||||
DISR EF 5
|
||||
DISR GHIJ 4
|
||||
MEAT D -1
|
||||
Stop
|
||||
}
|
||||
}
|
||||
|
||||
// Fire Droplet -------------------------------------------------------------
|
||||
|
||||
ACTOR FireDroplet
|
||||
{
|
||||
ConversationID 297, -1, -1
|
||||
+NOBLOCKMAP
|
||||
+NOCLIP
|
||||
States
|
||||
{
|
||||
Spawn:
|
||||
FFOT ABCD 9 Bright
|
||||
Stop
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -14,8 +14,8 @@ ACTOR StrifePlayer : PlayerPawn
|
|||
Player.StartItem "PunchDagger"
|
||||
|
||||
action native A_ItBurnsItBurns();
|
||||
action native A_DropFire();
|
||||
action native A_CrispyPlayer();
|
||||
action native A_HandLower();
|
||||
|
||||
States
|
||||
{
|
||||
|
@ -71,6 +71,12 @@ ACTOR StrifePlayer : PlayerPawn
|
|||
DISR GHIJ 4
|
||||
MEAT D -1
|
||||
Stop
|
||||
Firehands:
|
||||
WAVE ABCD 3
|
||||
Loop
|
||||
Firehandslower:
|
||||
WAVE ABCD 3 A_HandLower
|
||||
Loop
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -101,18 +101,22 @@
|
|||
#include "actors/hexen/magelightning.txt"
|
||||
#include "actors/hexen/magestaff.txt"
|
||||
|
||||
#include "actors/strife/strifehumanoid.txt"
|
||||
#include "actors/strife/strifeplayer.txt"
|
||||
#include "actors/strife/spectral.txt"
|
||||
#include "actors/strife/acolyte.txt"
|
||||
#include "actors/strife/alienspectres.txt"
|
||||
#include "actors/strife/beggars.txt"
|
||||
#include "actors/strife/coin.txt"
|
||||
#include "actors/strife/crusader.txt"
|
||||
#include "actors/strife/entityboss.txt"
|
||||
#include "actors/strife/inquisitor.txt"
|
||||
#include "actors/strife/loremaster.txt"
|
||||
#include "actors/strife/macil.txt"
|
||||
#include "actors/strife/merchants.txt"
|
||||
#include "actors/strife/peasants.txt"
|
||||
#include "actors/strife/strifebishop.txt"
|
||||
#include "actors/strife/oracle.txt"
|
||||
#include "actors/strife/programmer.txt"
|
||||
#include "actors/strife/questitems.txt"
|
||||
#include "actors/strife/ratbuddy.txt"
|
||||
|
|
Loading…
Reference in a new issue