2008-04-08 08:53:42 +00:00
|
|
|
#ifndef __A_MORPH__
|
|
|
|
#define __A_MORPH__
|
|
|
|
|
|
|
|
#define MORPHTICS (40*TICRATE)
|
2008-05-22 19:35:38 +00:00
|
|
|
#define MAXMORPHHEALTH 30
|
2008-04-08 08:53:42 +00:00
|
|
|
|
|
|
|
// Morph style states how morphing affects health and
|
|
|
|
// other effects in the game; only valid for players.
|
|
|
|
// Default should be the old Heretic/HeXen behaviour,
|
2008-04-12 15:31:18 +00:00
|
|
|
// so (int) value of MORPH_OLDEFFECTS *must* be zero.
|
2008-04-08 08:53:42 +00:00
|
|
|
enum
|
|
|
|
{
|
2008-04-12 15:31:18 +00:00
|
|
|
MORPH_OLDEFFECTS = 0x00000000, // Default to old Heretic/HeXen behaviour unless flags given
|
2008-05-22 19:35:38 +00:00
|
|
|
MORPH_ADDSTAMINA = 0x00000001, // Player has a "power" instead of a "curse" (add stamina instead of limiting to health)
|
|
|
|
MORPH_FULLHEALTH = 0x00000002, // Player uses new health semantics (!POWER => MaxHealth of animal, POWER => Normal health behaviour)
|
2008-04-12 15:31:18 +00:00
|
|
|
MORPH_UNDOBYTOMEOFPOWER = 0x00000004, // Player unmorphs upon activating a Tome of Power
|
|
|
|
MORPH_UNDOBYCHAOSDEVICE = 0x00000008, // Player unmorphs upon activating a Chaos Device
|
|
|
|
MORPH_FAILNOTELEFRAG = 0x00000010, // Player stays morphed if unmorph by Tome of Power fails
|
|
|
|
MORPH_FAILNOLAUGH = 0x00000020, // Player doesn't laugh if unmorph by Chaos Device fails
|
2009-09-18 05:46:15 +00:00
|
|
|
MORPH_WHENINVULNERABLE = 0x00000040, // Player can morph when invulnerable but ONLY if doing it to themselves
|
2008-05-22 19:35:38 +00:00
|
|
|
MORPH_LOSEACTUALWEAPON = 0x00000080, // Player loses specified morph weapon only (not "whichever they have when unmorphing")
|
|
|
|
MORPH_NEWTIDBEHAVIOUR = 0x00000100, // Actor TID is by default transferred from the old actor to the new actor
|
|
|
|
MORPH_UNDOBYDEATH = 0x00000200, // Actor unmorphs when killed and (unless MORPH_UNDOBYDEATHSAVES) stays dead
|
|
|
|
MORPH_UNDOBYDEATHFORCED = 0x00000400, // Actor (if unmorphed when killed) forces unmorph (not very useful with UNDOBYDEATHSAVES)
|
|
|
|
MORPH_UNDOBYDEATHSAVES = 0x00000800, // Actor (if unmorphed when killed) regains their health and doesn't die
|
2009-12-28 22:41:14 +00:00
|
|
|
MORPH_UNDOBYTIMEOUT = 0x00001000, // Player unmorphs once countdown expires
|
|
|
|
|
|
|
|
MORPH_STANDARDUNDOING = MORPH_UNDOBYTOMEOFPOWER | MORPH_UNDOBYCHAOSDEVICE | MORPH_UNDOBYTIMEOUT,
|
2008-04-08 08:53:42 +00:00
|
|
|
};
|
|
|
|
|
2009-09-17 01:36:14 +00:00
|
|
|
class PClass;
|
2008-04-08 08:53:42 +00:00
|
|
|
class AActor;
|
2008-06-01 07:52:33 +00:00
|
|
|
class player_t;
|
2008-05-22 19:35:38 +00:00
|
|
|
class AMorphedMonster;
|
2008-04-08 08:53:42 +00:00
|
|
|
|
2008-06-01 07:52:33 +00:00
|
|
|
bool P_MorphPlayer (player_t *activator, player_t *player, const PClass *morphclass, int duration = 0, int style = 0,
|
2008-04-08 08:53:42 +00:00
|
|
|
const PClass *enter_flash = NULL, const PClass *exit_flash = NULL);
|
2009-09-18 05:46:15 +00:00
|
|
|
bool P_UndoPlayerMorph (player_t *activator, player_t *player, int unmorphflag = 0, bool force = false);
|
2008-04-08 08:53:42 +00:00
|
|
|
bool P_MorphMonster (AActor *actor, const PClass *morphclass, int duration = 0, int style = 0,
|
|
|
|
const PClass *enter_flash = NULL, const PClass *exit_flash = NULL);
|
2008-05-22 19:35:38 +00:00
|
|
|
bool P_UndoMonsterMorph (AMorphedMonster *beast, bool force = false);
|
2008-04-08 08:53:42 +00:00
|
|
|
bool P_UpdateMorphedMonster (AActor *actor);
|
2008-05-22 19:35:38 +00:00
|
|
|
bool P_MorphedDeath(AActor *actor, AActor **morphed, int *morphedstyle, int *morphedhealth);
|
2008-04-08 08:53:42 +00:00
|
|
|
|
|
|
|
#endif //__A_MORPH__
|