From 30885e6d86948d1bb96796d204ef6cfa37f796ea Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Mon, 27 Nov 2006 21:51:36 +0000 Subject: [PATCH] - Changed: When playing a shareware game no external WADs are loaded at all, not even zvox.wad or the skins directory. - Minor improvement of Hexen's Demons: They now transfer the translation to the chunks they spawn so that they look correct if they are color translated. See Resurrection of Chaos for an example. - Converted Key gizmos to DECORATE. - Converted Heretic's Beast (Weredragon) to DECORATE. - Added a randomness parameter to A_SpawnItemEx. This allows spawning objects with a random chance without the need to write complicated A_Jump constructs. - Converted Heretic's Mummy to DECORATE. - Converted Hexen's Demons to DECORATE. SVN r393 (trunk) --- docs/rh-log.txt | 14 + src/d_main.cpp | 49 +- src/g_heretic/a_beast.cpp | 216 -------- src/g_heretic/a_heretickeys.cpp | 109 ---- src/g_heretic/a_hereticmisc.cpp | 17 + src/g_heretic/a_mummy.cpp | 297 ----------- src/g_hexen/a_demons.cpp | 666 ------------------------ src/thingdef.cpp | 2 +- src/thingdef_codeptr.cpp | 6 +- wadsrc/decorate/decorate.txt | 3 + wadsrc/decorate/heretic/beast.txt | 113 ++++ wadsrc/decorate/heretic/heretickeys.txt | 96 ++++ wadsrc/decorate/heretic/mummy.txt | 142 +++++ wadsrc/decorate/hexen/demons.txt | 392 ++++++++++++++ wadsrc/zdoom.lst | 3 + zdoom.vcproj | 144 ----- 16 files changed, 812 insertions(+), 1457 deletions(-) delete mode 100644 src/g_heretic/a_beast.cpp delete mode 100644 src/g_heretic/a_heretickeys.cpp delete mode 100644 src/g_heretic/a_mummy.cpp delete mode 100644 src/g_hexen/a_demons.cpp create mode 100644 wadsrc/decorate/heretic/beast.txt create mode 100644 wadsrc/decorate/heretic/mummy.txt create mode 100644 wadsrc/decorate/hexen/demons.txt diff --git a/docs/rh-log.txt b/docs/rh-log.txt index d14f04a2f2..c20dfee8c1 100644 --- a/docs/rh-log.txt +++ b/docs/rh-log.txt @@ -1,3 +1,17 @@ +November 27, 2006 (Changes by Graf Zahl) +- Changed: When playing a shareware game no external WADs are loaded at all, + not even zvox.wad or the skins directory. +- Minor improvement of Hexen's Demons: They now transfer the translation + to the chunks they spawn so that they look correct if they are color + translated. See Resurrection of Chaos for an example. +- Converted Key gizmos to DECORATE. +- Converted Heretic's Beast (Weredragon) to DECORATE. +- Added a randomness parameter to A_SpawnItemEx. This allows + spawning objects with a random chance without the need to write + complicated A_Jump constructs. +- Converted Heretic's Mummy to DECORATE. +- Converted Hexen's Demons to DECORATE. + November 26, 2006 (Changes by Graf Zahl) - Converted Ettin and Centaur to DECORATE. - Made the Ettin's and Centaur's howling sound an actor property. diff --git a/src/d_main.cpp b/src/d_main.cpp index a64fa14f4a..d1399f6756 100644 --- a/src/d_main.cpp +++ b/src/d_main.cpp @@ -1972,33 +1972,36 @@ void D_DoomMain (void) I_SetTitleString (IWADTypeNames[IdentifyVersion(wad)]); GameConfig->DoGameSetup (GameNames[gameinfo.gametype]); - // [RH] zvox.wad - A wad I had intended to be automatically generated - // from Q2's pak0.pak so the female and cyborg player could have - // voices. I never got around to writing the utility to do it, though. - // And I probably never will now. But I know at least one person uses - // it for something else, so this gets to stay here. - wad = BaseFileSearch ("zvox.wad", NULL); - if (wad) - D_AddFile (wad); - // [RH] Add any .wad files in the skins directory -#ifdef unix - sprintf (file, "%sskins", SHARE_DIR); -#else - sprintf (file, "%sskins", progdir); -#endif - D_AddDirectory (file); - - const char *home = getenv ("HOME"); - if (home) - { - sprintf (file, "%s%s.zdoom/skins", home, - home[strlen(home)-1] == '/' ? "" : "/"); - D_AddDirectory (file); - } if (!(gameinfo.flags & GI_SHAREWARE)) { + // [RH] zvox.wad - A wad I had intended to be automatically generated + // from Q2's pak0.pak so the female and cyborg player could have + // voices. I never got around to writing the utility to do it, though. + // And I probably never will now. But I know at least one person uses + // it for something else, so this gets to stay here. + wad = BaseFileSearch ("zvox.wad", NULL); + if (wad) + D_AddFile (wad); + + // [RH] Add any .wad files in the skins directory +#ifdef unix + sprintf (file, "%sskins", SHARE_DIR); +#else + sprintf (file, "%sskins", progdir); +#endif + D_AddDirectory (file); + + const char *home = getenv ("HOME"); + if (home) + { + sprintf (file, "%s%s.zdoom/skins", home, + home[strlen(home)-1] == '/' ? "" : "/"); + D_AddDirectory (file); + } + + // Add common (global) wads D_AddConfigWads ("Global.Autoload"); diff --git a/src/g_heretic/a_beast.cpp b/src/g_heretic/a_beast.cpp deleted file mode 100644 index 9b2c76b949..0000000000 --- a/src/g_heretic/a_beast.cpp +++ /dev/null @@ -1,216 +0,0 @@ -#include "actor.h" -#include "info.h" -#include "m_random.h" -#include "s_sound.h" -#include "p_local.h" -#include "p_enemy.h" -#include "a_action.h" -#include "gstrings.h" - -static FRandom pr_beastatk ("BeastAttack"); -static FRandom pr_beastpuff ("BeastPuff"); - -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) - S_NORMAL (BEAS, 'G', 3, NULL , &States[S_BEAST_PAIN+1]), - S_NORMAL (BEAS, 'G', 3, A_Pain , &States[S_BEAST_WALK+0]), - -#define S_BEAST_DIE (S_BEAST_PAIN+2) - S_NORMAL (BEAS, 'R', 6, NULL , &States[S_BEAST_DIE+1]), - S_NORMAL (BEAS, 'S', 6, A_Scream , &States[S_BEAST_DIE+2]), - S_NORMAL (BEAS, 'T', 6, NULL , &States[S_BEAST_DIE+3]), - S_NORMAL (BEAS, 'U', 6, NULL , &States[S_BEAST_DIE+4]), - S_NORMAL (BEAS, 'V', 6, NULL , &States[S_BEAST_DIE+5]), - S_NORMAL (BEAS, 'W', 6, A_NoBlocking , &States[S_BEAST_DIE+6]), - S_NORMAL (BEAS, 'X', 6, NULL , &States[S_BEAST_DIE+7]), - S_NORMAL (BEAS, 'Y', 6, NULL , &States[S_BEAST_DIE+8]), - S_NORMAL (BEAS, 'Z', -1, NULL , NULL), - -#define S_BEAST_XDIE (S_BEAST_DIE+9) - S_NORMAL (BEAS, 'J', 5, NULL , &States[S_BEAST_XDIE+1]), - S_NORMAL (BEAS, 'K', 6, A_Scream , &States[S_BEAST_XDIE+2]), - S_NORMAL (BEAS, 'L', 5, NULL , &States[S_BEAST_XDIE+3]), - S_NORMAL (BEAS, 'M', 6, NULL , &States[S_BEAST_XDIE+4]), - S_NORMAL (BEAS, 'N', 5, NULL , &States[S_BEAST_XDIE+5]), - S_NORMAL (BEAS, 'O', 6, A_NoBlocking , &States[S_BEAST_XDIE+6]), - S_NORMAL (BEAS, 'P', 5, NULL , &States[S_BEAST_XDIE+7]), - S_NORMAL (BEAS, 'Q', -1, NULL , NULL) -}; - -IMPLEMENT_ACTOR (ABeast, Heretic, 70, 3) - PROP_SpawnHealth (220) - PROP_RadiusFixed (32) - PROP_HeightFixed (74) - PROP_Mass (200) - PROP_SpeedFixed (14) - PROP_PainChance (100) - PROP_Flags (MF_SOLID|MF_SHOOTABLE|MF_COUNTKILL) - PROP_Flags2 (MF2_MCROSS|MF2_FLOORCLIP|MF2_PASSMOBJ|MF2_PUSHWALL) - - PROP_SpawnState (S_BEAST_LOOK) - PROP_SeeState (S_BEAST_WALK) - PROP_PainState (S_BEAST_PAIN) - PROP_MissileState (S_BEAST_ATK) - PROP_DeathState (S_BEAST_DIE) - PROP_XDeathState (S_BEAST_XDIE) - - PROP_SeeSound ("beast/sight") - PROP_AttackSound ("beast/attack") - PROP_PainSound ("beast/pain") - PROP_DeathSound ("beast/death") - PROP_ActiveSound ("beast/active") - PROP_Obituary("$OB_BEAST") -END_DEFAULTS - -void ABeast::NoBlockingSet () -{ - P_DropItem (this, "CrossbowAmmo", 10, 84); -} - -// Beast ball --------------------------------------------------------------- - -// Heretic also had a MT_BURNBALL and MT_BURNBALLFB based on the beast ball, -// but it didn't use them anywhere. - -class ABeastBall : public AActor -{ - DECLARE_ACTOR (ABeastBall, AActor) -}; - -FState ABeastBall::States[] = -{ -#define S_BEASTBALL 0 - S_NORMAL (FRB1, 'A', 2, A_BeastPuff , &States[S_BEASTBALL+1]), - S_NORMAL (FRB1, 'A', 2, A_BeastPuff , &States[S_BEASTBALL+2]), - S_NORMAL (FRB1, 'B', 2, A_BeastPuff , &States[S_BEASTBALL+3]), - S_NORMAL (FRB1, 'B', 2, A_BeastPuff , &States[S_BEASTBALL+4]), - S_NORMAL (FRB1, 'C', 2, A_BeastPuff , &States[S_BEASTBALL+5]), - S_NORMAL (FRB1, 'C', 2, A_BeastPuff , &States[S_BEASTBALL+0]), - -#define S_BEASTBALLX (S_BEASTBALL+6) - S_NORMAL (FRB1, 'D', 4, NULL , &States[S_BEASTBALLX+1]), - S_NORMAL (FRB1, 'E', 4, NULL , &States[S_BEASTBALLX+2]), - S_NORMAL (FRB1, 'F', 4, NULL , &States[S_BEASTBALLX+3]), - S_NORMAL (FRB1, 'G', 4, NULL , &States[S_BEASTBALLX+4]), - S_NORMAL (FRB1, 'H', 4, NULL , NULL) -}; - -IMPLEMENT_ACTOR (ABeastBall, Heretic, -1, 120) - PROP_RadiusFixed (9) - PROP_HeightFixed (8) - PROP_SpeedFixed (12) - PROP_Damage (4) - PROP_Flags (MF_MISSILE|MF_DROPOFF|MF_NOGRAVITY) - PROP_Flags2 (MF2_WINDTHRUST|MF2_NOTELEPORT) - PROP_RenderStyle (STYLE_Add) - - PROP_SpawnState (S_BEASTBALL) - PROP_DeathState (S_BEASTBALLX) -END_DEFAULTS - -AT_SPEED_SET (BeastBall, speed) -{ - SimpleSpeedSetter (ABeastBall, 12*FRACUNIT, 20*FRACUNIT, speed); -} - -// Puffy -------------------------------------------------------------------- - -class APuffy : public AActor -{ - DECLARE_ACTOR (APuffy, AActor) -}; - -FState APuffy::States[] = -{ - S_NORMAL (FRB1, 'D', 4, NULL , &States[1]), - S_NORMAL (FRB1, 'E', 4, NULL , &States[2]), - S_NORMAL (FRB1, 'F', 4, NULL , &States[3]), - S_NORMAL (FRB1, 'G', 4, NULL , &States[4]), - S_NORMAL (FRB1, 'H', 4, NULL , NULL) -}; - -IMPLEMENT_ACTOR (APuffy, Heretic, -1, 0) - PROP_RadiusFixed (6) - PROP_HeightFixed (8) - PROP_SpeedFixed (10) - PROP_Damage (0) - PROP_Flags (MF_NOBLOCKMAP|MF_NOGRAVITY|MF_MISSILE) - PROP_Flags2 (MF2_NOTELEPORT) - PROP_Flags3 (MF3_DONTSPLASH) - - // It's a tough call between Add and Translucent. - PROP_RenderStyle (STYLE_Add) - - PROP_SpawnState (0) -END_DEFAULTS - -//---------------------------------------------------------------------------- -// -// PROC A_BeastAttack -// -//---------------------------------------------------------------------------- - -void A_BeastAttack (AActor *actor) -{ - if (!actor->target) - { - return; - } - S_SoundID (actor, CHAN_BODY, actor->AttackSound, 1, ATTN_NORM); - if (actor->CheckMeleeRange()) - { - int damage = pr_beastatk.HitDice (3); - P_DamageMobj (actor->target, actor, actor, damage, NAME_Melee); - P_TraceBleed (damage, actor->target, actor); - return; - } - P_SpawnMissile (actor, actor->target, RUNTIME_CLASS(ABeastBall)); -} - -//---------------------------------------------------------------------------- -// -// PROC A_BeastPuff -// -//---------------------------------------------------------------------------- - -void A_BeastPuff (AActor *actor) -{ - if (pr_beastpuff() > 64) - { - fixed_t x, y, z; - - x = actor->x + (pr_beastpuff.Random2 () << 10); - y = actor->y + (pr_beastpuff.Random2 () << 10); - z = actor->z + (pr_beastpuff.Random2 () << 10); - Spawn (x, y, z, ALLOW_REPLACE); - } -} diff --git a/src/g_heretic/a_heretickeys.cpp b/src/g_heretic/a_heretickeys.cpp deleted file mode 100644 index 361ace96c5..0000000000 --- a/src/g_heretic/a_heretickeys.cpp +++ /dev/null @@ -1,109 +0,0 @@ -#include "info.h" -#include "a_pickups.h" -#include "d_player.h" -#include "gstrings.h" -#include "p_local.h" -#include "a_keys.h" - - -// --- Key gizmos ----------------------------------------------------------- - -void A_InitKeyGizmo (AActor *); - -class AKeyGizmo : public AActor -{ - DECLARE_ACTOR (AKeyGizmo, AActor) -public: - virtual int GetFloatState () { return 0; } -}; - -FState AKeyGizmo::States[] = -{ - S_NORMAL (KGZ1, 'A', 1, NULL , &States[1]), - S_NORMAL (KGZ1, 'A', 1, A_InitKeyGizmo , &States[2]), - S_NORMAL (KGZ1, 'A', -1, NULL , NULL) -}; - -IMPLEMENT_ACTOR (AKeyGizmo, Heretic, -1, 0) - PROP_RadiusFixed (16) - PROP_HeightFixed (50) - PROP_Flags (MF_SOLID) - - PROP_SpawnState (0) -END_DEFAULTS - -class AKeyGizmoFloat : public AActor -{ - DECLARE_ACTOR (AKeyGizmoFloat, AActor) -}; - -FState AKeyGizmoFloat::States[] = -{ -#define S_KGZ_BLUEFLOAT 0 - S_BRIGHT (KGZB, 'A', -1, NULL , NULL), - -#define S_KGZ_GREENFLOAT (S_KGZ_BLUEFLOAT+1) - S_BRIGHT (KGZG, 'A', -1, NULL , NULL), - -#define S_KGZ_YELLOWFLOAT (S_KGZ_GREENFLOAT+1) - S_BRIGHT (KGZY, 'A', -1, NULL , NULL) -}; - -IMPLEMENT_ACTOR (AKeyGizmoFloat, Heretic, -1, 0) - PROP_RadiusFixed (16) - PROP_HeightFixed (16) - PROP_Flags (MF_SOLID|MF_NOGRAVITY) - - PROP_SpawnState (0) -END_DEFAULTS - -// Blue gizmo --------------------------------------------------------------- - -class AKeyGizmoBlue : public AKeyGizmo -{ - DECLARE_STATELESS_ACTOR (AKeyGizmoBlue, AKeyGizmo) -public: - int GetFloatState () { return S_KGZ_BLUEFLOAT; } -}; - -IMPLEMENT_STATELESS_ACTOR (AKeyGizmoBlue, Heretic, 94, 0) -END_DEFAULTS - -// Green gizmo -------------------------------------------------------------- - -class AKeyGizmoGreen : public AKeyGizmo -{ - DECLARE_STATELESS_ACTOR (AKeyGizmoGreen, AKeyGizmo) -public: - int GetFloatState () { return S_KGZ_GREENFLOAT; } -}; - -IMPLEMENT_STATELESS_ACTOR (AKeyGizmoGreen, Heretic, 95, 0) -END_DEFAULTS - -// Yellow gizmo ------------------------------------------------------------- - -class AKeyGizmoYellow : public AKeyGizmo -{ - DECLARE_STATELESS_ACTOR (AKeyGizmoYellow, AKeyGizmo) -public: - int GetFloatState () { return S_KGZ_YELLOWFLOAT; } -}; - -IMPLEMENT_STATELESS_ACTOR (AKeyGizmoYellow, Heretic, 96, 0) -END_DEFAULTS - -//---------------------------------------------------------------------------- -// -// PROC A_InitKeyGizmo -// -//---------------------------------------------------------------------------- - -void A_InitKeyGizmo (AActor *gizmo) -{ - AActor *floater; - - floater = Spawn (gizmo->x, gizmo->y, gizmo->z+60*FRACUNIT, NO_REPLACE); - floater->SetState (&AKeyGizmoFloat:: - States[static_cast(gizmo)->GetFloatState ()]); -} diff --git a/src/g_heretic/a_hereticmisc.cpp b/src/g_heretic/a_hereticmisc.cpp index 798f05b839..75d7f4ef4d 100644 --- a/src/g_heretic/a_hereticmisc.cpp +++ b/src/g_heretic/a_hereticmisc.cpp @@ -468,6 +468,23 @@ END_DEFAULTS //---------------------------------------------------------------------------- // +// PROC A_BeastPuff +// +//---------------------------------------------------------------------------- + +void A_BeastPuff (AActor *actor) +{ + if (pr_volcano() > 64) + { + fixed_t x, y, z; + + x = actor->x + (pr_volcano.Random2 () << 10); + y = actor->y + (pr_volcano.Random2 () << 10); + z = actor->z + (pr_volcano.Random2 () << 10); + Spawn ("Puffy", x, y, z, ALLOW_REPLACE); + } +}//---------------------------------------------------------------------------- +// // PROC A_VolcanoSet // //---------------------------------------------------------------------------- diff --git a/src/g_heretic/a_mummy.cpp b/src/g_heretic/a_mummy.cpp deleted file mode 100644 index 67c06ca3fa..0000000000 --- a/src/g_heretic/a_mummy.cpp +++ /dev/null @@ -1,297 +0,0 @@ -#include "actor.h" -#include "info.h" -#include "m_random.h" -#include "s_sound.h" -#include "p_local.h" -#include "p_enemy.h" -#include "a_action.h" -#include "gstrings.h" - -static FRandom pr_atk ("MummyAttack"); -static FRandom pr_ma2 ("MummyAttack2"); - -void A_MummyAttack (AActor *); -void A_MummySoul (AActor *); -void A_MummyAttack2 (AActor *); -void A_MummyFXSound (AActor *); -void A_MummyFX1Seek (AActor *); - -// Mummy -------------------------------------------------------------------- - -class AMummy : public AActor -{ - DECLARE_ACTOR (AMummy, AActor) -public: - void NoBlockingSet (); -}; - -FState AMummy::States[] = -{ -#define S_MUMMY_LOOK 0 - S_NORMAL (MUMM, 'A', 10, A_Look , &States[S_MUMMY_LOOK+1]), - S_NORMAL (MUMM, 'B', 10, A_Look , &States[S_MUMMY_LOOK+0]), - -#define S_MUMMY_WALK (S_MUMMY_LOOK+2) - S_NORMAL (MUMM, 'A', 4, A_Chase , &States[S_MUMMY_WALK+1]), - S_NORMAL (MUMM, 'B', 4, A_Chase , &States[S_MUMMY_WALK+2]), - S_NORMAL (MUMM, 'C', 4, A_Chase , &States[S_MUMMY_WALK+3]), - S_NORMAL (MUMM, 'D', 4, A_Chase , &States[S_MUMMY_WALK+0]), - -#define S_MUMMY_ATK (S_MUMMY_WALK+4) - S_NORMAL (MUMM, 'E', 6, A_FaceTarget , &States[S_MUMMY_ATK+1]), - S_NORMAL (MUMM, 'F', 6, A_MummyAttack , &States[S_MUMMY_ATK+2]), - S_NORMAL (MUMM, 'G', 6, A_FaceTarget , &States[S_MUMMY_WALK+0]), - -#define S_MUMMY_PAIN (S_MUMMY_ATK+3) - S_NORMAL (MUMM, 'H', 4, NULL , &States[S_MUMMY_PAIN+1]), - S_NORMAL (MUMM, 'H', 4, A_Pain , &States[S_MUMMY_WALK+0]), - -#define S_MUMMY_DIE (S_MUMMY_PAIN+2) - S_NORMAL (MUMM, 'I', 5, NULL , &States[S_MUMMY_DIE+1]), - S_NORMAL (MUMM, 'J', 5, A_Scream , &States[S_MUMMY_DIE+2]), - S_NORMAL (MUMM, 'K', 5, A_MummySoul , &States[S_MUMMY_DIE+3]), - S_NORMAL (MUMM, 'L', 5, NULL , &States[S_MUMMY_DIE+4]), - S_NORMAL (MUMM, 'M', 5, A_NoBlocking , &States[S_MUMMY_DIE+5]), - S_NORMAL (MUMM, 'N', 5, NULL , &States[S_MUMMY_DIE+6]), - S_NORMAL (MUMM, 'O', 5, NULL , &States[S_MUMMY_DIE+7]), - S_NORMAL (MUMM, 'P', -1, NULL , NULL) -}; - -IMPLEMENT_ACTOR (AMummy, Heretic, 68, 4) - PROP_SpawnHealth (80) - PROP_RadiusFixed (22) - PROP_HeightFixed (62) - PROP_Mass (75) - PROP_SpeedFixed (12) - PROP_PainChance (128) - PROP_Flags (MF_SOLID|MF_SHOOTABLE|MF_COUNTKILL) - PROP_Flags2 (MF2_MCROSS|MF2_FLOORCLIP|MF2_PASSMOBJ|MF2_PUSHWALL) - - PROP_SpawnState (S_MUMMY_LOOK) - PROP_SeeState (S_MUMMY_WALK) - PROP_PainState (S_MUMMY_PAIN) - PROP_MeleeState (S_MUMMY_ATK) - PROP_DeathState (S_MUMMY_DIE) - - PROP_SeeSound ("mummy/sight") - PROP_AttackSound ("mummy/attack1") - PROP_PainSound ("mummy/pain") - PROP_DeathSound ("mummy/death") - PROP_ActiveSound ("mummy/active") - PROP_HitObituary("$OB_MUMMY") -END_DEFAULTS - -void AMummy::NoBlockingSet () -{ - P_DropItem (this, "GoldWandAmmo", 3, 84); -} - -// Mummy leader ------------------------------------------------------------- - -class AMummyLeader : public AMummy -{ - DECLARE_ACTOR (AMummyLeader, AMummy) -}; - -FState AMummyLeader::States[] = -{ -#define S_MUMMYL_ATK 0 - S_NORMAL (MUMM, 'X', 5, A_FaceTarget , &States[S_MUMMYL_ATK+1]), - S_BRIGHT (MUMM, 'Y', 5, A_FaceTarget , &States[S_MUMMYL_ATK+2]), - S_NORMAL (MUMM, 'X', 5, A_FaceTarget , &States[S_MUMMYL_ATK+3]), - S_BRIGHT (MUMM, 'Y', 5, A_FaceTarget , &States[S_MUMMYL_ATK+4]), - S_NORMAL (MUMM, 'X', 5, A_FaceTarget , &States[S_MUMMYL_ATK+5]), - S_BRIGHT (MUMM, 'Y', 15, A_MummyAttack2 , &AMummy::States[S_MUMMY_WALK+0]), - -}; - -IMPLEMENT_ACTOR (AMummyLeader, Heretic, 45, 2) - PROP_SpawnHealth (100) - PROP_PainChance (64) - PROP_MissileState (S_MUMMYL_ATK) - PROP_Obituary("$OB_MUMMYLEADER") -END_DEFAULTS - -// Mummy ghost -------------------------------------------------------------- - -class AMummyGhost : public AMummy -{ - DECLARE_STATELESS_ACTOR (AMummyGhost, AMummy) -}; - -IMPLEMENT_STATELESS_ACTOR (AMummyGhost, Heretic, 69, 8) - PROP_FlagsSet (MF_SHADOW) - PROP_Flags3 (MF3_GHOST) - PROP_RenderStyle (STYLE_Translucent) - PROP_Alpha (HR_SHADOW) -END_DEFAULTS - -// Mummy leader ghost ------------------------------------------------------- - -class AMummyLeaderGhost : public AMummyLeader -{ - DECLARE_STATELESS_ACTOR (AMummyLeaderGhost, AMummyLeader) -}; - -IMPLEMENT_STATELESS_ACTOR (AMummyLeaderGhost, Heretic, 46, 9) - PROP_FlagsSet (MF_SHADOW) - PROP_Flags3 (MF3_GHOST) - PROP_RenderStyle (STYLE_Translucent) - PROP_Alpha (HR_SHADOW) -END_DEFAULTS - -// Mummy soul --------------------------------------------------------------- - -class AMummySoul : public AActor -{ - DECLARE_ACTOR (AMummySoul, AActor) -}; - -FState AMummySoul::States[] = -{ -#define S_MUMMY_SOUL 0 - S_NORMAL (MUMM, 'Q', 5, NULL , &States[S_MUMMY_SOUL+1]), - S_NORMAL (MUMM, 'R', 5, NULL , &States[S_MUMMY_SOUL+2]), - S_NORMAL (MUMM, 'S', 5, NULL , &States[S_MUMMY_SOUL+3]), - S_NORMAL (MUMM, 'T', 9, NULL , &States[S_MUMMY_SOUL+4]), - S_NORMAL (MUMM, 'U', 5, NULL , &States[S_MUMMY_SOUL+5]), - S_NORMAL (MUMM, 'V', 5, NULL , &States[S_MUMMY_SOUL+6]), - S_NORMAL (MUMM, 'W', 5, NULL , NULL) -}; - -IMPLEMENT_ACTOR (AMummySoul, Heretic, -1, 0) - PROP_Flags (MF_NOBLOCKMAP|MF_NOGRAVITY) - PROP_SpawnState (S_MUMMY_SOUL) -END_DEFAULTS - -// Mummy FX 1 (flying head) ------------------------------------------------- - -class AMummyFX1 : public AActor -{ - DECLARE_ACTOR (AMummyFX1, AActor) -}; - -FState AMummyFX1::States[] = -{ -#define S_MUMMYFX1 0 - // [RH] Make the mummy scream right away - S_BRIGHT (FX15, 'A', 1, NULL , &States[S_MUMMYFX1+1]), - S_BRIGHT (FX15, 'A', 5, A_MummyFXSound , &States[S_MUMMYFX1+2]), - S_BRIGHT (FX15, 'B', 5, A_MummyFX1Seek , &States[S_MUMMYFX1+3]), - S_BRIGHT (FX15, 'C', 5, NULL , &States[S_MUMMYFX1+4]), - S_BRIGHT (FX15, 'B', 5, A_MummyFX1Seek , &States[S_MUMMYFX1+1]), - -#define S_MUMMYFXI1 (S_MUMMYFX1+5) - S_BRIGHT (FX15, 'D', 5, NULL , &States[S_MUMMYFXI1+1]), - S_BRIGHT (FX15, 'E', 5, NULL , &States[S_MUMMYFXI1+2]), - S_BRIGHT (FX15, 'F', 5, NULL , &States[S_MUMMYFXI1+3]), - S_BRIGHT (FX15, 'G', 5, NULL , NULL) -}; - -IMPLEMENT_ACTOR (AMummyFX1, Heretic, -1, 131) - PROP_RadiusFixed (8) - PROP_HeightFixed (14) - PROP_SpeedFixed (9) - PROP_Damage (4) - PROP_Flags (MF_NOBLOCKMAP|MF_MISSILE|MF_DROPOFF|MF_NOGRAVITY) - PROP_Flags2 (MF2_NOTELEPORT|MF2_SEEKERMISSILE) - PROP_RenderStyle (STYLE_Add) - - PROP_SpawnState (S_MUMMYFX1) - PROP_DeathState (S_MUMMYFXI1) -END_DEFAULTS - -AT_SPEED_SET (MummyFX1, speed) -{ - SimpleSpeedSetter (AMummyFX1, 9*FRACUNIT, 18*FRACUNIT, speed); -} - -//---------------------------------------------------------------------------- -// -// PROC A_MummyAttack -// -//---------------------------------------------------------------------------- - -void A_MummyAttack (AActor *actor) -{ - if (!actor->target) - { - return; - } - if (actor->CheckMeleeRange ()) - { - int damage = pr_atk.HitDice (2); - P_DamageMobj (actor->target, actor, actor, damage, NAME_Melee); - P_TraceBleed (damage, actor->target, actor); - S_Sound (actor, CHAN_WEAPON, "mummy/attack2", 1, ATTN_NORM); - return; - } - S_SoundID (actor, CHAN_WEAPON, actor->AttackSound, 1, ATTN_NORM); -} - -//---------------------------------------------------------------------------- -// -// PROC A_MummyAttack2 -// -// Mummy leader missile attack. -// -//---------------------------------------------------------------------------- - -void A_MummyAttack2 (AActor *actor) -{ - AActor *mo; - - if (!actor->target) - { - return; - } - //S_StartSound(actor, actor->info->attacksound); - if (actor->CheckMeleeRange ()) - { - int damage = pr_ma2.HitDice (2); - P_DamageMobj (actor->target, actor, actor, damage, NAME_Melee); - P_TraceBleed (damage, actor->target, actor); - return; - } - mo = P_SpawnMissile (actor, actor->target, RUNTIME_CLASS(AMummyFX1)); - if (mo != NULL) - { - mo->tracer = actor->target; - } -} - -//---------------------------------------------------------------------------- -// -// PROC A_MummyFX1Seek -// -//---------------------------------------------------------------------------- - -void A_MummyFX1Seek (AActor *actor) -{ - P_SeekerMissile (actor, ANGLE_1*10, ANGLE_1*20); -} - -//---------------------------------------------------------------------------- -// -// PROC A_MummySoul -// -//---------------------------------------------------------------------------- - -void A_MummySoul (AActor *mummy) -{ - AActor *mo; - - mo = Spawn (mummy->x, mummy->y, mummy->z+10*FRACUNIT, ALLOW_REPLACE); - mo->momz = FRACUNIT; -} - -//---------------------------------------------------------------------------- -// -// PROC A_MummyFXSound -// -//---------------------------------------------------------------------------- - -void A_MummyFXSound (AActor *self) -{ - S_Sound (self, CHAN_BODY, "mummy/head", 1, ATTN_IDLE); -} diff --git a/src/g_hexen/a_demons.cpp b/src/g_hexen/a_demons.cpp deleted file mode 100644 index 1c774f6ecb..0000000000 --- a/src/g_hexen/a_demons.cpp +++ /dev/null @@ -1,666 +0,0 @@ -#include "actor.h" -#include "info.h" -#include "p_local.h" -#include "s_sound.h" -#include "p_enemy.h" -#include "a_action.h" -#include "m_random.h" - -static FRandom pr_atk ("DemonAttack1"); -static FRandom pr_demonchunks ("DemonChunks"); - -//============================================================================ -// Demon AI -//============================================================================ - -void A_DemonAttack1 (AActor *); -void A_DemonAttack2_1 (AActor *); -void A_DemonAttack2_2 (AActor *); -void A_DemonDeath (AActor *); -void A_Demon2Death (AActor *); - -static void TossChunks (AActor *, const PClass *const chunks[]); - -// Demon, type 1 (green, like D'Sparil's) ----------------------------------- - -class ADemon1 : public AActor -{ - DECLARE_ACTOR (ADemon1, AActor) -}; - -FState ADemon1::States[] = -{ -#define S_DEMN_LOOK1 0 - S_NORMAL (DEMN, 'A', 10, A_Look , &States[S_DEMN_LOOK1+1]), - S_NORMAL (DEMN, 'A', 10, A_Look , &States[S_DEMN_LOOK1]), - -#define S_DEMN_CHASE1 (S_DEMN_LOOK1+2) - S_NORMAL (DEMN, 'A', 4, A_Chase , &States[S_DEMN_CHASE1+1]), - S_NORMAL (DEMN, 'B', 4, A_Chase , &States[S_DEMN_CHASE1+2]), - S_NORMAL (DEMN, 'C', 4, A_Chase , &States[S_DEMN_CHASE1+3]), - S_NORMAL (DEMN, 'D', 4, A_Chase , &States[S_DEMN_CHASE1]), - -#define S_DEMN_PAIN1 (S_DEMN_CHASE1+4) - S_NORMAL (DEMN, 'E', 4, NULL , &States[S_DEMN_PAIN1+1]), - S_NORMAL (DEMN, 'E', 4, A_Pain , &States[S_DEMN_CHASE1]), - -#define S_DEMN_ATK1_1 (S_DEMN_PAIN1+2) - S_NORMAL (DEMN, 'E', 6, A_FaceTarget , &States[S_DEMN_ATK1_1+1]), - S_NORMAL (DEMN, 'F', 8, A_FaceTarget , &States[S_DEMN_ATK1_1+2]), - S_NORMAL (DEMN, 'G', 6, A_DemonAttack1 , &States[S_DEMN_CHASE1]), - -#define S_DEMN_ATK2_1 (S_DEMN_ATK1_1+3) - S_NORMAL (DEMN, 'E', 5, A_FaceTarget , &States[S_DEMN_ATK2_1+1]), - S_NORMAL (DEMN, 'F', 6, A_FaceTarget , &States[S_DEMN_ATK2_1+2]), - S_NORMAL (DEMN, 'G', 5, A_DemonAttack2_1 , &States[S_DEMN_CHASE1]), - -#define S_DEMN_DEATH1 (S_DEMN_ATK2_1+3) - S_NORMAL (DEMN, 'H', 6, NULL , &States[S_DEMN_DEATH1+1]), - S_NORMAL (DEMN, 'I', 6, NULL , &States[S_DEMN_DEATH1+2]), - S_NORMAL (DEMN, 'J', 6, A_Scream , &States[S_DEMN_DEATH1+3]), - S_NORMAL (DEMN, 'K', 6, A_NoBlocking , &States[S_DEMN_DEATH1+4]), - S_NORMAL (DEMN, 'L', 6, A_QueueCorpse , &States[S_DEMN_DEATH1+5]), - S_NORMAL (DEMN, 'M', 6, NULL , &States[S_DEMN_DEATH1+6]), - S_NORMAL (DEMN, 'N', 6, NULL , &States[S_DEMN_DEATH1+7]), - S_NORMAL (DEMN, 'O', 6, NULL , &States[S_DEMN_DEATH1+8]), - S_NORMAL (DEMN, 'P', -1, NULL , NULL), - -#define S_DEMN_XDEATH1 (S_DEMN_DEATH1+9) - S_NORMAL (DEMN, 'H', 6, NULL , &States[S_DEMN_XDEATH1+1]), - S_NORMAL (DEMN, 'I', 6, A_DemonDeath , &States[S_DEMN_XDEATH1+2]), - S_NORMAL (DEMN, 'J', 6, A_Scream , &States[S_DEMN_XDEATH1+3]), - S_NORMAL (DEMN, 'K', 6, A_NoBlocking , &States[S_DEMN_XDEATH1+4]), - S_NORMAL (DEMN, 'L', 6, A_QueueCorpse , &States[S_DEMN_XDEATH1+5]), - S_NORMAL (DEMN, 'M', 6, NULL , &States[S_DEMN_XDEATH1+6]), - S_NORMAL (DEMN, 'N', 6, NULL , &States[S_DEMN_XDEATH1+7]), - S_NORMAL (DEMN, 'O', 6, NULL , &States[S_DEMN_XDEATH1+8]), - S_NORMAL (DEMN, 'P', -1, NULL , NULL), - -#define S_DEMON_ICE1 (S_DEMN_XDEATH1+9) - S_NORMAL (DEMN, 'Q', 5, A_FreezeDeath , &States[S_DEMON_ICE1+1]), - S_NORMAL (DEMN, 'Q', 1, A_FreezeDeathChunks , &States[S_DEMON_ICE1+1]), -}; - -IMPLEMENT_ACTOR (ADemon1, Hexen, 31, 3) - PROP_SpawnHealth (250) - PROP_PainChance (50) - PROP_SpeedFixed (13) - PROP_RadiusFixed (32) - PROP_HeightFixed (64) - PROP_Mass (220) - PROP_Flags (MF_SOLID|MF_SHOOTABLE|MF_COUNTKILL) - PROP_Flags2 (MF2_FLOORCLIP|MF2_PASSMOBJ|MF2_TELESTOMP|MF2_MCROSS) - - PROP_SpawnState (S_DEMN_LOOK1) - PROP_SeeState (S_DEMN_CHASE1) - PROP_PainState (S_DEMN_PAIN1) - PROP_MeleeState (S_DEMN_ATK1_1) - PROP_MissileState (S_DEMN_ATK2_1) - PROP_DeathState (S_DEMN_DEATH1) - PROP_XDeathState (S_DEMN_XDEATH1) - PROP_IDeathState (S_DEMON_ICE1) - - PROP_SeeSound ("DemonSight") - PROP_AttackSound ("DemonAttack") - PROP_PainSound ("DemonPain") - PROP_DeathSound ("DemonDeath") - PROP_ActiveSound ("DemonActive") -END_DEFAULTS - -// Demon, type 1, mashed ---------------------------------------------------- - -class ADemon1Mash : public ADemon1 -{ - DECLARE_STATELESS_ACTOR (ADemon1Mash, ADemon1) -}; - -IMPLEMENT_STATELESS_ACTOR (ADemon1Mash, Hexen, -1, 100) - PROP_FlagsSet (MF_NOBLOOD) - PROP_Flags2Set (MF2_BLASTED) - PROP_Flags2Clear (MF2_TELESTOMP) - PROP_Flags4Set(MF4_NOICEDEATH) - PROP_RenderStyle (STYLE_Translucent) - PROP_Alpha (HX_ALTSHADOW) - - PROP_DeathState (~0) - PROP_XDeathState (~0) - PROP_IDeathState (~0) -END_DEFAULTS - -// Demon chunk, base class -------------------------------------------------- - -class ADemonChunk : public AActor -{ - DECLARE_STATELESS_ACTOR (ADemonChunk, AActor); -}; - -IMPLEMENT_STATELESS_ACTOR (ADemonChunk, Hexen, -1, 0) - PROP_RadiusFixed (5) - PROP_HeightFixed (5) - PROP_Flags (MF_NOBLOCKMAP|MF_DROPOFF|MF_MISSILE|MF_CORPSE) - PROP_Flags2 (MF2_FLOORCLIP|MF2_NOTELEPORT) -END_DEFAULTS - -// Demon, type 1, chunk 1 --------------------------------------------------- - -class ADemon1Chunk1 : public ADemonChunk -{ - DECLARE_ACTOR (ADemon1Chunk1, ADemonChunk) -}; - -FState ADemon1Chunk1::States[] = -{ -#define S_DEMONCHUNK1_1 0 - S_NORMAL (DEMA, 'A', 4, NULL , &States[S_DEMONCHUNK1_1+1]), - S_NORMAL (DEMA, 'A', 10, A_QueueCorpse , &States[S_DEMONCHUNK1_1+2]), - S_NORMAL (DEMA, 'A', 20, NULL , &States[S_DEMONCHUNK1_1+2]), - -#define S_DEMONCHUNK1_4 (S_DEMONCHUNK1_1+3) - S_NORMAL (DEMA, 'A', -1, NULL , NULL), -}; - -IMPLEMENT_ACTOR (ADemon1Chunk1, Hexen, -1, 0) - PROP_SpawnState (S_DEMONCHUNK1_1) - PROP_DeathState (S_DEMONCHUNK1_4) -END_DEFAULTS - -// Demon, type 1, chunk 2 --------------------------------------------------- - -class ADemon1Chunk2 : public ADemonChunk -{ - DECLARE_ACTOR (ADemon1Chunk2, ADemonChunk) -}; - -FState ADemon1Chunk2::States[] = -{ -#define S_DEMONCHUNK2_1 0 - S_NORMAL (DEMB, 'A', 4, NULL , &States[S_DEMONCHUNK2_1+1]), - S_NORMAL (DEMB, 'A', 10, A_QueueCorpse , &States[S_DEMONCHUNK2_1+2]), - S_NORMAL (DEMB, 'A', 20, NULL , &States[S_DEMONCHUNK2_1+2]), - -#define S_DEMONCHUNK2_4 (S_DEMONCHUNK2_1+3) - S_NORMAL (DEMB, 'A', -1, NULL , NULL), -}; - -IMPLEMENT_ACTOR (ADemon1Chunk2, Hexen, -1, 0) - PROP_SpawnState (S_DEMONCHUNK2_1) - PROP_DeathState (S_DEMONCHUNK2_4) -END_DEFAULTS - -// Demon, type 1, chunk 3 --------------------------------------------------- - -class ADemon1Chunk3 : public ADemonChunk -{ - DECLARE_ACTOR (ADemon1Chunk3, ADemonChunk) -}; - -FState ADemon1Chunk3::States[] = -{ -#define S_DEMONCHUNK3_1 0 - S_NORMAL (DEMC, 'A', 4, NULL , &States[S_DEMONCHUNK3_1+1]), - S_NORMAL (DEMC, 'A', 10, A_QueueCorpse , &States[S_DEMONCHUNK3_1+2]), - S_NORMAL (DEMC, 'A', 20, NULL , &States[S_DEMONCHUNK3_1+2]), - -#define S_DEMONCHUNK3_4 (S_DEMONCHUNK3_1+3) - S_NORMAL (DEMC, 'A', -1, NULL , NULL), -}; - -IMPLEMENT_ACTOR (ADemon1Chunk3, Hexen, -1, 0) - PROP_SpawnState (S_DEMONCHUNK3_1) - PROP_DeathState (S_DEMONCHUNK3_4) -END_DEFAULTS - -// Demon, type 1, chunk 4 --------------------------------------------------- - -class ADemon1Chunk4 : public ADemonChunk -{ - DECLARE_ACTOR (ADemon1Chunk4, ADemonChunk) -}; - -FState ADemon1Chunk4::States[] = -{ -#define S_DEMONCHUNK4_1 0 - S_NORMAL (DEMD, 'A', 4, NULL , &States[S_DEMONCHUNK4_1+1]), - S_NORMAL (DEMD, 'A', 10, A_QueueCorpse , &States[S_DEMONCHUNK4_1+2]), - S_NORMAL (DEMD, 'A', 20, NULL , &States[S_DEMONCHUNK4_1+2]), - -#define S_DEMONCHUNK4_4 (S_DEMONCHUNK4_1+3) - S_NORMAL (DEMD, 'A', -1, NULL , NULL), -}; - -IMPLEMENT_ACTOR (ADemon1Chunk4, Hexen, -1, 0) - PROP_SpawnState (S_DEMONCHUNK4_1) - PROP_DeathState (S_DEMONCHUNK4_4) -END_DEFAULTS - -// Demon, type 1, chunk 5 --------------------------------------------------- - -class ADemon1Chunk5 : public ADemonChunk -{ - DECLARE_ACTOR (ADemon1Chunk5, ADemonChunk) -}; - -FState ADemon1Chunk5::States[] = -{ -#define S_DEMONCHUNK5_1 0 - S_NORMAL (DEME, 'A', 4, NULL , &States[S_DEMONCHUNK5_1+1]), - S_NORMAL (DEME, 'A', 10, A_QueueCorpse , &States[S_DEMONCHUNK5_1+2]), - S_NORMAL (DEME, 'A', 20, NULL , &States[S_DEMONCHUNK5_1+2]), - -#define S_DEMONCHUNK5_4 (S_DEMONCHUNK5_1+3) - S_NORMAL (DEME, 'A', -1, NULL , NULL), -}; - -IMPLEMENT_ACTOR (ADemon1Chunk5, Hexen, -1, 0) - PROP_SpawnState (S_DEMONCHUNK5_1) - PROP_DeathState (S_DEMONCHUNK5_4) -END_DEFAULTS - -// Demon, type 1, projectile ------------------------------------------------ - -class ADemon1FX1 : public AActor -{ - DECLARE_ACTOR (ADemon1FX1, AActor) -}; - -FState ADemon1FX1::States[] = -{ -#define S_DEMONFX_MOVE1 0 - S_BRIGHT (DMFX, 'A', 4, NULL , &States[S_DEMONFX_MOVE1+1]), - S_BRIGHT (DMFX, 'B', 4, NULL , &States[S_DEMONFX_MOVE1+2]), - S_BRIGHT (DMFX, 'C', 4, NULL , &States[S_DEMONFX_MOVE1]), - -#define S_DEMONFX_BOOM1 (S_DEMONFX_MOVE1+3) - S_BRIGHT (DMFX, 'D', 4, NULL , &States[S_DEMONFX_BOOM1+1]), - S_BRIGHT (DMFX, 'E', 4, NULL , &States[S_DEMONFX_BOOM1+2]), - S_BRIGHT (DMFX, 'F', 3, NULL , &States[S_DEMONFX_BOOM1+3]), - S_BRIGHT (DMFX, 'G', 3, NULL , &States[S_DEMONFX_BOOM1+4]), - S_BRIGHT (DMFX, 'H', 3, NULL , NULL), -}; - -IMPLEMENT_ACTOR (ADemon1FX1, Hexen, -1, 0) - PROP_SpeedFixed (15) - PROP_RadiusFixed (10) - PROP_HeightFixed (6) - PROP_Damage (5) - PROP_DamageType (NAME_Fire) - PROP_Flags (MF_NOBLOCKMAP|MF_NOGRAVITY|MF_DROPOFF|MF_MISSILE) - PROP_Flags2 (MF2_NOTELEPORT|MF2_IMPACT|MF2_PCROSS) - PROP_RenderStyle (STYLE_Add) - - PROP_SpawnState (S_DEMONFX_MOVE1) - PROP_DeathState (S_DEMONFX_BOOM1) - - PROP_DeathSound ("DemonMissileExplode") -END_DEFAULTS - - -// Demon, type 2 (brown) ---------------------------------------------------- - -class ADemon2 : public ADemon1 -{ - DECLARE_ACTOR (ADemon2, ADemon1) -}; - -FState ADemon2::States[] = -{ -#define S_DEMN2_LOOK1 0 - S_NORMAL (DEM2, 'A', 10, A_Look , &States[S_DEMN2_LOOK1+1]), - S_NORMAL (DEM2, 'A', 10, A_Look , &States[S_DEMN2_LOOK1]), - -#define S_DEMN2_CHASE1 (S_DEMN2_LOOK1+2) - S_NORMAL (DEM2, 'A', 4, A_Chase , &States[S_DEMN2_CHASE1+1]), - S_NORMAL (DEM2, 'B', 4, A_Chase , &States[S_DEMN2_CHASE1+2]), - S_NORMAL (DEM2, 'C', 4, A_Chase , &States[S_DEMN2_CHASE1+3]), - S_NORMAL (DEM2, 'D', 4, A_Chase , &States[S_DEMN2_CHASE1]), - -#define S_DEMN2_PAIN1 (S_DEMN2_CHASE1+4) - S_NORMAL (DEM2, 'E', 4, NULL , &States[S_DEMN2_PAIN1+1]), - S_NORMAL (DEM2, 'E', 4, A_Pain , &States[S_DEMN2_CHASE1]), - -#define S_DEMN2_ATK1_1 (S_DEMN2_PAIN1+2) - S_NORMAL (DEM2, 'E', 6, A_FaceTarget , &States[S_DEMN2_ATK1_1+1]), - S_NORMAL (DEM2, 'F', 8, A_FaceTarget , &States[S_DEMN2_ATK1_1+2]), - S_NORMAL (DEM2, 'G', 6, A_DemonAttack1 , &States[S_DEMN2_CHASE1]), - -#define S_DEMN2_ATK2_1 (S_DEMN2_ATK1_1+3) - S_NORMAL (DEM2, 'E', 5, A_FaceTarget , &States[S_DEMN2_ATK2_1+1]), - S_NORMAL (DEM2, 'F', 6, A_FaceTarget , &States[S_DEMN2_ATK2_1+2]), - S_NORMAL (DEM2, 'G', 5, A_DemonAttack2_2 , &States[S_DEMN2_CHASE1]), - -#define S_DEMN2_DEATH1 (S_DEMN2_ATK2_1+3) - S_NORMAL (DEM2, 'H', 6, NULL , &States[S_DEMN2_DEATH1+1]), - S_NORMAL (DEM2, 'I', 6, NULL , &States[S_DEMN2_DEATH1+2]), - S_NORMAL (DEM2, 'J', 6, A_Scream , &States[S_DEMN2_DEATH1+3]), - S_NORMAL (DEM2, 'K', 6, A_NoBlocking , &States[S_DEMN2_DEATH1+4]), - S_NORMAL (DEM2, 'L', 6, A_QueueCorpse , &States[S_DEMN2_DEATH1+5]), - S_NORMAL (DEM2, 'M', 6, NULL , &States[S_DEMN2_DEATH1+6]), - S_NORMAL (DEM2, 'N', 6, NULL , &States[S_DEMN2_DEATH1+7]), - S_NORMAL (DEM2, 'O', 6, NULL , &States[S_DEMN2_DEATH1+8]), - S_NORMAL (DEM2, 'P', -1, NULL , NULL), - -#define S_DEMN2_XDEATH1 (S_DEMN2_DEATH1+9) - S_NORMAL (DEM2, 'H', 6, NULL , &States[S_DEMN2_XDEATH1+1]), - S_NORMAL (DEM2, 'I', 6, A_Demon2Death , &States[S_DEMN2_XDEATH1+2]), - S_NORMAL (DEM2, 'J', 6, A_Scream , &States[S_DEMN2_XDEATH1+3]), - S_NORMAL (DEM2, 'K', 6, A_NoBlocking , &States[S_DEMN2_XDEATH1+4]), - S_NORMAL (DEM2, 'L', 6, A_QueueCorpse , &States[S_DEMN2_XDEATH1+5]), - S_NORMAL (DEM2, 'M', 6, NULL , &States[S_DEMN2_XDEATH1+6]), - S_NORMAL (DEM2, 'N', 6, NULL , &States[S_DEMN2_XDEATH1+7]), - S_NORMAL (DEM2, 'O', 6, NULL , &States[S_DEMN2_XDEATH1+8]), - S_NORMAL (DEM2, 'P', -1, NULL , NULL), -}; - -IMPLEMENT_ACTOR (ADemon2, Hexen, 8080, 0) - PROP_SpawnState (S_DEMN2_LOOK1) - PROP_SeeState (S_DEMN2_CHASE1) - PROP_PainState (S_DEMN2_PAIN1) - PROP_MeleeState (S_DEMN2_ATK1_1) - PROP_MissileState (S_DEMN2_ATK2_1) - PROP_DeathState (S_DEMN2_DEATH1) - PROP_XDeathState (S_DEMN2_XDEATH1) -END_DEFAULTS - -// Demon, type 2, mashed ---------------------------------------------------- - - - -class ADemon2Mash : public ADemon2 -{ - DECLARE_STATELESS_ACTOR (ADemon2Mash, ADemon2) -}; - -IMPLEMENT_STATELESS_ACTOR (ADemon2Mash, Hexen, -1, 101) - PROP_FlagsSet (MF_NOBLOOD) - PROP_Flags2Set (MF2_BLASTED) - PROP_Flags2Clear (MF2_TELESTOMP) - PROP_Flags4Set(MF4_NOICEDEATH) - PROP_RenderStyle (STYLE_Translucent) - PROP_Alpha (HX_ALTSHADOW) - - PROP_DeathState (~0) - PROP_XDeathState (~0) - PROP_IDeathState (~0) -END_DEFAULTS - -// Demon, type 2, chunk 1 --------------------------------------------------- - -class ADemon2Chunk1 : public ADemonChunk -{ - DECLARE_ACTOR (ADemon2Chunk1, ADemonChunk) -}; - -FState ADemon2Chunk1::States[] = -{ -#define S_DEMON2CHUNK1_1 0 - S_NORMAL (DMBA, 'A', 4, NULL , &States[S_DEMON2CHUNK1_1+1]), - S_NORMAL (DMBA, 'A', 10, A_QueueCorpse , &States[S_DEMON2CHUNK1_1+2]), - S_NORMAL (DMBA, 'A', 20, NULL , &States[S_DEMON2CHUNK1_1+2]), - -#define S_DEMON2CHUNK1_4 (S_DEMON2CHUNK1_1+3) - S_NORMAL (DMBA, 'A', -1, NULL , NULL), -}; - -IMPLEMENT_ACTOR (ADemon2Chunk1, Hexen, -1, 0) - PROP_SpawnState (S_DEMON2CHUNK1_1) - PROP_DeathState (S_DEMON2CHUNK1_4) -END_DEFAULTS - -// Demon, type 2, chunk 2 --------------------------------------------------- - -class ADemon2Chunk2 : public ADemonChunk -{ - DECLARE_ACTOR (ADemon2Chunk2, ADemonChunk) -}; - -FState ADemon2Chunk2::States[] = -{ -#define S_DEMON2CHUNK2_1 0 - S_NORMAL (DMBB, 'A', 4, NULL , &States[S_DEMON2CHUNK2_1+1]), - S_NORMAL (DMBB, 'A', 10, A_QueueCorpse , &States[S_DEMON2CHUNK2_1+2]), - S_NORMAL (DMBB, 'A', 20, NULL , &States[S_DEMON2CHUNK2_1+2]), - -#define S_DEMON2CHUNK2_4 (S_DEMON2CHUNK2_1+3) - S_NORMAL (DMBB, 'A', -1, NULL , NULL), -}; - -IMPLEMENT_ACTOR (ADemon2Chunk2, Hexen, -1, 0) - PROP_SpawnState (S_DEMON2CHUNK2_1) - PROP_DeathState (S_DEMON2CHUNK2_4) -END_DEFAULTS - -// Demon, type 2, chunk 3 --------------------------------------------------- - -class ADemon2Chunk3 : public ADemonChunk -{ - DECLARE_ACTOR (ADemon2Chunk3, ADemonChunk) -}; - -FState ADemon2Chunk3::States[] = -{ -#define S_DEMON2CHUNK3_1 0 - S_NORMAL (DMBC, 'A', 4, NULL , &States[S_DEMON2CHUNK3_1+1]), - S_NORMAL (DMBC, 'A', 10, A_QueueCorpse , &States[S_DEMON2CHUNK3_1+2]), - S_NORMAL (DMBC, 'A', 20, NULL , &States[S_DEMON2CHUNK3_1+2]), - -#define S_DEMON2CHUNK3_4 (S_DEMON2CHUNK3_1+3) - S_NORMAL (DMBC, 'A', -1, NULL , NULL), -}; - -IMPLEMENT_ACTOR (ADemon2Chunk3, Hexen, -1, 0) - PROP_SpawnState (S_DEMON2CHUNK3_1) - PROP_DeathState (S_DEMON2CHUNK3_4) -END_DEFAULTS - -// Demon, type 2, chunk 4 --------------------------------------------------- - -class ADemon2Chunk4 : public ADemonChunk -{ - DECLARE_ACTOR (ADemon2Chunk4, ADemonChunk) -}; - -FState ADemon2Chunk4::States[] = -{ -#define S_DEMON2CHUNK4_1 0 - S_NORMAL (DMBD, 'A', 4, NULL , &States[S_DEMON2CHUNK4_1+1]), - S_NORMAL (DMBD, 'A', 10, A_QueueCorpse , &States[S_DEMON2CHUNK4_1+2]), - S_NORMAL (DMBD, 'A', 20, NULL , &States[S_DEMON2CHUNK4_1+2]), - -#define S_DEMON2CHUNK4_4 (S_DEMON2CHUNK4_1+3) - S_NORMAL (DMBD, 'A', -1, NULL , NULL), -}; - -IMPLEMENT_ACTOR (ADemon2Chunk4, Hexen, -1, 0) - PROP_SpawnState (S_DEMON2CHUNK4_1) - PROP_DeathState (S_DEMON2CHUNK4_4) -END_DEFAULTS - -// Demon, type 2, chunk 5 --------------------------------------------------- - -class ADemon2Chunk5 : public ADemonChunk -{ - DECLARE_ACTOR (ADemon2Chunk5, ADemonChunk) -}; - -FState ADemon2Chunk5::States[] = -{ -#define S_DEMON2CHUNK5_1 0 - S_NORMAL (DMBE, 'A', 4, NULL , &States[S_DEMON2CHUNK5_1+1]), - S_NORMAL (DMBE, 'A', 10, NULL , &States[S_DEMON2CHUNK5_1+2]), - S_NORMAL (DMBE, 'A', 20, NULL , &States[S_DEMON2CHUNK5_1+2]), - -#define S_DEMON2CHUNK5_4 (S_DEMON2CHUNK5_1+3) - S_NORMAL (DMBE, 'A', -1, NULL , NULL), -}; - -IMPLEMENT_ACTOR (ADemon2Chunk5, Hexen, -1, 0) - PROP_SpawnState (S_DEMON2CHUNK5_1) - PROP_DeathState (S_DEMON2CHUNK5_4) -END_DEFAULTS - -// Demon, type 2, projectile ------------------------------------------------ - -class ADemon2FX1 : public AActor -{ - DECLARE_ACTOR (ADemon2FX1, AActor) -}; - -FState ADemon2FX1::States[] = -{ -#define S_DEMON2FX_MOVE1 0 - S_BRIGHT (D2FX, 'A', 4, NULL , &States[S_DEMON2FX_MOVE1+1]), - S_BRIGHT (D2FX, 'B', 4, NULL , &States[S_DEMON2FX_MOVE1+2]), - S_BRIGHT (D2FX, 'C', 4, NULL , &States[S_DEMON2FX_MOVE1+3]), - S_BRIGHT (D2FX, 'D', 4, NULL , &States[S_DEMON2FX_MOVE1+4]), - S_BRIGHT (D2FX, 'E', 4, NULL , &States[S_DEMON2FX_MOVE1+5]), - S_BRIGHT (D2FX, 'F', 4, NULL , &States[S_DEMON2FX_MOVE1]), - -#define S_DEMON2FX_BOOM1 (S_DEMON2FX_MOVE1+6) - S_BRIGHT (D2FX, 'G', 4, NULL , &States[S_DEMON2FX_BOOM1+1]), - S_BRIGHT (D2FX, 'H', 4, NULL , &States[S_DEMON2FX_BOOM1+2]), - S_BRIGHT (D2FX, 'I', 4, NULL , &States[S_DEMON2FX_BOOM1+3]), - S_BRIGHT (D2FX, 'J', 4, NULL , &States[S_DEMON2FX_BOOM1+4]), - S_BRIGHT (D2FX, 'K', 3, NULL , &States[S_DEMON2FX_BOOM1+5]), - S_BRIGHT (D2FX, 'L', 3, NULL , NULL), -}; - -IMPLEMENT_ACTOR (ADemon2FX1, Hexen, -1, 0) - PROP_SpeedFixed (15) - PROP_RadiusFixed (10) - PROP_HeightFixed (6) - PROP_Damage (5) - PROP_DamageType (NAME_Fire) - PROP_Flags (MF_NOBLOCKMAP|MF_NOGRAVITY|MF_DROPOFF|MF_MISSILE) - PROP_Flags2 (MF2_NOTELEPORT|MF2_IMPACT|MF2_PCROSS) - PROP_RenderStyle (STYLE_Add) - - PROP_SpawnState (S_DEMON2FX_MOVE1) - PROP_DeathState (S_DEMON2FX_BOOM1) - - PROP_DeathSound ("DemonMissileExplode") -END_DEFAULTS - -//============================================================================ -// -// A_DemonAttack1 (melee) -// -//============================================================================ - -void A_DemonAttack1 (AActor *actor) -{ - if (actor->target != NULL && actor->CheckMeleeRange ()) - { - int damage = pr_atk.HitDice (2); - P_DamageMobj (actor->target, actor, actor, damage, NAME_Melee); - P_TraceBleed (damage, actor->target, actor); - } -} - - -//============================================================================ -// -// A_DemonAttack2_1 (missile) -// -//============================================================================ - -void A_DemonAttack2_1 (AActor *actor) -{ - if (actor->target != NULL) - { - AActor *mo; - - // Improve the aiming of this code! - actor->z += 30*FRACUNIT; - mo = P_SpawnMissile (actor, actor->target, RUNTIME_CLASS(ADemon1FX1)); - actor->z -= 30*FRACUNIT; - if (mo) - { - S_Sound (actor, CHAN_BODY, "DemonMissileFire", 1, ATTN_NORM); - } - } -} - -//============================================================================ -// -// A_DemonAttack2_2 (missile) -// -//============================================================================ - -void A_DemonAttack2_2 (AActor *actor) -{ - if (actor->target != NULL) - { - AActor *mo; - - // Improve the aiming of this code! - actor->z += 30*FRACUNIT; - mo = P_SpawnMissile (actor, actor->target, RUNTIME_CLASS(ADemon2FX1)); - actor->z -= 30*FRACUNIT; - if (mo) - { - S_Sound (actor, CHAN_BODY, "DemonMissileFire", 1, ATTN_NORM); - } - } -} - -//============================================================================ -// -// A_DemonDeath -// -//============================================================================ - -void A_DemonDeath (AActor *actor) -{ - const PClass *const ChunkTypes[] = - { - RUNTIME_CLASS(ADemon1Chunk5), - RUNTIME_CLASS(ADemon1Chunk4), - RUNTIME_CLASS(ADemon1Chunk3), - RUNTIME_CLASS(ADemon1Chunk2), - RUNTIME_CLASS(ADemon1Chunk1) - }; - - TossChunks (actor, ChunkTypes); -} - -//=========================================================================== -// -// A_Demon2Death -// -//=========================================================================== - -void A_Demon2Death (AActor *actor) -{ - const PClass *const ChunkTypes[] = - { - RUNTIME_CLASS(ADemon2Chunk5), - RUNTIME_CLASS(ADemon2Chunk4), - RUNTIME_CLASS(ADemon2Chunk3), - RUNTIME_CLASS(ADemon2Chunk2), - RUNTIME_CLASS(ADemon2Chunk1) - }; - - TossChunks (actor, ChunkTypes); -} - -static void TossChunks (AActor *actor, const PClass *const chunks[]) -{ - AActor *mo; - angle_t angle; - int i; - - for (i = 4; i >= 0; --i) - { - mo = Spawn (chunks[i], actor->x, actor->y, actor->z+45*FRACUNIT, ALLOW_REPLACE); - if (mo) - { - angle = actor->angle + (i<4 ? ANGLE_270 : ANGLE_90); - mo->momz = 8*FRACUNIT; - mo->momx = FixedMul((pr_demonchunks()<<10)+FRACUNIT, - finecosine[angle>>ANGLETOFINESHIFT]); - mo->momy = FixedMul((pr_demonchunks()<<10)+FRACUNIT, - finesine[angle>>ANGLETOFINESHIFT]); - mo->target = actor; - } - } -} diff --git a/src/thingdef.cpp b/src/thingdef.cpp index 257250916c..e4dae34c46 100644 --- a/src/thingdef.cpp +++ b/src/thingdef.cpp @@ -701,7 +701,7 @@ AFuncDesc AFTable[]= FUNC(A_GiveInventory, "Mx" ) FUNC(A_TakeInventory, "Mx" ) FUNC(A_SpawnItem, "Mxxyx" ) - FUNC(A_SpawnItemEx, "Mxxxxxxxx" ) + FUNC(A_SpawnItemEx, "Mxxxxxxxxx" ) FUNC(A_ThrowGrenade, "Mxxxy" ) FUNC(A_SelectWeapon, "M") FUNC(A_Print, "Txt") diff --git a/src/thingdef_codeptr.cpp b/src/thingdef_codeptr.cpp index 362f7de91f..2f14ede148 100644 --- a/src/thingdef_codeptr.cpp +++ b/src/thingdef_codeptr.cpp @@ -77,6 +77,7 @@ static FRandom pr_cwpunch ("CustomWpPunch"); static FRandom pr_grenade ("ThrowGrenade"); static FRandom pr_crailgun ("CustomRailgun"); static FRandom pr_spawndebris ("SpawnDebris"); +static FRandom pr_spawnitemex ("SpawnItemEx"); static FRandom pr_burst ("Burst"); @@ -1433,6 +1434,7 @@ void A_SpawnItemEx(AActor * self) fixed_t zmom = fixed_t(EvalExpressionF (StateParameters[index+6], self) * FRACUNIT); angle_t Angle= angle_t(EvalExpressionF (StateParameters[index+7], self) * ANGLE_1); int flags = EvalExpressionI (StateParameters[index+8], self); + int chance = EvalExpressionI (StateParameters[index+9], self); if (!missile) { @@ -1440,10 +1442,12 @@ void A_SpawnItemEx(AActor * self) return; } + if (chance > 0 && pr_spawnitemex()DamageType == NAME_Massacre && GetDefaultByType(missile)->flags3&MF3_ISMONSTER) return; - fixed_t x,y,z; + fixed_t x,y; if (!(flags & SIXF_ABSOLUTEANGLE)) { diff --git a/wadsrc/decorate/decorate.txt b/wadsrc/decorate/decorate.txt index 1cce5f7f51..d6defdbac4 100644 --- a/wadsrc/decorate/decorate.txt +++ b/wadsrc/decorate/decorate.txt @@ -40,7 +40,9 @@ #include "actors/heretic/hereticartifacts.txt" #include "actors/heretic/heretickeys.txt" #include "actors/heretic/hereticdecorations.txt" +#include "actors/heretic/mummy.txt" #include "actors/heretic/clink.txt" +#include "actors/heretic/beast.txt" #include "actors/heretic/snake.txt" #include "actors/hexen/fighterplayer.txt" @@ -57,6 +59,7 @@ #include "actors/hexen/speedboots.txt" #include "actors/hexen/ettin.txt" #include "actors/hexen/centaur.txt" +#include "actors/hexen/demons.txt" #include "actors/strife/beggars.txt" #include "actors/strife/merchants.txt" diff --git a/wadsrc/decorate/heretic/beast.txt b/wadsrc/decorate/heretic/beast.txt new file mode 100644 index 0000000000..62fd338faf --- /dev/null +++ b/wadsrc/decorate/heretic/beast.txt @@ -0,0 +1,113 @@ + +// Beast -------------------------------------------------------------------- + +ACTOR Beast 70 +{ + Game Heretic + SpawnID 3 + Health 220 + Radius 32 + Height 74 + Mass 200 + Speed 14 + Painchance 100 + Monster + +FLOORCLIP + SeeSound "beast/sight" + AttackSound "beast/attack" + PainSound "beast/pain" + DeathSound "beast/death" + ActiveSound "beast/active" + Obituary "$OB_BEAST" + DropItem "CrossbowAmmo", 84, 10 + States + { + Spawn: + BEAS AB 10 A_Look + Loop + See: + BEAS ABCDEF 3 A_Chase + Loop + Melee: + Missile: + BEAS H 10 A_FaceTarget + BEAS I 10 A_CustomComboAttack("BeastBall", 32, random[BeastAttack](1,8)*3, "beast/attack") + Goto See + Pain: + BEAS G 3 + BEAS G 3 A_Pain + Goto See + Death: + BEAS R 6 + BEAS S 6 A_Scream + BEAS TUV 6 + BEAS W 6 A_NoBlocking + BEAS XY 6 + BEAS Z -1 + Stop + XDeath: + BEAS J 5 + BEAS K 6 A_Scream + BEAS L 5 + BEAS M 6 + BEAS N 5 + BEAS O 6 A_NoBlocking + BEAS P 5 + BEAS Q -1 + Stop + } +} + +// Beast ball --------------------------------------------------------------- + +ACTOR BeastBall +{ + Game Heretic + SpawnID 120 + Radius 9 + Height 8 + Speed 12 + FastSpeed 20 + Damage 4 + Projectile + -ACTIVATEIMPACT + -ACTIVATEPCROSS + -NOBLOCKMAP + +WINDTHRUST + +SPAWNSOUNDSOURCE + RenderStyle Add + SeeSound "beast/attack" + States + { + Spawn: + FRB1 AABBCC 2 A_SpawnItemEx("Puffy", random2[BeastPuff]()*0.015625, random2[BeastPuff]()*0.015625, random2[BeastPuff]()*0.015625, 0,0,0,0,2, 64) + Loop + Death: + FRB1 DEFGH 4 + Stop + } +} + +// Puffy -------------------------------------------------------------------- + +ACTOR Puffy +{ + Radius 6 + Height 8 + Speed 10 + +NOBLOCKMAP + +NOGRAVITY + +MISSILE + +NOTELEPORT + +DONTSPLASH + RenderStyle Add + States + { + Spawn: + FRB1 DEFGH 4 + Stop + } +} + + + diff --git a/wadsrc/decorate/heretic/heretickeys.txt b/wadsrc/decorate/heretic/heretickeys.txt index 073fc32487..774629866b 100644 --- a/wadsrc/decorate/heretic/heretickeys.txt +++ b/wadsrc/decorate/heretic/heretickeys.txt @@ -52,3 +52,99 @@ ACTOR KeyYellow : HereticKey 80 } +// --- Blue Key gizmo ----------------------------------------------------------- + +ACTOR KeyGizmoBlue 94 +{ + Game Heretic + Radius 16 + Height 50 + +SOLID + States + { + Spawn: + KGZ1 A 1 + KGZ1 A 1 A_SpawnItemEx("KeyGizmoFloatBlue", 0, 0, 60) + KGZ1 A -1 + Stop + } +} + +ACTOR KeyGizmoFloatBlue +{ + Radius 16 + Height 16 + +SOLID + +NOGRAVITY + States + { + Spawn: + KGZB A -1 Bright + Stop + } +} + +// --- Green Key gizmo ----------------------------------------------------------- + +ACTOR KeyGizmoGreen 95 +{ + Game Heretic + Radius 16 + Height 50 + +SOLID + States + { + Spawn: + KGZ1 A 1 + KGZ1 A 1 A_SpawnItemEx("KeyGizmoFloatGreen", 0, 0, 60) + KGZ1 A -1 + Stop + } +} + +ACTOR KeyGizmoFloatGreen +{ + Radius 16 + Height 16 + +SOLID + +NOGRAVITY + States + { + Spawn: + KGZG A -1 Bright + Stop + } +} + +// --- Yellow Key gizmo ----------------------------------------------------------- + +ACTOR KeyGizmoYellow 96 +{ + Game Heretic + Radius 16 + Height 50 + +SOLID + States + { + Spawn: + KGZ1 A 1 + KGZ1 A 1 A_SpawnItemEx("KeyGizmoFloatYellow", 0, 0, 60) + KGZ1 A -1 + Stop + } +} + +ACTOR KeyGizmoFloatYellow +{ + Radius 16 + Height 16 + +SOLID + +NOGRAVITY + States + { + Spawn: + KGZY A -1 Bright + Stop + } +} + diff --git a/wadsrc/decorate/heretic/mummy.txt b/wadsrc/decorate/heretic/mummy.txt new file mode 100644 index 0000000000..c6cc2389b8 --- /dev/null +++ b/wadsrc/decorate/heretic/mummy.txt @@ -0,0 +1,142 @@ + +// Mummy -------------------------------------------------------------------- + +ACTOR Mummy 68 +{ + Game Heretic + SpawnID 4 + Health 80 + Radius 22 + Height 62 + Mass 75 + Speed 12 + Painchance 128 + Monster + +FLOORCLIP + SeeSound "mummy/sight" + AttackSound "mummy/attack1" + PainSound "mummy/pain" + DeathSound "mummy/death" + ActiveSound "mummy/active" + HitObituary "$OB_MUMMY" + DropItem "GoldWandAmmo", 84, 3 + States + { + Spawn: + MUMM AB 10 A_Look + Loop + See: + MUMM ABCD 4 A_Chase + Loop + Melee: + MUMM E 6 A_FaceTarget + MUMM F 6 A_CustomMeleeAttack(random[MummyAttack](1,8)*2, "mummy/attack2", "mummy/attack") + MUMM G 6 + Goto See + Pain: + MUMM H 4 + MUMM H 4 A_Pain + Goto See + Death: + MUMM I 5 + MUMM J 5 A_Scream + MUMM K 5 A_SpawnItemEx("MummySoul", 0,0,10, 0,0,1) + MUMM L 5 + MUMM M 5 A_NoBlocking + MUMM NO 5 + MUMM P -1 + Stop + } +} + +// Mummy leader ------------------------------------------------------------- + +ACTOR MummyLeader : Mummy 45 +{ + Game Heretic + SpawnID 2 + Health 100 + Painchance 64 + Obituary "$OB_MUMMYLEADER" + States + { + Missile: + MUMM X 5 A_FaceTarget + MUMM Y 5 Bright A_FaceTarget + MUMM X 5 A_FaceTarget + MUMM Y 5 Bright A_FaceTarget + MUMM X 5 A_FaceTarget + MUMM Y 5 Bright A_CustomComboAttack("MummyFX1", 32, random[MummyAttack2](1,8)*2, "mummy/attack2") + Goto See + } +} + +// Mummy ghost -------------------------------------------------------------- + +ACTOR MummyGhost : Mummy 69 +{ + Game Heretic + SpawnID 8 + +SHADOW + +GHOST + RenderStyle Translucent + Alpha 0.4 +} + +// Mummy leader ghost ------------------------------------------------------- + +ACTOR MummyLeaderGhost : MummyLeader 46 +{ + Game Heretic + SpawnID 9 + +SHADOW + +GHOST + RenderStyle Translucent + Alpha 0.4 +} + +// Mummy soul --------------------------------------------------------------- + +ACTOR MummySoul +{ + +NOBLOCKMAP + +NOGRAVITY + States + { + Spawn: + MUMM QRS 5 + MUMM TUVW 9 + Stop + } +} + +// Mummy FX 1 (flying head) ------------------------------------------------- + +ACTOR MummyFX1 +{ + Game Heretic + SpawnID 131 + Radius 8 + Height 14 + Speed 9 + FastSpeed 18 + Damage 4 + RenderStyle Add + Projectile + -ACTIVATEPCROSS + -ACTIVATEIMPACT + +SEEKERMISSILE + States + { + Spawn: + FX15 A 1 Bright + FX15 A 5 Bright A_PlaySound("mummy/head") + FX15 B 5 Bright A_SeekerMissile(10,20) + FX15 C 5 Bright + FX15 B 5 Bright A_SeekerMissile(10,20) + Goto Spawn+1 + Death: + FX15 DEFG 5 Bright + Stop + } +} diff --git a/wadsrc/decorate/hexen/demons.txt b/wadsrc/decorate/hexen/demons.txt new file mode 100644 index 0000000000..92c7551e94 --- /dev/null +++ b/wadsrc/decorate/hexen/demons.txt @@ -0,0 +1,392 @@ + +// Demon, type 1 (green, like D'Sparil's) ----------------------------------- + +ACTOR Demon1 31 +{ + Game Hexen + SpawnID 3 + Health 250 + Painchance 50 + Speed 13 + Radius 32 + Height 64 + Mass 220 + Monster + +TELESTOMP + +FLOORCLIP + SeeSound "DemonSight" + AttackSound "DemonAttack" + PainSound "DemonPain" + DeathSound "DemonDeath" + ActiveSound "DemonActive" + States + { + Spawn: + DEMN AA 10 A_Look + Loop + See: + DEMN ABCD 4 A_Chase + Loop + Pain: + DEMN E 4 + DEMN E 4 A_Pain + Goto See + Melee: + DEMN E 6 A_FaceTarget + DEMN F 8 A_FaceTarget + DEMN G 6 A_CustomMeleeAttack(random[DemonAttack1](1,8)*2) + Goto See + Missile: + DEMN E 5 A_FaceTarget + DEMN F 6 A_FaceTarget + DEMN G 5 A_CustomMissile("Demon1FX1", 62, 0) + Goto See + Death: + DEMN HI 6 + DEMN J 6 A_Scream + DEMN K 6 A_NoBlocking + DEMN L 6 A_QueueCorpse + DEMN MNO 6 + DEMN P -1 + Stop + XDeath: + DEMN H 6 + DEMN I 0 A_SpawnItemEx("Demon1Chunk1", 0,0,45, 1+(random[DemonChunks](0,255)*0.015625), 1+(random[DemonChunks](0,255)*0.015625), 9, 90) + DEMN I 0 A_SpawnItemEx("Demon1Chunk2", 0,0,45, 1+(random[DemonChunks](0,255)*0.015625), 1+(random[DemonChunks](0,255)*0.015625), 9, 270) + DEMN I 0 A_SpawnItemEx("Demon1Chunk3", 0,0,45, 1+(random[DemonChunks](0,255)*0.015625), 1+(random[DemonChunks](0,255)*0.015625), 9, 270) + DEMN I 0 A_SpawnItemEx("Demon1Chunk4", 0,0,45, 1+(random[DemonChunks](0,255)*0.015625), 1+(random[DemonChunks](0,255)*0.015625), 9, 270) + DEMN I 6 A_SpawnItemEx("Demon1Chunk5", 0,0,45, 1+(random[DemonChunks](0,255)*0.015625), 1+(random[DemonChunks](0,255)*0.015625), 9, 270) + Goto Death+2 + Ice: + DEMN Q 5 A_FreezeDeath + DEMN Q 1 A_FreezeDeathChunks + Wait + } +} + +// Demon, type 1, mashed ---------------------------------------------------- + +ACTOR Demon1Mash : Demon1 +{ + Game Hexen + SpawnID 100 + +NOBLOOD + +BLASTED + -TELESTOMP + +NOICEDEATH + RenderStyle Translucent + Alpha 0.4 + States + { + Death: + XDeath: + Ice: + Stop + } +} + +// Demon chunk, base class -------------------------------------------------- + +ACTOR DemonChunk +{ + Radius 5 + Height 5 + +NOBLOCKMAP + +DROPOFF + +MISSILE + +CORPSE + +FLOORCLIP + +NOTELEPORT +} + +// Demon, type 1, chunk 1 --------------------------------------------------- + +ACTOR Demon1Chunk1 : DemonChunk +{ + States + { + Spawn: + DEMA A 4 + DEMA A 10 A_QueueCorpse + DEMA A 20 + Wait + Death: + DEMA A -1 + Stop + } +} + +// Demon, type 1, chunk 2 --------------------------------------------------- + +ACTOR Demon1Chunk2 : DemonChunk +{ + States + { + Spawn: + DEMB A 4 + DEMB A 10 A_QueueCorpse + DEMB A 20 + Wait + Death: + DEMB A -1 + Stop + } +} + +ACTOR Demon1Chunk3 : DemonChunk +{ + States + { + Spawn: + DEMC A 4 + DEMC A 10 A_QueueCorpse + DEMC A 20 + Wait + Death: + DEMC A -1 + Stop + } +} + +// Demon, type 1, chunk 4 --------------------------------------------------- + +ACTOR Demon1Chunk4 : DemonChunk +{ + States + { + Spawn: + DEMD A 4 + DEMD A 10 A_QueueCorpse + DEMD A 20 + Wait + Death: + DEMD A -1 + Stop + } +} + +// Demon, type 1, chunk 5 --------------------------------------------------- + +ACTOR Demon1Chunk5 : DemonChunk +{ + States + { + Spawn: + DEME A 4 + DEME A 10 A_QueueCorpse + DEME A 20 + Wait + Death: + DEME A -1 + Stop + } +} + +// Demon, type 1, projectile ------------------------------------------------ + +ACTOR Demon1FX1 +{ + Speed 15 + Radius 10 + Height 6 + Damage 5 + DamageType Fire + Projectile + +SPAWNSOUNDSOURCE + RenderStyle Add + SeeSound "DemonMissileFire" + DeathSound "DemonMissileExplode" + States + { + Spawn: + DMFX ABC 4 Bright + Loop + Death: + DMFX DE 4 Bright + DMFX FGH 3 Bright + Stop + } +} + +// Demon, type 2 (brown) ---------------------------------------------------- + +ACTOR Demon2 : Demon1 8080 +{ + Game Hexen + States + { + Spawn: + DEM2 AA 10 A_Look + Loop + See: + DEM2 ABCD 4 A_Chase + Loop + Pain: + DEM2 E 4 + DEM2 E 4 A_Pain + Goto See + Melee: + DEM2 E 6 A_FaceTarget + DEM2 F 8 A_FaceTarget + DEM2 G 6 A_CustomMeleeAttack(random[DemonAttack1](1,8)*2) + Goto See + Missile: + DEM2 E 5 A_FaceTarget + DEM2 F 6 A_FaceTarget + DEM2 G 5 A_CustomMissile("Demon2FX1", 62, 0) + Goto See + Death: + DEM2 HI 6 + DEM2 J 6 A_Scream + DEM2 K 6 A_NoBlocking + DEM2 L 6 A_QueueCorpse + DEM2 MNO 6 + DEM2 P -1 + Stop + XDeath: + DEM2 H 6 + DEM2 I 0 A_SpawnItemEx("Demon2Chunk1", 0,0,45, 1+(random[DemonChunks](0,255)*0.015625), 1+(random[DemonChunks](0,255)*0.015625), 9, 90) + DEM2 I 0 A_SpawnItemEx("Demon2Chunk2", 0,0,45, 1+(random[DemonChunks](0,255)*0.015625), 1+(random[DemonChunks](0,255)*0.015625), 9, 270) + DEM2 I 0 A_SpawnItemEx("Demon2Chunk3", 0,0,45, 1+(random[DemonChunks](0,255)*0.015625), 1+(random[DemonChunks](0,255)*0.015625), 9, 270) + DEM2 I 0 A_SpawnItemEx("Demon2Chunk4", 0,0,45, 1+(random[DemonChunks](0,255)*0.015625), 1+(random[DemonChunks](0,255)*0.015625), 9, 270) + DEM2 I 6 A_SpawnItemEx("Demon2Chunk5", 0,0,45, 1+(random[DemonChunks](0,255)*0.015625), 1+(random[DemonChunks](0,255)*0.015625), 9, 270) + Goto Death+2 + Ice: + DEM2 Q 5 A_FreezeDeath + DEM2 Q 1 A_FreezeDeathChunks + Wait + } +} + +// Demon, type 2, mashed ---------------------------------------------------- + +ACTOR Demon2Mash : Demon2 +{ + Game Hexen + SpawnID 101 + +NOBLOOD + +BLASTED + -TELESTOMP + +NOICEDEATH + RenderStyle Translucent + Alpha 0.4 + States + { + Death: + XDeath: + Ice: + Stop + } +} + +// Demon, type 2, chunk 1 --------------------------------------------------- + +ACTOR Demon2Chunk1 : DemonChunk +{ + States + { + Spawn: + DMBA A 4 + DMBA A 10 A_QueueCorpse + DMBA A 20 + Wait + Death: + DMBA A -1 + Stop + } +} + +// Demon, type 2, chunk 2 --------------------------------------------------- + +ACTOR Demon2Chunk2 : DemonChunk +{ + States + { + Spawn: + DMBB A 4 + DMBB A 10 A_QueueCorpse + DMBB A 20 + Wait + Death: + DMBB A -1 + Stop + } +} + +// Demon, type 2, chunk 3 --------------------------------------------------- + +ACTOR Demon2Chunk3 : DemonChunk +{ + States + { + Spawn: + DMBC A 4 + DMBC A 10 A_QueueCorpse + DMBC A 20 + Wait + Death: + DMBC A -1 + Stop + } +} + +// Demon, type 2, chunk 4 --------------------------------------------------- + +ACTOR Demon2Chunk4 : DemonChunk +{ + States + { + Spawn: + DMBD A 4 + DMBD A 10 A_QueueCorpse + DMBD A 20 + Wait + Death: + DMBD A -1 + Stop + } +} + +// Demon, type 2, chunk 5 --------------------------------------------------- + +ACTOR Demon2Chunk5 : DemonChunk +{ + States + { + Spawn: + DMBE A 4 + DMBE A 10 A_QueueCorpse + DMBE A 20 + Wait + Death: + DMBE A -1 + Stop + } +} + +// Demon, type 2, projectile ------------------------------------------------ + +ACTOR Demon2FX1 +{ + Speed 15 + Radius 10 + Height 6 + Damage 5 + DamageType Fire + Projectile + +SPAWNSOUNDSOURCE + RenderStyle Add + SeeSound "DemonMissileFire" + DeathSound "DemonMissileExplode" + States + { + Spawn: + D2FX ABCDEF 4 Bright + Loop + Death: + D2FX GHIJ 4 Bright + D2FX KL 3 Bright + Stop + } +} + diff --git a/wadsrc/zdoom.lst b/wadsrc/zdoom.lst index d4b5a49eaf..b71b3128f9 100644 --- a/wadsrc/zdoom.lst +++ b/wadsrc/zdoom.lst @@ -283,7 +283,9 @@ actors/heretic/hereticarmor.txt decorate/heretic/hereticarmor.txt actors/heretic/hereticartifacts.txt decorate/heretic/hereticartifacts.txt actors/heretic/heretickeys.txt decorate/heretic/heretickeys.txt actors/heretic/hereticdecorations.txt decorate/heretic/hereticdecorations.txt +actors/heretic/mummy.txt decorate/heretic/mummy.txt actors/heretic/clink.txt decorate/heretic/clink.txt +actors/heretic/beast.txt decorate/heretic/beast.txt actors/heretic/snake.txt decorate/heretic/snake.txt actors/hexen/fighterplayer.txt decorate/hexen/fighterplayer.txt @@ -300,6 +302,7 @@ actors/hexen/scriptprojectiles.txt decorate/hexen/scriptprojectiles.txt actors/hexen/speedboots.txt decorate/hexen/speedboots.txt actors/hexen/ettin.txt decorate/hexen/ettin.txt actors/hexen/centaur.txt decorate/hexen/centaur.txt +actors/hexen/demons.txt decorate/hexen/demons.txt actors/strife/beggars.txt decorate/strife/beggars.txt actors/strife/merchants.txt decorate/strife/merchants.txt diff --git a/zdoom.vcproj b/zdoom.vcproj index 52360399f3..3ea69e4219 100644 --- a/zdoom.vcproj +++ b/zdoom.vcproj @@ -7012,42 +7012,6 @@ - - - - - - - - - - - - - - @@ -7196,42 +7160,6 @@ /> - - - - - - - - - - - - - - @@ -7376,42 +7304,6 @@ /> - - - - - - - - - - - - - - @@ -7848,42 +7740,6 @@ /> - - - - - - - - - - - - - -