- Converted Arachnotron, Archvile, Cyberdemon, Spidermastermind and

CommanderKeen to DECORATE.


SVN r374 (trunk)
This commit is contained in:
Christoph Oelckers 2006-11-04 16:19:50 +00:00
parent 29195a913c
commit 5e8323b426
16 changed files with 369 additions and 481 deletions

View file

@ -1,4 +1,6 @@
November 4, 2006 (Changes by Graf Zahl)
- Converted Arachnotron, Archvile, Cyberdemon, Spidermastermind and
CommanderKeen to DECORATE.
- Converted ExplosiveBarrel, BulletPuff and DoomUnusedStates to DECORATE.
- Added VSpeed DECORATE property so that an actor can be given an initial
vertical speed.

View file

@ -1,135 +1,10 @@
#include "actor.h"
#include "info.h"
#include "s_sound.h"
#include "p_local.h"
#include "p_enemy.h"
#include "a_doomglobal.h"
#include "gstrings.h"
#include "a_action.h"
void A_BspiAttack (AActor *self);
void A_BabyMetal (AActor *self);
void A_SpidRefire (AActor *self);
class AArachnotron : public AActor
{
DECLARE_ACTOR (AArachnotron, AActor)
};
FState AArachnotron::States[] =
{
#define S_BSPI_STND 0
S_NORMAL (BSPI, 'A', 10, A_Look , &States[S_BSPI_STND+1]),
S_NORMAL (BSPI, 'B', 10, A_Look , &States[S_BSPI_STND]),
#define S_BSPI_SIGHT (S_BSPI_STND+2)
#define S_BSPI_RUN (S_BSPI_SIGHT+1)
S_NORMAL (BSPI, 'A', 20, NULL , &States[S_BSPI_RUN+0]),
S_NORMAL (BSPI, 'A', 3, A_BabyMetal , &States[S_BSPI_RUN+1]),
S_NORMAL (BSPI, 'A', 3, A_Chase , &States[S_BSPI_RUN+2]),
S_NORMAL (BSPI, 'B', 3, A_Chase , &States[S_BSPI_RUN+3]),
S_NORMAL (BSPI, 'B', 3, A_Chase , &States[S_BSPI_RUN+4]),
S_NORMAL (BSPI, 'C', 3, A_Chase , &States[S_BSPI_RUN+5]),
S_NORMAL (BSPI, 'C', 3, A_Chase , &States[S_BSPI_RUN+6]),
S_NORMAL (BSPI, 'D', 3, A_BabyMetal , &States[S_BSPI_RUN+7]),
S_NORMAL (BSPI, 'D', 3, A_Chase , &States[S_BSPI_RUN+8]),
S_NORMAL (BSPI, 'E', 3, A_Chase , &States[S_BSPI_RUN+9]),
S_NORMAL (BSPI, 'E', 3, A_Chase , &States[S_BSPI_RUN+10]),
S_NORMAL (BSPI, 'F', 3, A_Chase , &States[S_BSPI_RUN+11]),
S_NORMAL (BSPI, 'F', 3, A_Chase , &States[S_BSPI_RUN+0]),
#define S_BSPI_ATK (S_BSPI_RUN+12)
S_BRIGHT (BSPI, 'A', 20, A_FaceTarget , &States[S_BSPI_ATK+1]),
S_BRIGHT (BSPI, 'G', 4, A_BspiAttack , &States[S_BSPI_ATK+2]),
S_BRIGHT (BSPI, 'H', 4, NULL , &States[S_BSPI_ATK+3]),
S_BRIGHT (BSPI, 'H', 1, A_SpidRefire , &States[S_BSPI_ATK+1]),
#define S_BSPI_PAIN (S_BSPI_ATK+4)
S_NORMAL (BSPI, 'I', 3, NULL , &States[S_BSPI_PAIN+1]),
S_NORMAL (BSPI, 'I', 3, A_Pain , &States[S_BSPI_RUN+0]),
#define S_BSPI_DIE (S_BSPI_PAIN+2)
S_NORMAL (BSPI, 'J', 20, A_Scream , &States[S_BSPI_DIE+1]),
S_NORMAL (BSPI, 'K', 7, A_NoBlocking , &States[S_BSPI_DIE+2]),
S_NORMAL (BSPI, 'L', 7, NULL , &States[S_BSPI_DIE+3]),
S_NORMAL (BSPI, 'M', 7, NULL , &States[S_BSPI_DIE+4]),
S_NORMAL (BSPI, 'N', 7, NULL , &States[S_BSPI_DIE+5]),
S_NORMAL (BSPI, 'O', 7, NULL , &States[S_BSPI_DIE+6]),
S_NORMAL (BSPI, 'P', -1, A_BossDeath , NULL),
#define S_BSPI_RAISE (S_BSPI_DIE+7)
S_NORMAL (BSPI, 'P', 5, NULL , &States[S_BSPI_RAISE+1]),
S_NORMAL (BSPI, 'O', 5, NULL , &States[S_BSPI_RAISE+2]),
S_NORMAL (BSPI, 'N', 5, NULL , &States[S_BSPI_RAISE+3]),
S_NORMAL (BSPI, 'M', 5, NULL , &States[S_BSPI_RAISE+4]),
S_NORMAL (BSPI, 'L', 5, NULL , &States[S_BSPI_RAISE+5]),
S_NORMAL (BSPI, 'K', 5, NULL , &States[S_BSPI_RAISE+6]),
S_NORMAL (BSPI, 'J', 5, NULL , &States[S_BSPI_RUN+0])
};
IMPLEMENT_ACTOR (AArachnotron, Doom, 68, 6)
PROP_SpawnHealth (500)
PROP_RadiusFixed (64)
PROP_HeightFixed (64)
PROP_Mass (600)
PROP_SpeedFixed (12)
PROP_PainChance (128)
PROP_Flags (MF_SOLID|MF_SHOOTABLE|MF_COUNTKILL)
PROP_Flags2 (MF2_MCROSS|MF2_PASSMOBJ|MF2_PUSHWALL|MF2_FLOORCLIP)
PROP_Flags4 (MF4_BOSSDEATH)
PROP_SpawnState (S_BSPI_STND)
PROP_SeeState (S_BSPI_SIGHT)
PROP_PainState (S_BSPI_PAIN)
PROP_MissileState (S_BSPI_ATK)
PROP_DeathState (S_BSPI_DIE)
PROP_RaiseState (S_BSPI_RAISE)
PROP_SeeSound ("baby/sight")
PROP_PainSound ("baby/pain")
PROP_DeathSound ("baby/death")
PROP_ActiveSound ("baby/active")
PROP_Obituary("$OB_BABY")
END_DEFAULTS
class AArachnotronPlasma : public APlasmaBall
{
DECLARE_ACTOR (AArachnotronPlasma, APlasmaBall)
};
FState AArachnotronPlasma::States[] =
{
#define S_ARACH_PLAZ 0
S_BRIGHT (APLS, 'A', 5, NULL , &States[S_ARACH_PLAZ+1]),
S_BRIGHT (APLS, 'B', 5, NULL , &States[S_ARACH_PLAZ]),
#define S_ARACH_PLEX (S_ARACH_PLAZ+2)
S_BRIGHT (APBX, 'A', 5, NULL , &States[S_ARACH_PLEX+1]),
S_BRIGHT (APBX, 'B', 5, NULL , &States[S_ARACH_PLEX+2]),
S_BRIGHT (APBX, 'C', 5, NULL , &States[S_ARACH_PLEX+3]),
S_BRIGHT (APBX, 'D', 5, NULL , &States[S_ARACH_PLEX+4]),
S_BRIGHT (APBX, 'E', 5, NULL , NULL)
};
IMPLEMENT_ACTOR (AArachnotronPlasma, Doom, -1, 129)
PROP_RadiusFixed (13)
PROP_HeightFixed (8)
PROP_SpeedFixed (25)
PROP_Damage (5)
PROP_Flags (MF_NOBLOCKMAP|MF_MISSILE|MF_DROPOFF|MF_NOGRAVITY)
PROP_Flags2 (MF2_PCROSS|MF2_IMPACT|MF2_NOTELEPORT)
PROP_Flags4 (MF4_RANDOMIZE)
PROP_RenderStyle (STYLE_Add)
PROP_SpawnState (S_ARACH_PLAZ)
PROP_DeathState (S_ARACH_PLEX)
PROP_SeeSound ("baby/attack")
PROP_DeathSound ("baby/shotx")
END_DEFAULTS
void A_BspiAttack (AActor *self)
{
if (!self->target)
@ -138,7 +13,7 @@ void A_BspiAttack (AActor *self)
A_FaceTarget (self);
// launch a missile
P_SpawnMissile (self, self->target, RUNTIME_CLASS(AArachnotronPlasma));
P_SpawnMissile (self, self->target, PClass::FindClass("ArachnotronPlasma"));
}
void A_BabyMetal (AActor *self)

View file

@ -7,147 +7,12 @@
#include "gstrings.h"
#include "a_action.h"
void A_VileChase (AActor *);
void A_VileStart (AActor *);
void A_StartFire (AActor *);
void A_FireCrackle (AActor *);
void A_Fire (AActor *);
void A_VileTarget (AActor *);
void A_VileAttack (AActor *);
FState AArchvile::States[] =
{
#define S_VILE_STND 0
S_NORMAL (VILE, 'A', 10, A_Look , &States[S_VILE_STND+1]),
S_NORMAL (VILE, 'B', 10, A_Look , &States[S_VILE_STND]),
#define S_VILE_RUN (S_VILE_STND+2)
S_NORMAL (VILE, 'A', 2, A_VileChase , &States[S_VILE_RUN+1]),
S_NORMAL (VILE, 'A', 2, A_VileChase , &States[S_VILE_RUN+2]),
S_NORMAL (VILE, 'B', 2, A_VileChase , &States[S_VILE_RUN+3]),
S_NORMAL (VILE, 'B', 2, A_VileChase , &States[S_VILE_RUN+4]),
S_NORMAL (VILE, 'C', 2, A_VileChase , &States[S_VILE_RUN+5]),
S_NORMAL (VILE, 'C', 2, A_VileChase , &States[S_VILE_RUN+6]),
S_NORMAL (VILE, 'D', 2, A_VileChase , &States[S_VILE_RUN+7]),
S_NORMAL (VILE, 'D', 2, A_VileChase , &States[S_VILE_RUN+8]),
S_NORMAL (VILE, 'E', 2, A_VileChase , &States[S_VILE_RUN+9]),
S_NORMAL (VILE, 'E', 2, A_VileChase , &States[S_VILE_RUN+10]),
S_NORMAL (VILE, 'F', 2, A_VileChase , &States[S_VILE_RUN+11]),
S_NORMAL (VILE, 'F', 2, A_VileChase , &States[S_VILE_RUN+0]),
#define S_VILE_ATK (S_VILE_RUN+12)
S_BRIGHT (VILE, 'G', 0, A_VileStart , &States[S_VILE_ATK+1]),
S_BRIGHT (VILE, 'G', 10, A_FaceTarget , &States[S_VILE_ATK+2]),
S_BRIGHT (VILE, 'H', 8, A_VileTarget , &States[S_VILE_ATK+3]),
S_BRIGHT (VILE, 'I', 8, A_FaceTarget , &States[S_VILE_ATK+4]),
S_BRIGHT (VILE, 'J', 8, A_FaceTarget , &States[S_VILE_ATK+5]),
S_BRIGHT (VILE, 'K', 8, A_FaceTarget , &States[S_VILE_ATK+6]),
S_BRIGHT (VILE, 'L', 8, A_FaceTarget , &States[S_VILE_ATK+7]),
S_BRIGHT (VILE, 'M', 8, A_FaceTarget , &States[S_VILE_ATK+8]),
S_BRIGHT (VILE, 'N', 8, A_FaceTarget , &States[S_VILE_ATK+9]),
S_BRIGHT (VILE, 'O', 8, A_VileAttack , &States[S_VILE_ATK+10]),
S_BRIGHT (VILE, 'P', 20, NULL , &States[S_VILE_RUN+0]),
#define S_VILE_HEAL (S_VILE_ATK+11)
S_BRIGHT (VILE, '[', 10, NULL , &States[S_VILE_HEAL+1]),
S_BRIGHT (VILE, '\\', 10, NULL , &States[S_VILE_HEAL+2]),
S_BRIGHT (VILE, ']', 10, NULL , &States[S_VILE_RUN+0]),
#define S_VILE_PAIN (S_VILE_HEAL+3)
S_NORMAL (VILE, 'Q', 5, NULL , &States[S_VILE_PAIN+1]),
S_NORMAL (VILE, 'Q', 5, A_Pain , &States[S_VILE_RUN+0]),
#define S_VILE_DIE (S_VILE_PAIN+2)
S_NORMAL (VILE, 'Q', 7, NULL , &States[S_VILE_DIE+1]),
S_NORMAL (VILE, 'R', 7, A_Scream , &States[S_VILE_DIE+2]),
S_NORMAL (VILE, 'S', 7, A_NoBlocking , &States[S_VILE_DIE+3]),
S_NORMAL (VILE, 'T', 7, NULL , &States[S_VILE_DIE+4]),
S_NORMAL (VILE, 'U', 7, NULL , &States[S_VILE_DIE+5]),
S_NORMAL (VILE, 'V', 7, NULL , &States[S_VILE_DIE+6]),
S_NORMAL (VILE, 'W', 7, NULL , &States[S_VILE_DIE+7]),
S_NORMAL (VILE, 'X', 5, NULL , &States[S_VILE_DIE+8]),
S_NORMAL (VILE, 'Y', 5, NULL , &States[S_VILE_DIE+9]),
S_NORMAL (VILE, 'Z', -1, NULL , NULL)
};
IMPLEMENT_ACTOR (AArchvile, Doom, 64, 111)
PROP_SpawnHealth (700)
PROP_RadiusFixed (20)
PROP_HeightFixed (56)
PROP_Mass (500)
PROP_SpeedFixed (15)
PROP_PainChance (10)
PROP_Flags (MF_SOLID|MF_SHOOTABLE|MF_COUNTKILL)
PROP_Flags2 (MF2_MCROSS|MF2_PASSMOBJ|MF2_PUSHWALL|MF2_FLOORCLIP)
PROP_Flags3 (MF3_NOTARGET)
PROP_Flags4 (MF4_QUICKTORETALIATE|MF4_SHORTMISSILERANGE)
PROP_SpawnState (S_VILE_STND)
PROP_SeeState (S_VILE_RUN)
PROP_PainState (S_VILE_PAIN)
PROP_MissileState (S_VILE_ATK)
PROP_DeathState (S_VILE_DIE)
PROP_SeeSound ("vile/sight")
PROP_PainSound ("vile/pain")
PROP_DeathSound ("vile/death")
PROP_ActiveSound ("vile/active")
PROP_Obituary("$OB_VILE")
END_DEFAULTS
class AArchvileFire : public AActor
{
DECLARE_ACTOR (AArchvileFire, AActor)
};
FState AArchvileFire::States[] =
{
S_BRIGHT (FIRE, 'A', 2, A_StartFire , &States[1]),
S_BRIGHT (FIRE, 'B', 2, A_Fire , &States[2]),
S_BRIGHT (FIRE, 'A', 2, A_Fire , &States[3]),
S_BRIGHT (FIRE, 'B', 2, A_Fire , &States[4]),
S_BRIGHT (FIRE, 'C', 2, A_FireCrackle , &States[5]),
S_BRIGHT (FIRE, 'B', 2, A_Fire , &States[6]),
S_BRIGHT (FIRE, 'C', 2, A_Fire , &States[7]),
S_BRIGHT (FIRE, 'B', 2, A_Fire , &States[8]),
S_BRIGHT (FIRE, 'C', 2, A_Fire , &States[9]),
S_BRIGHT (FIRE, 'D', 2, A_Fire , &States[10]),
S_BRIGHT (FIRE, 'C', 2, A_Fire , &States[11]),
S_BRIGHT (FIRE, 'D', 2, A_Fire , &States[12]),
S_BRIGHT (FIRE, 'C', 2, A_Fire , &States[13]),
S_BRIGHT (FIRE, 'D', 2, A_Fire , &States[14]),
S_BRIGHT (FIRE, 'E', 2, A_Fire , &States[15]),
S_BRIGHT (FIRE, 'D', 2, A_Fire , &States[16]),
S_BRIGHT (FIRE, 'E', 2, A_Fire , &States[17]),
S_BRIGHT (FIRE, 'D', 2, A_Fire , &States[18]),
S_BRIGHT (FIRE, 'E', 2, A_FireCrackle , &States[19]),
S_BRIGHT (FIRE, 'F', 2, A_Fire , &States[20]),
S_BRIGHT (FIRE, 'E', 2, A_Fire , &States[21]),
S_BRIGHT (FIRE, 'F', 2, A_Fire , &States[22]),
S_BRIGHT (FIRE, 'E', 2, A_Fire , &States[23]),
S_BRIGHT (FIRE, 'F', 2, A_Fire , &States[24]),
S_BRIGHT (FIRE, 'G', 2, A_Fire , &States[25]),
S_BRIGHT (FIRE, 'H', 2, A_Fire , &States[26]),
S_BRIGHT (FIRE, 'G', 2, A_Fire , &States[27]),
S_BRIGHT (FIRE, 'H', 2, A_Fire , &States[28]),
S_BRIGHT (FIRE, 'G', 2, A_Fire , &States[29]),
S_BRIGHT (FIRE, 'H', 2, A_Fire , NULL)
};
IMPLEMENT_ACTOR (AArchvileFire, Doom, -1, 98)
PROP_Flags (MF_NOBLOCKMAP|MF_NOGRAVITY)
PROP_Flags2 (MF2_MCROSS|MF2_PASSMOBJ|MF2_PUSHWALL)
PROP_RenderStyle (STYLE_Add)
PROP_SpawnState (0)
END_DEFAULTS
//
// PIT_VileCheck
// Detect a corpse that could be raised.
//
void A_Fire (AActor *self);
static AActor *corpsehit;
static AActor *vileobj;
static fixed_t viletryx;
@ -253,8 +118,7 @@ void A_VileChase (AActor *self)
}
self->target = temp;
// Make the state the monster enters customizable - but leave the
// default for Dehacked compatibility!
// Make the state the monster enters customizable.
FState * state = self->FindState(NAME_Heal);
if (state != NULL)
{
@ -262,7 +126,13 @@ void A_VileChase (AActor *self)
}
else
{
self->SetState (&AArchvile::States[S_VILE_HEAL]);
// For Dehacked compatibility this has to use the Arch Vile's
// heal state as a default if the actor doesn't define one itself.
const PClass *archvile = PClass::FindClass("Archvile");
if (archvile != NULL)
{
self->SetState (archvile->ActorInfo->FindState(NAME_Heal));
}
}
S_Sound (corpsehit, CHAN_BODY, "vile/raise", 1, ATTN_IDLE);
info = corpsehit->GetDefault ();
@ -364,7 +234,7 @@ void A_VileTarget (AActor *actor)
A_FaceTarget (actor);
fog = Spawn<AArchvileFire> (actor->target->x, actor->target->x,
fog = Spawn ("ArchvileFire", actor->target->x, actor->target->x,
actor->target->z, ALLOW_REPLACE);
actor->tracer = fog;

View file

@ -1,96 +1,17 @@
#include "templates.h"
#include "actor.h"
#include "info.h"
#include "m_random.h"
#include "p_local.h"
#include "s_sound.h"
#include "p_enemy.h"
#include "a_doomglobal.h"
#include "gstrings.h"
#include "a_action.h"
void A_CyberAttack (AActor *);
void A_Hoof (AActor *);
void A_Metal (AActor *);
class ACyberdemon : public AActor
{
DECLARE_ACTOR (ACyberdemon, AActor)
};
FState ACyberdemon::States[] =
{
#define S_CYBER_STND 0
S_NORMAL (CYBR, 'A', 10, A_Look , &States[S_CYBER_STND+1]),
S_NORMAL (CYBR, 'B', 10, A_Look , &States[S_CYBER_STND]),
#define S_CYBER_RUN (S_CYBER_STND+2)
S_NORMAL (CYBR, 'A', 3, A_Hoof , &States[S_CYBER_RUN+1]),
S_NORMAL (CYBR, 'A', 3, A_Chase , &States[S_CYBER_RUN+2]),
S_NORMAL (CYBR, 'B', 3, A_Chase , &States[S_CYBER_RUN+3]),
S_NORMAL (CYBR, 'B', 3, A_Chase , &States[S_CYBER_RUN+4]),
S_NORMAL (CYBR, 'C', 3, A_Chase , &States[S_CYBER_RUN+5]),
S_NORMAL (CYBR, 'C', 3, A_Chase , &States[S_CYBER_RUN+6]),
S_NORMAL (CYBR, 'D', 3, A_Metal , &States[S_CYBER_RUN+7]),
S_NORMAL (CYBR, 'D', 3, A_Chase , &States[S_CYBER_RUN+0]),
#define S_CYBER_ATK (S_CYBER_RUN+8)
S_NORMAL (CYBR, 'E', 6, A_FaceTarget , &States[S_CYBER_ATK+1]),
S_NORMAL (CYBR, 'F', 12, A_CyberAttack , &States[S_CYBER_ATK+2]),
S_NORMAL (CYBR, 'E', 12, A_FaceTarget , &States[S_CYBER_ATK+3]),
S_NORMAL (CYBR, 'F', 12, A_CyberAttack , &States[S_CYBER_ATK+4]),
S_NORMAL (CYBR, 'E', 12, A_FaceTarget , &States[S_CYBER_ATK+5]),
S_NORMAL (CYBR, 'F', 12, A_CyberAttack , &States[S_CYBER_RUN+0]),
#define S_CYBER_PAIN (S_CYBER_ATK+6)
S_NORMAL (CYBR, 'G', 10, A_Pain , &States[S_CYBER_RUN+0]),
#define S_CYBER_DIE (S_CYBER_PAIN+1)
S_NORMAL (CYBR, 'H', 10, NULL , &States[S_CYBER_DIE+1]),
S_NORMAL (CYBR, 'I', 10, A_Scream , &States[S_CYBER_DIE+2]),
S_NORMAL (CYBR, 'J', 10, NULL , &States[S_CYBER_DIE+3]),
S_NORMAL (CYBR, 'K', 10, NULL , &States[S_CYBER_DIE+4]),
S_NORMAL (CYBR, 'L', 10, NULL , &States[S_CYBER_DIE+5]),
S_NORMAL (CYBR, 'M', 10, A_NoBlocking , &States[S_CYBER_DIE+6]),
S_NORMAL (CYBR, 'N', 10, NULL , &States[S_CYBER_DIE+7]),
S_NORMAL (CYBR, 'O', 10, NULL , &States[S_CYBER_DIE+8]),
S_NORMAL (CYBR, 'P', 30, NULL , &States[S_CYBER_DIE+9]),
S_NORMAL (CYBR, 'P', -1, A_BossDeath , NULL)
};
IMPLEMENT_ACTOR (ACyberdemon, Doom, 16, 114)
PROP_SpawnHealth (4000)
PROP_RadiusFixed (40)
PROP_HeightFixed (110)
PROP_Mass (1000)
PROP_SpeedFixed (16)
PROP_PainChance (20)
PROP_Flags (MF_SOLID|MF_SHOOTABLE|MF_COUNTKILL)
PROP_Flags2 (MF2_MCROSS|MF2_PASSMOBJ|MF2_PUSHWALL|MF2_BOSS|MF2_FLOORCLIP)
PROP_Flags3 (MF3_NORADIUSDMG|MF3_DONTMORPH)
PROP_Flags4 (MF4_BOSSDEATH|MF4_MISSILEMORE)
PROP_MinMissileChance (160)
PROP_SpawnState (S_CYBER_STND)
PROP_SeeState (S_CYBER_RUN)
PROP_PainState (S_CYBER_PAIN)
PROP_MissileState (S_CYBER_ATK)
PROP_DeathState (S_CYBER_DIE)
PROP_SeeSound ("cyber/sight")
PROP_PainSound ("cyber/pain")
PROP_DeathSound ("cyber/death")
PROP_ActiveSound ("cyber/active")
PROP_Obituary("$OB_CYBORG")
END_DEFAULTS
void A_CyberAttack (AActor *self)
{
if (!self->target)
return;
A_FaceTarget (self);
P_SpawnMissile (self, self->target, RUNTIME_CLASS(ARocket));
P_SpawnMissile (self, self->target, PClass::FindClass("Rocket"));
}
void A_Hoof (AActor *self)

View file

@ -5,54 +5,6 @@
#include "p_enemy.h"
#include "a_action.h"
void A_KeenDie (AActor *);
class ACommanderKeen : public AActor
{
DECLARE_ACTOR (ACommanderKeen, AActor)
};
FState ACommanderKeen::States[] =
{
#define S_KEENSTND 0
S_NORMAL (KEEN, 'A', -1, NULL , &States[S_KEENSTND]),
#define S_COMMKEEN (S_KEENSTND+1)
S_NORMAL (KEEN, 'A', 6, NULL , &States[S_COMMKEEN+1]),
S_NORMAL (KEEN, 'B', 6, NULL , &States[S_COMMKEEN+2]),
S_NORMAL (KEEN, 'C', 6, A_Scream , &States[S_COMMKEEN+3]),
S_NORMAL (KEEN, 'D', 6, NULL , &States[S_COMMKEEN+4]),
S_NORMAL (KEEN, 'E', 6, NULL , &States[S_COMMKEEN+5]),
S_NORMAL (KEEN, 'F', 6, NULL , &States[S_COMMKEEN+6]),
S_NORMAL (KEEN, 'G', 6, NULL , &States[S_COMMKEEN+7]),
S_NORMAL (KEEN, 'H', 6, NULL , &States[S_COMMKEEN+8]),
S_NORMAL (KEEN, 'I', 6, NULL , &States[S_COMMKEEN+9]),
S_NORMAL (KEEN, 'J', 6, NULL , &States[S_COMMKEEN+10]),
S_NORMAL (KEEN, 'K', 6, A_KeenDie , &States[S_COMMKEEN+11]),
S_NORMAL (KEEN, 'L', -1, NULL , NULL),
#define S_KEENPAIN (S_COMMKEEN+12)
S_NORMAL (KEEN, 'M', 4, NULL , &States[S_KEENPAIN+1]),
S_NORMAL (KEEN, 'M', 8, A_Pain , &States[S_KEENSTND])
};
IMPLEMENT_ACTOR (ACommanderKeen, Doom, 72, 0)
PROP_SpawnHealth (100)
PROP_RadiusFixed (16)
PROP_HeightFixed (72)
PROP_MassLong (10000000)
PROP_MaxPainChance
PROP_Flags (MF_SOLID|MF_SPAWNCEILING|MF_NOGRAVITY|MF_SHOOTABLE|MF_COUNTKILL)
PROP_Flags4 (MF4_NOICEDEATH)
PROP_SpawnState (S_KEENSTND)
PROP_PainState (S_KEENPAIN)
PROP_DeathState (S_COMMKEEN)
PROP_PainSound ("keen/pain")
PROP_DeathSound ("keen/death")
END_DEFAULTS
//
// A_KeenDie
// DOOM II special, map 32.

View file

@ -1,94 +1,13 @@
#include "templates.h"
#include "actor.h"
#include "info.h"
#include "m_random.h"
#include "s_sound.h"
#include "p_local.h"
#include "p_enemy.h"
#include "gstrings.h"
#include "a_action.h"
static FRandom pr_spidrefire ("SpidRefire");
void A_SpidRefire (AActor *);
void A_Metal (AActor *);
void A_SPosAttackUseAtkSound (AActor *);
class ASpiderMastermind : public AActor
{
DECLARE_ACTOR (ASpiderMastermind, AActor)
};
FState ASpiderMastermind::States[] =
{
#define S_SPID_STND 0
S_NORMAL (SPID, 'A', 10, A_Look , &States[S_SPID_STND+1]),
S_NORMAL (SPID, 'B', 10, A_Look , &States[S_SPID_STND]),
#define S_SPID_RUN (S_SPID_STND+2)
S_NORMAL (SPID, 'A', 3, A_Metal , &States[S_SPID_RUN+1]),
S_NORMAL (SPID, 'A', 3, A_Chase , &States[S_SPID_RUN+2]),
S_NORMAL (SPID, 'B', 3, A_Chase , &States[S_SPID_RUN+3]),
S_NORMAL (SPID, 'B', 3, A_Chase , &States[S_SPID_RUN+4]),
S_NORMAL (SPID, 'C', 3, A_Metal , &States[S_SPID_RUN+5]),
S_NORMAL (SPID, 'C', 3, A_Chase , &States[S_SPID_RUN+6]),
S_NORMAL (SPID, 'D', 3, A_Chase , &States[S_SPID_RUN+7]),
S_NORMAL (SPID, 'D', 3, A_Chase , &States[S_SPID_RUN+8]),
S_NORMAL (SPID, 'E', 3, A_Metal , &States[S_SPID_RUN+9]),
S_NORMAL (SPID, 'E', 3, A_Chase , &States[S_SPID_RUN+10]),
S_NORMAL (SPID, 'F', 3, A_Chase , &States[S_SPID_RUN+11]),
S_NORMAL (SPID, 'F', 3, A_Chase , &States[S_SPID_RUN+0]),
#define S_SPID_ATK (S_SPID_RUN+12)
S_BRIGHT (SPID, 'A', 20, A_FaceTarget , &States[S_SPID_ATK+1]),
S_BRIGHT (SPID, 'G', 4, A_SPosAttackUseAtkSound , &States[S_SPID_ATK+2]),
S_BRIGHT (SPID, 'H', 4, A_SPosAttackUseAtkSound , &States[S_SPID_ATK+3]),
S_BRIGHT (SPID, 'H', 1, A_SpidRefire , &States[S_SPID_ATK+1]),
#define S_SPID_PAIN (S_SPID_ATK+4)
S_NORMAL (SPID, 'I', 3, NULL , &States[S_SPID_PAIN+1]),
S_NORMAL (SPID, 'I', 3, A_Pain , &States[S_SPID_RUN+0]),
#define S_SPID_DIE (S_SPID_PAIN+2)
S_NORMAL (SPID, 'J', 20, A_Scream , &States[S_SPID_DIE+1]),
S_NORMAL (SPID, 'K', 10, A_NoBlocking , &States[S_SPID_DIE+2]),
S_NORMAL (SPID, 'L', 10, NULL , &States[S_SPID_DIE+3]),
S_NORMAL (SPID, 'M', 10, NULL , &States[S_SPID_DIE+4]),
S_NORMAL (SPID, 'N', 10, NULL , &States[S_SPID_DIE+5]),
S_NORMAL (SPID, 'O', 10, NULL , &States[S_SPID_DIE+6]),
S_NORMAL (SPID, 'P', 10, NULL , &States[S_SPID_DIE+7]),
S_NORMAL (SPID, 'Q', 10, NULL , &States[S_SPID_DIE+8]),
S_NORMAL (SPID, 'R', 10, NULL , &States[S_SPID_DIE+9]),
S_NORMAL (SPID, 'S', 30, NULL , &States[S_SPID_DIE+10]),
S_NORMAL (SPID, 'S', -1, A_BossDeath , NULL)
};
IMPLEMENT_ACTOR (ASpiderMastermind, Doom, 7, 7)
PROP_SpawnHealth (3000)
PROP_RadiusFixed (128)
PROP_HeightFixed (100)
PROP_Mass (1000)
PROP_SpeedFixed (12)
PROP_PainChance (40)
PROP_Flags (MF_SOLID|MF_SHOOTABLE|MF_COUNTKILL)
PROP_Flags2 (MF2_MCROSS|MF2_PASSMOBJ|MF2_PUSHWALL|MF2_BOSS|MF2_FLOORCLIP)
PROP_Flags3 (MF3_NORADIUSDMG|MF3_DONTMORPH)
PROP_Flags4 (MF4_BOSSDEATH|MF4_MISSILEMORE)
PROP_SpawnState (S_SPID_STND)
PROP_SeeState (S_SPID_RUN)
PROP_PainState (S_SPID_PAIN)
PROP_MissileState (S_SPID_ATK)
PROP_DeathState (S_SPID_DIE)
PROP_SeeSound ("spider/sight")
PROP_AttackSound ("spider/attack")
PROP_PainSound ("spider/pain")
PROP_DeathSound ("spider/death")
PROP_ActiveSound ("spider/active")
PROP_Obituary("$OB_SPIDER")
END_DEFAULTS
void A_SpidRefire (AActor *self)
{
// keep firing unless target got out of sight

View file

@ -210,6 +210,7 @@ static flagdef ActorFlags[]=
DEFINE_FLAG(MF4, FRIGHTENED, AActor, flags4),
DEFINE_FLAG(MF4, NOBOUNCESOUND, AActor, flags4),
DEFINE_FLAG(MF4, NOSKIN, AActor, flags4),
DEFINE_FLAG(MF4, BOSSDEATH, AActor, flags4),
DEFINE_FLAG(MF5, FASTER, AActor, flags5),
DEFINE_FLAG(MF5, FASTMELEE, AActor, flags5),

View file

@ -8,6 +8,11 @@
#include "actors/doom/lostsoul.txt"
#include "actors/doom/cacodemon.txt"
#include "actors/doom/bruiser.txt"
#include "actors/doom/arachnotron.txt"
#include "actors/doom/archvile.txt"
#include "actors/doom/cyberdemon.txt"
#include "actors/doom/spidermaster.txt"
#include "actors/doom/keen.txt"
#include "actors/doom/deadthings.txt"
#include "actors/doom/doomammo.txt"

View file

@ -0,0 +1,87 @@
//===========================================================================
//
// Arachnotron
//
//===========================================================================
ACTOR Arachnotron 68
{
Game Doom
SpawnID 6
Health 500
Radius 64
Height 64
Mass 600
Speed 12
PainChance 128
Monster
+FLOORCLIP
+BOSSDEATH
SeeSound "baby/sight"
PainSound "baby/pain"
DeathSound "baby/death"
ActiveSound "baby/active"
Obituary "$OB_BABY"
States
{
Spawn:
BSPI AB 10 A_Look
Loop
See:
BSPI A 20
BSPI A 3 A_BabyMetal
BSPI ABBCC 3 A_Chase
BSPI D 3 A_BabyMetal
BSPI DEEFF 3 A_Chase
Goto See+1
Missile:
BSPI A 20 BRIGHT A_FaceTarget
BSPI G 4 BRIGHT A_BspiAttack
BSPI H 4 BRIGHT
BSPI H 1 BRIGHT A_SpidRefire
Goto Missile+1
Pain:
BSPI I 3
BSPI I 3 A_Pain
Goto See+1
Death:
BSPI J 20 A_Scream
BSPI K 7 A_Fall
BSPI LMNO 7
BSPI P -1 A_BossDeath
Stop
Raise:
BSPI P 5
BSPI ONMLKJ 5
Goto See+1
}
}
//===========================================================================
//
// Arachnotron plasma
//
//===========================================================================
ACTOR ArachnotronPlasma
{
Radius 13
Height 8
Speed 25
Damage 5
Projectile
+RANDOMIZE
RenderStyle Add
Alpha 0.75
SeeSound "baby/attack"
DeathSound "baby/shotx"
States
{
Spawn:
APLS AB 5 BRIGHT
Loop
Death:
APBX ABCDE 5 BRIGHT
Stop
}
}

View file

@ -0,0 +1,85 @@
//===========================================================================
//
// Arch Vile
//
//===========================================================================
ACTOR Archvile 64
{
Game Doom
SpawnID 111
Health 700
Radius 20
Height 56
Mass 500
Speed 15
PainChance 10
Monster
+QUICKTORETALIATE
+SHORTMISSILERANGE
+FLOORCLIP
+NOTARGET
SeeSound "vile/sight"
PainSound "vile/pain"
DeathSound "vile/death"
ActiveSound "vile/active"
MeleeSound "vile/stop"
Obituary "$OB_VILE"
States
{
Spawn:
VILE AB 10 A_Look
Loop
See:
VILE AABBCCDDEEFF 2 A_VileChase
Loop
Missile:
VILE G 1 BRIGHT A_VileStart
VILE G 9 BRIGHT A_FaceTarget
VILE H 8 BRIGHT A_VileTarget
VILE IJKLMN 8 BRIGHT A_FaceTarget
VILE O 8 BRIGHT A_VileAttack
VILE P 20 BRIGHT
Goto See
Heal:
VILE "[\]" 10 BRIGHT
Goto See
Pain:
VILE Q 5
VILE Q 5 A_Pain
Goto See
Death:
VILE Q 7
VILE R 7 A_Scream
VILE S 7 A_Fall
VILE TUVWXY 7
VILE Z -1
Stop
}
}
//===========================================================================
//
// Arch Vile Fire
//
//===========================================================================
ACTOR ArchvileFire
{
+NOBLOCKMAP +NOGRAVITY
RenderStyle Add
Alpha 1
States
{
Spawn:
FIRE A 2 BRIGHT A_StartFire
FIRE BAB 2 BRIGHT A_Fire
FIRE C 0 BRIGHT A_FireCrackle
FIRE CBCBCDCDCDEDED 2 BRIGHT A_Fire
FIRE E 0 BRIGHT A_FireCrackle
FIRE EFEFEFGHGHGH 2 BRIGHT A_Fire
Stop
}
}

View file

@ -33,7 +33,7 @@ ACTOR Cacodemon 3005
Missile:
HEAD B 5 A_FaceTarget
HEAD C 5 A_FaceTarget
HEAD D 5 A_HeadAttack
HEAD D 5 BRIGHT A_HeadAttack
Goto See
Pain:
HEAD E 3

View file

@ -0,0 +1,63 @@
//===========================================================================
//
// Cyberdemon
//
//===========================================================================
ACTOR Cyberdemon 16
{
Game Doom
SpawnID 114
Health 4000
Radius 40
Height 110
Mass 1000
Speed 16
PainChance 20
Monster
MinMissileChance 160
+BOSS
+MISSILEMORE
+FLOORCLIP
+NORADIUSDMG
+DONTMORPH
+BOSSDEATH
SeeSound "cyber/sight"
PainSound "cyber/pain"
DeathSound "cyber/death"
ActiveSound "cyber/active"
Obituary "$OB_CYBORG"
States
{
Spawn:
CYBR AB 10 A_Look
Loop
See:
CYBR A 3 A_Hoof
CYBR ABBCC 3 A_Chase
CYBR D 3 A_Metal
CYBR D 3 A_Chase
Loop
Missile:
CYBR E 6 A_FaceTarget
CYBR F 12 A_CyberAttack
CYBR E 12 A_FaceTarget
CYBR F 12 A_CyberAttack
CYBR E 12 A_FaceTarget
CYBR F 12 A_CyberAttack
Goto See
Pain:
CYBR G 10 A_Pain
Goto See
Death:
CYBR H 10
CYBR I 10 A_Scream
CYBR JKL 10
CYBR M 10 A_Fall
CYBR NO 10
CYBR P 30
CYBR P -1 A_BossDeath
Stop
}
}

View file

@ -0,0 +1,42 @@
//===========================================================================
//
// Commander Keen
//
//===========================================================================
ACTOR CommanderKeen 72
{
Game Doom
Health 100
Radius 16
Height 72
Mass 10000000
PainChance 256
+SOLID
+SPAWNCEILING
+NOGRAVITY
+SHOOTABLE
+COUNTKILL
+NOICEDEATH
PainSound "keen/pain"
DeathSound "keen/death"
States
{
Spawn:
KEEN A -1
Loop
Death:
KEEN AB 6
KEEN B 6
KEEN C 6 A_Scream
KEEN DEFGH 6
KEEN I 6 A_Fall
KEEN J 6
KEEN K 6 A_KeenDie
KEEN L -1
Stop
Pain:
KEEN M 4
KEEN M 8 A_Pain
Goto Spawn
}
}

View file

@ -94,7 +94,7 @@ ACTOR ShotgunGuy 9
Loop
Missile:
SPOS E 10 A_FaceTarget
SPOS F 10 A_SposAttackUseAtkSound
SPOS F 10 BRIGHT A_SposAttackUseAtkSound
SPOS E 10
Goto See
Pain:
@ -156,7 +156,7 @@ ACTOR ChaingunGuy 65
Loop
Missile:
CPOS E 10 A_FaceTarget
CPOS FE 4 A_CPosAttack
CPOS FE 4 BRIGHT A_CPosAttack
CPOS F 1 A_CPosRefire
Goto Missile+1
Pain:
@ -217,9 +217,9 @@ ACTOR WolfensteinSS 84
Missile:
SSWV E 10 A_FaceTarget
SSWV F 10 A_FaceTarget
SSWV G 4 A_CPosAttack
SSWV G 4 BRIGHT A_CPosAttack
SSWV F 6 A_FaceTarget
SSWV G 4 A_CPosAttack
SSWV G 4 BRIGHT A_CPosAttack
SSWV F 1 A_CPosRefire
Goto Missile+1
Pain:

View file

@ -0,0 +1,61 @@
//===========================================================================
//
// Spider boss
//
//===========================================================================
ACTOR SpiderMastermind 7
{
Game Doom
SpawnID 7
Health 3000
Radius 100
Height 100
Mass 1000
Speed 12
PainChance 40
Monster
MinMissileChance 160
+BOSS
+MISSILEMORE
+FLOORCLIP
+NORADIUSDMG
+DONTMORPH
+BOSSDEATH
SeeSound "spider/sight"
AttackSound "spider/attack"
PainSound "spider/pain"
DeathSound "spider/death"
ActiveSound "spider/active"
Obituary "$OB_SPIDER"
States
{
Spawn:
SPID AB 10 A_Look
Loop
See:
SPID A 3 A_Metal
SPID ABB 3 A_Chase
SPID C 3 A_Metal
SPID CDD 3 A_Chase
SPID E 3 A_Metal
SPID EFF 3 A_Chase
Loop
Missile:
SPID A BRIGHT 20 A_FaceTarget
SPID G BRIGHT 4 A_SPosAttack
SPID H BRIGHT 4 A_SposAttack
SPID H BRIGHT 1 A_SpidRefire
Goto Missile+1
Pain:
SPID I 3
SPID I 3 A_Pain
Goto See
Death:
SPID J 20 A_Scream
SPID K 10 A_Fall
SPID LMNOPQR 10
SPID S 30
SPID S -1 A_BossDeath
Stop
}
}

View file

@ -251,6 +251,11 @@ actors/doom/demon.txt decorate/doom/demon.txt
actors/doom/lostsoul.txt decorate/doom/lostsoul.txt
actors/doom/cacodemon.txt decorate/doom/cacodemon.txt
actors/doom/bruiser.txt decorate/doom/bruiser.txt
actors/doom/arachnotron.txt decorate/doom/arachnotron.txt
actors/doom/archvile.txt decorate/doom/archvile.txt
actors/doom/cyberdemon.txt decorate/doom/cyberdemon.txt
actors/doom/spidermaster.txt decorate/doom/spidermaster.txt
actors/doom/keen.txt decorate/doom/keen.txt
actors/doom/deadthings.txt decorate/doom/deadthings.txt
actors/doom/doomammo.txt decorate/doom/doomammo.txt