mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-24 21:11:39 +00:00
- scriptified Hexen's Centaur.
This commit is contained in:
parent
8f8017836f
commit
213b3f1fe4
6 changed files with 37 additions and 45 deletions
|
@ -859,7 +859,6 @@ set( NOT_COMPILED_SOURCE_FILES
|
|||
g_heretic/a_ironlich.cpp
|
||||
g_hexen/a_blastradius.cpp
|
||||
g_hexen/a_boostarmor.cpp
|
||||
g_hexen/a_centaur.cpp
|
||||
g_hexen/a_clericflame.cpp
|
||||
g_hexen/a_clericholy.cpp
|
||||
g_hexen/a_clericmace.cpp
|
||||
|
|
|
@ -1,30 +0,0 @@
|
|||
/*
|
||||
#include "actor.h"
|
||||
#include "p_enemy.h"
|
||||
#include "a_action.h"
|
||||
#include "m_random.h"
|
||||
#include "vm.h"
|
||||
*/
|
||||
|
||||
static FRandom pr_centaurdefend ("CentaurDefend");
|
||||
|
||||
//============================================================================
|
||||
//
|
||||
// A_CentaurDefend
|
||||
//
|
||||
//============================================================================
|
||||
|
||||
DEFINE_ACTION_FUNCTION(AActor, A_CentaurDefend)
|
||||
{
|
||||
PARAM_SELF_PROLOGUE(AActor);
|
||||
|
||||
A_FaceTarget (self);
|
||||
if (self->CheckMeleeRange() && pr_centaurdefend() < 32)
|
||||
{
|
||||
// This should unset REFLECTIVE as well
|
||||
// (unless you want the Centaur to reflect projectiles forever!)
|
||||
self->flags2&=~(MF2_REFLECTIVE|MF2_INVULNERABLE);
|
||||
self->SetState (self->MeleeState);
|
||||
}
|
||||
return 0;
|
||||
}
|
|
@ -29,7 +29,6 @@
|
|||
// Include all the Hexen stuff here to reduce compile time
|
||||
#include "a_blastradius.cpp"
|
||||
#include "a_boostarmor.cpp"
|
||||
#include "a_centaur.cpp"
|
||||
#include "a_clericflame.cpp"
|
||||
#include "a_clericholy.cpp"
|
||||
#include "a_clericmace.cpp"
|
||||
|
|
|
@ -292,7 +292,6 @@ class Actor : Thinker native
|
|||
native void A_FreezeDeathChunks();
|
||||
native void A_GenericFreezeDeath();
|
||||
native void A_IceGuyDie();
|
||||
native void A_CentaurDefend();
|
||||
native void A_CStaffMissileSlither();
|
||||
native void A_PlayerScream();
|
||||
native void A_SkullPop(class<PlayerChunk> skulltype = "BloodySkull");
|
||||
|
|
|
@ -54,14 +54,17 @@ class Centaur : Actor
|
|||
XDeath:
|
||||
CTXD A 4;
|
||||
CTXD B 4 A_NoBlocking;
|
||||
CTXD C 0 A_SpawnItemEx("CentaurSword", 0, 0, 45,
|
||||
CTXD C 4
|
||||
{
|
||||
A_SpawnItemEx("CentaurSword", 0, 0, 45,
|
||||
1 + random[CentaurDrop](-128,127)*0.03125,
|
||||
1 + random[CentaurDrop](-128,127)*0.03125,
|
||||
8 + random[CentaurDrop](0,255)*0.015625, 270);
|
||||
CTXD C 4 A_SpawnItemEx("CentaurShield", 0, 0, 45,
|
||||
A_SpawnItemEx("CentaurShield", 0, 0, 45,
|
||||
1 + random[CentaurDrop](-128,127)*0.03125,
|
||||
1 + random[CentaurDrop](-128,127)*0.03125,
|
||||
8 + random[CentaurDrop](0,255)*0.015625, 90);
|
||||
}
|
||||
CTXD D 3 A_Scream;
|
||||
CTXD E 4 A_QueueCorpse;
|
||||
CTXD F 3;
|
||||
|
@ -74,6 +77,22 @@ class Centaur : Actor
|
|||
CENT U 5 A_FreezeDeath;
|
||||
CENT U 1 A_FreezeDeathChunks;
|
||||
Wait;
|
||||
}
|
||||
}
|
||||
|
||||
extend class Actor
|
||||
{
|
||||
void A_CentaurDefend()
|
||||
{
|
||||
A_FaceTarget ();
|
||||
if (CheckMeleeRange() && random[CentaurDefend]() < 32)
|
||||
{
|
||||
// This should unset REFLECTIVE as well
|
||||
// (unless you want the Centaur to reflect projectiles forever!)
|
||||
bReflective = false;
|
||||
bInvulnerable = false;
|
||||
SetState(MeleeState);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -56,11 +56,14 @@ class Demon1 : Actor
|
|||
Stop;
|
||||
XDeath:
|
||||
DEMN H 6;
|
||||
DEMN I 0 A_SpawnItemEx("Demon1Chunk1", 0,0,45, frandom[DemonChunks](1,4.984375)*cos(Angle+90), frandom[DemonChunks](1,4.984375)*sin(Angle+90), 8, 90, ChunkFlags);
|
||||
DEMN I 0 A_SpawnItemEx("Demon1Chunk2", 0,0,45, frandom[DemonChunks](1,4.984375)*cos(Angle-90), frandom[DemonChunks](1,4.984375)*sin(Angle-90), 8, 270, ChunkFlags);
|
||||
DEMN I 0 A_SpawnItemEx("Demon1Chunk3", 0,0,45, frandom[DemonChunks](1,4.984375)*cos(Angle-90), frandom[DemonChunks](1,4.984375)*sin(Angle-90), 8, 270, ChunkFlags);
|
||||
DEMN I 0 A_SpawnItemEx("Demon1Chunk4", 0,0,45, frandom[DemonChunks](1,4.984375)*cos(Angle-90), frandom[DemonChunks](1,4.984375)*sin(Angle-90), 8, 270, ChunkFlags);
|
||||
DEMN I 6 A_SpawnItemEx("Demon1Chunk5", 0,0,45, frandom[DemonChunks](1,4.984375)*cos(Angle-90), frandom[DemonChunks](1,4.984375)*sin(Angle-90), 8, 270, ChunkFlags);
|
||||
DEMN I 6
|
||||
{
|
||||
A_SpawnItemEx("Demon1Chunk1", 0,0,45, frandom[DemonChunks](1,4.984375)*cos(Angle+90), frandom[DemonChunks](1,4.984375)*sin(Angle+90), 8, 90, ChunkFlags);
|
||||
A_SpawnItemEx("Demon1Chunk2", 0,0,45, frandom[DemonChunks](1,4.984375)*cos(Angle-90), frandom[DemonChunks](1,4.984375)*sin(Angle-90), 8, 270, ChunkFlags);
|
||||
A_SpawnItemEx("Demon1Chunk3", 0,0,45, frandom[DemonChunks](1,4.984375)*cos(Angle-90), frandom[DemonChunks](1,4.984375)*sin(Angle-90), 8, 270, ChunkFlags);
|
||||
A_SpawnItemEx("Demon1Chunk4", 0,0,45, frandom[DemonChunks](1,4.984375)*cos(Angle-90), frandom[DemonChunks](1,4.984375)*sin(Angle-90), 8, 270, ChunkFlags);
|
||||
A_SpawnItemEx("Demon1Chunk5", 0,0,45, frandom[DemonChunks](1,4.984375)*cos(Angle-90), frandom[DemonChunks](1,4.984375)*sin(Angle-90), 8, 270, ChunkFlags);
|
||||
}
|
||||
Goto Death+2;
|
||||
Ice:
|
||||
DEMN Q 5 A_FreezeDeath;
|
||||
|
@ -261,11 +264,14 @@ class Demon2 : Demon1
|
|||
Stop;
|
||||
XDeath:
|
||||
DEM2 H 6;
|
||||
DEM2 I 0 A_SpawnItemEx("Demon2Chunk1", 0,0,45, frandom[DemonChunks](1,4.984375)*cos(Angle+90), frandom[DemonChunks](1,4.984375)*sin(Angle+90), 8, 90, ChunkFlags);
|
||||
DEM2 I 0 A_SpawnItemEx("Demon2Chunk2", 0,0,45, frandom[DemonChunks](1,4.984375)*cos(Angle-90), frandom[DemonChunks](1,4.984375)*sin(Angle-90), 8, 270, ChunkFlags);
|
||||
DEM2 I 0 A_SpawnItemEx("Demon2Chunk3", 0,0,45, frandom[DemonChunks](1,4.984375)*cos(Angle-90), frandom[DemonChunks](1,4.984375)*sin(Angle-90), 8, 270, ChunkFlags);
|
||||
DEM2 I 0 A_SpawnItemEx("Demon2Chunk4", 0,0,45, frandom[DemonChunks](1,4.984375)*cos(Angle-90), frandom[DemonChunks](1,4.984375)*sin(Angle-90), 8, 270, ChunkFlags);
|
||||
DEM2 I 6 A_SpawnItemEx("Demon2Chunk5", 0,0,45, frandom[DemonChunks](1,4.984375)*cos(Angle-90), frandom[DemonChunks](1,4.984375)*sin(Angle-90), 8, 270, ChunkFlags);
|
||||
DEM2 I 6
|
||||
{
|
||||
A_SpawnItemEx("Demon2Chunk1", 0,0,45, frandom[DemonChunks](1,4.984375)*cos(Angle+90), frandom[DemonChunks](1,4.984375)*sin(Angle+90), 8, 90, ChunkFlags);
|
||||
A_SpawnItemEx("Demon2Chunk2", 0,0,45, frandom[DemonChunks](1,4.984375)*cos(Angle-90), frandom[DemonChunks](1,4.984375)*sin(Angle-90), 8, 270, ChunkFlags);
|
||||
A_SpawnItemEx("Demon2Chunk3", 0,0,45, frandom[DemonChunks](1,4.984375)*cos(Angle-90), frandom[DemonChunks](1,4.984375)*sin(Angle-90), 8, 270, ChunkFlags);
|
||||
A_SpawnItemEx("Demon2Chunk4", 0,0,45, frandom[DemonChunks](1,4.984375)*cos(Angle-90), frandom[DemonChunks](1,4.984375)*sin(Angle-90), 8, 270, ChunkFlags);
|
||||
A_SpawnItemEx("Demon2Chunk5", 0,0,45, frandom[DemonChunks](1,4.984375)*cos(Angle-90), frandom[DemonChunks](1,4.984375)*sin(Angle-90), 8, 270, ChunkFlags);
|
||||
}
|
||||
Goto Death+2;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue