mirror of
https://github.com/diasurgical/devilution.git
synced 2025-07-23 04:23:01 +02:00
Clean up hellfire related code
This commit is contained in:
@@ -2036,10 +2036,10 @@ void LoadGameLevel(BOOL firstflag, int lvldir)
|
||||
#ifdef HELLFIRE
|
||||
if (currlevel >= 21) {
|
||||
if (currlevel == 21) {
|
||||
items_427ABA(CornerStone.x, CornerStone.y);
|
||||
CornerstoneLoad(CornerStone.x, CornerStone.y);
|
||||
}
|
||||
if (quests[Q_NAKRUL]._qactive == QUEST_DONE && currlevel == 24) {
|
||||
objects_454BA8();
|
||||
SyncNakrulRoom();
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
@@ -473,8 +473,29 @@ const BYTE byte_48A3D4[4] = { 1, 1, 2, 202 };
|
||||
/* data */
|
||||
|
||||
#ifdef HELLFIRE
|
||||
BYTE UberRoomPattern[32] = { 4, 6, 115, 130, 6, 13, 129, 108, 1, 13, 1, 107, 103, 13, 146, 106, 102, 13, 129, 168, 1, 13, 7, 2, 3, 13, 0, 0, 0, 0, 0, 0 };
|
||||
BYTE CornerstoneRoomPattern[32] = { 5, 5, 4, 2, 2, 2, 6, 1, 111, 172, 0, 1, 1, 172, 0, 0, 25, 1, 0, 0, 0, 1, 7, 2, 2, 2, 3, 0, 0, 0, 0, 0 };
|
||||
BYTE UberRoomPattern[26] = {
|
||||
// clang-format off
|
||||
4, 6, // width, height
|
||||
|
||||
115, 130, 6, 13, // pattern
|
||||
129, 108, 1, 13,
|
||||
1, 107, 103, 13,
|
||||
146, 106, 102, 13,
|
||||
129, 168, 1, 13,
|
||||
7, 2, 3, 13,
|
||||
// clang-format on
|
||||
};
|
||||
BYTE CornerstoneRoomPattern[27] = {
|
||||
// clang-format off
|
||||
5, 5, // width, height
|
||||
|
||||
4, 2, 2, 2, 6, // pattern
|
||||
1, 111, 172, 0, 1,
|
||||
1, 172, 0, 0, 25,
|
||||
1, 0, 0, 0, 1,
|
||||
7, 2, 2, 2, 3,
|
||||
// clang-format on
|
||||
};
|
||||
#endif
|
||||
/**
|
||||
* A lookup table for the 16 possible patterns of a 2x2 area,
|
||||
|
@@ -196,7 +196,7 @@ void gamemenu_save_game(BOOL bActivate)
|
||||
SetCursor_(CURSOR_HAND);
|
||||
#ifdef HELLFIRE
|
||||
if (CornerStone.activated) {
|
||||
items_427A72();
|
||||
CornerstoneSave();
|
||||
}
|
||||
#endif
|
||||
interface_msg_pump();
|
||||
|
@@ -2452,7 +2452,7 @@ int InvPutItem(int pnum, int x, int y)
|
||||
xp = cursmx;
|
||||
if (plr[pnum].HoldItem._iCurs == ICURS_RUNE_BOMB && xp >= 79 && xp <= 82 && yp >= 61 && yp <= 64) {
|
||||
NetSendCmdLocParam2(0, CMD_OPENHIVE, plr[pnum]._px, plr[pnum]._py, xx, yy);
|
||||
quests[Q_FARMER]._qactive = 3;
|
||||
quests[Q_FARMER]._qactive = QUEST_DONE;
|
||||
if (gbMaxPlayers != 1) {
|
||||
NetSendCmdQuest(TRUE, Q_FARMER);
|
||||
return -1;
|
||||
@@ -2461,7 +2461,7 @@ int InvPutItem(int pnum, int x, int y)
|
||||
}
|
||||
if (plr[pnum].HoldItem.IDidx == IDI_MAPOFDOOM && xp >= 35 && xp <= 38 && yp >= 20 && yp <= 24) {
|
||||
NetSendCmd(FALSE, CMD_OPENCRYPT);
|
||||
quests[Q_GRAVE]._qactive = 3;
|
||||
quests[Q_GRAVE]._qactive = QUEST_DONE;
|
||||
if (gbMaxPlayers != 1) {
|
||||
NetSendCmdQuest(TRUE, Q_GRAVE);
|
||||
}
|
||||
@@ -2586,8 +2586,8 @@ int SyncPutItem(int pnum, int x, int y, int idx, WORD icreateinfo, int iseed, in
|
||||
if (currlevel == 21 && x == CornerStone.x && y == CornerStone.y) {
|
||||
CornerStone.item = item[ii];
|
||||
InitQTextMsg(296);
|
||||
quests[Q_CORNSTN]._qlog = 0;
|
||||
quests[Q_CORNSTN]._qactive = 3;
|
||||
quests[Q_CORNSTN]._qlog = FALSE;
|
||||
quests[Q_CORNSTN]._qactive = QUEST_DONE;
|
||||
}
|
||||
#endif
|
||||
return ii;
|
||||
|
@@ -298,7 +298,7 @@ int ItemInvSnds[] = {
|
||||
#endif
|
||||
};
|
||||
#ifdef HELLFIRE
|
||||
char *off_4A5AC4 = "SItem";
|
||||
char *CornerStoneRegKey = "SItem";
|
||||
#endif
|
||||
/** Specifies the current Y-coordinate used for validation of items on ground. */
|
||||
int idoppely = 16;
|
||||
@@ -598,7 +598,7 @@ void AddInitItems()
|
||||
}
|
||||
|
||||
#ifdef HELLFIRE
|
||||
static void items_42390F()
|
||||
static void SpawnNote()
|
||||
{
|
||||
int x, y, id;
|
||||
|
||||
@@ -664,7 +664,7 @@ void InitItems()
|
||||
AddInitItems();
|
||||
#ifdef HELLFIRE
|
||||
if (currlevel >= 21 && currlevel <= 23)
|
||||
items_42390F();
|
||||
SpawnNote();
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -2046,7 +2046,7 @@ void SaveItemPower(int i, int power, int param1, int param2, int minval, int max
|
||||
break;
|
||||
#ifdef HELLFIRE
|
||||
case IPL_DOPPELGANGER:
|
||||
item[i]._iDamAcFlags |= 16;
|
||||
item[i]._iDamAcFlags |= ISPLHF_DOPPELGANGER;
|
||||
// no break
|
||||
#endif
|
||||
case IPL_TOHIT_DAMP:
|
||||
@@ -2417,23 +2417,23 @@ void SaveItemPower(int i, int power, int param1, int param2, int minval, int max
|
||||
item[i]._iPLMR -= r;
|
||||
break;
|
||||
case IPL_DEVASTATION:
|
||||
item[i]._iDamAcFlags |= 0x01;
|
||||
item[i]._iDamAcFlags |= ISPLHF_DEVASTATION;
|
||||
break;
|
||||
case IPL_DECAY:
|
||||
item[i]._iDamAcFlags |= 0x02;
|
||||
item[i]._iDamAcFlags |= ISPLHF_DECAY;
|
||||
item[i]._iPLDam += r;
|
||||
break;
|
||||
case IPL_PERIL:
|
||||
item[i]._iDamAcFlags |= 0x04;
|
||||
item[i]._iDamAcFlags |= ISPLHF_PERIL;
|
||||
break;
|
||||
case IPL_JESTERS:
|
||||
item[i]._iDamAcFlags |= 0x08;
|
||||
item[i]._iDamAcFlags |= ISPLHF_JESTERS;
|
||||
break;
|
||||
case IPL_ACDEMON:
|
||||
item[i]._iDamAcFlags |= 0x20;
|
||||
item[i]._iDamAcFlags |= ISPLHF_ACDEMON;
|
||||
break;
|
||||
case IPL_ACUNDEAD:
|
||||
item[i]._iDamAcFlags |= 0x40;
|
||||
item[i]._iDamAcFlags |= ISPLHF_ACUNDEAD;
|
||||
break;
|
||||
case IPL_MANATOLIFE:
|
||||
r2 = ((plr[myplr]._pMaxManaBase >> 6) * 50 / 100);
|
||||
@@ -3244,20 +3244,20 @@ void RecreateEar(int ii, WORD ic, int iseed, int Id, int dur, int mdur, int ch,
|
||||
}
|
||||
|
||||
#ifdef HELLFIRE
|
||||
void items_427A72()
|
||||
void CornerstoneSave()
|
||||
{
|
||||
PkItemStruct id;
|
||||
if (CornerStone.activated) {
|
||||
if (CornerStone.item.IDidx >= 0) {
|
||||
PackItem(&id, &CornerStone.item);
|
||||
SRegSaveData(APP_NAME, off_4A5AC4, 0, (BYTE *)&id, 19);
|
||||
SRegSaveData(APP_NAME, CornerStoneRegKey, 0, (BYTE *)&id, 19);
|
||||
} else {
|
||||
SRegSaveData(APP_NAME, off_4A5AC4, 0, (BYTE *)"", 1);
|
||||
SRegSaveData(APP_NAME, CornerStoneRegKey, 0, (BYTE *)"", 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void items_427ABA(int x, int y)
|
||||
void CornerstoneLoad(int x, int y)
|
||||
{
|
||||
int i, ii;
|
||||
DWORD dwSize;
|
||||
@@ -3280,7 +3280,7 @@ void items_427ABA(int x, int y)
|
||||
dItem[x][y] = 0;
|
||||
}
|
||||
dwSize = 0;
|
||||
if (SRegLoadData(APP_NAME, off_4A5AC4, 0, (BYTE *)&PkSItem, sizeof(PkSItem), &dwSize)) {
|
||||
if (SRegLoadData(APP_NAME, CornerStoneRegKey, 0, (BYTE *)&PkSItem, sizeof(PkSItem), &dwSize)) {
|
||||
if (dwSize == sizeof(PkSItem)) {
|
||||
ii = itemavail[0];
|
||||
dItem[x][y] = ii + 1;
|
||||
|
@@ -59,8 +59,8 @@ void CreateTypeItem(int x, int y, BOOL onlygood, int itype, int imisc, BOOL send
|
||||
void RecreateItem(int ii, int idx, WORD icreateinfo, int iseed, int ivalue);
|
||||
void RecreateEar(int ii, WORD ic, int iseed, int Id, int dur, int mdur, int ch, int mch, int ivalue, int ibuff);
|
||||
#ifdef HELLFIRE
|
||||
void items_427A72();
|
||||
void items_427ABA(int x, int y);
|
||||
void CornerstoneSave();
|
||||
void CornerstoneLoad(int x, int y);
|
||||
#endif
|
||||
void SpawnQuestItem(int itemid, int x, int y, int randarea, int selflag);
|
||||
void SpawnRock();
|
||||
|
@@ -5,13 +5,21 @@
|
||||
*/
|
||||
#include "all.h"
|
||||
|
||||
/** Current y position of text in px */
|
||||
int qtexty;
|
||||
/** Pointer to the current text being displayed */
|
||||
const char *qtextptr;
|
||||
/** Time of last rendering of the text */
|
||||
int sgLastScroll;
|
||||
/** Specify if the quest dialog window is being shown */
|
||||
BOOLEAN qtextflag;
|
||||
/** Duplicate of qtextSpd */
|
||||
int qtextDelay;
|
||||
/** Vertical speed of the scrolling text, see qscroll_spd_tbl */
|
||||
int qtextSpd;
|
||||
/** Graphics for the medium size font */
|
||||
BYTE *pMedTextCels;
|
||||
/** Graphics for the window border */
|
||||
BYTE *pTextBoxCels;
|
||||
|
||||
/** Maps from font index to medtexts.cel frame number. */
|
||||
@@ -52,12 +60,18 @@ const BYTE mfontkern[56] = {
|
||||
*/
|
||||
int qscroll_spd_tbl[9] = { 2, 4, 6, 8, 0, -1, -2, -3, -4 };
|
||||
|
||||
/**
|
||||
* @brief Free the resouces used by the quest dialog window
|
||||
*/
|
||||
void FreeQuestText()
|
||||
{
|
||||
MemFreeDbg(pMedTextCels);
|
||||
MemFreeDbg(pTextBoxCels);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Load the resouces used by the quest dialog window, and initialize it's state
|
||||
*/
|
||||
void InitQuestText()
|
||||
{
|
||||
pMedTextCels = LoadFileInMem("Data\\MedTextS.CEL", NULL);
|
||||
@@ -65,6 +79,10 @@ void InitQuestText()
|
||||
qtextflag = FALSE;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Start the given naration
|
||||
* @param m Index of narration from the alltext table
|
||||
*/
|
||||
void InitQTextMsg(int m)
|
||||
{
|
||||
if (alltext[m].scrlltxt) {
|
||||
@@ -79,6 +97,9 @@ void InitQTextMsg(int m)
|
||||
PlaySFX(alltext[m].sfxnr);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Draw the quest dialog window decoration and background
|
||||
*/
|
||||
void DrawQTextBack()
|
||||
{
|
||||
CelDraw(PANEL_X + 24, SCREEN_Y + 327, pTextBoxCels, 1, 591);
|
||||
@@ -90,6 +111,13 @@ void DrawQTextBack()
|
||||
#include "asm_trans_rect.inc"
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Print a character
|
||||
* @param sx Back buffer coordinate
|
||||
* @param sy Back buffer coordinate
|
||||
* @param pCelBuff Cel data
|
||||
* @param nCel CEL frame number
|
||||
*/
|
||||
void PrintQTextChr(int sx, int sy, BYTE *pCelBuff, int nCel)
|
||||
{
|
||||
BYTE *dst, *pStart, *pEnd, *end;
|
||||
@@ -207,6 +235,9 @@ void PrintQTextChr(int sx, int sy, BYTE *pCelBuff, int nCel)
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Draw the quest dialog window decoration and background
|
||||
*/
|
||||
void DrawQText()
|
||||
{
|
||||
int i, l, w, tx, ty;
|
||||
|
@@ -113,7 +113,7 @@ MissileData missiledata[] = {
|
||||
{ MIS_RUNEIMMOLAT, &missiles_immolation_rune, &MI_Rune, TRUE, 1, MISR_NONE, MFILE_RUNE, -1, -1 },
|
||||
{ MIS_RUNESTONE, &missiles_stone_rune, &MI_Rune, TRUE, 1, MISR_NONE, MFILE_RUNE, -1, -1 },
|
||||
{ MIS_HIVEEXP, &missiles_rune_explosion, &mi_hive_explode, TRUE, 1, MISR_FIRE, MFILE_BIGEXP, LS_NESTXPLD, LS_NESTXPLD },
|
||||
{ MIS_HORKDMN, &missiles_430624, &missiles_4359A0, TRUE, 2, MISR_NONE, MFILE_NULL, -1, -1 },
|
||||
{ MIS_HORKDMN, &missiles_hork_spawn, &mi_hork_spawn, TRUE, 2, MISR_NONE, MFILE_NULL, -1, -1 },
|
||||
{ MIS_JESTER, &missiles_jester, &MI_Dummy, FALSE, 2, MISR_NONE, MFILE_NONE, -1, -1 },
|
||||
{ MIS_HIVEEXP2, &missiles_hive_explosion, &MI_Dummy, FALSE, 2, MISR_NONE, MFILE_NONE, -1, -1 },
|
||||
{ MIS_LICH, &AddFlare, &MI_Firebolt, TRUE, 1, MISR_MAGIC, MFILE_LICH, -1, -1 },
|
||||
|
@@ -1669,7 +1669,7 @@ void missiles_berserk(int mi, int sx, int sy, int dx, int dy, int midir, char mi
|
||||
missile[mi]._miDelFlag = TRUE;
|
||||
}
|
||||
|
||||
void missiles_430624(int mi, int sx, int sy, int dx, int dy, int midir, char mienemy, int id, int dam)
|
||||
void missiles_hork_spawn(int mi, int sx, int sy, int dx, int dy, int midir, char mienemy, int id, int dam)
|
||||
{
|
||||
GetMissileVel(mi, sx, sy, dx, dy, 8);
|
||||
missile[mi]._mirange = 9;
|
||||
@@ -4100,7 +4100,7 @@ void MI_Fireball(int i)
|
||||
}
|
||||
|
||||
#ifdef HELLFIRE
|
||||
void missiles_4359A0(int i)
|
||||
void mi_hork_spawn(int i)
|
||||
{
|
||||
int t, j, k, tx, ty, dp;
|
||||
|
||||
|
@@ -38,7 +38,7 @@ void missiles_immolation_rune(int mi, int sx, int sy, int dx, int dy, int midir,
|
||||
void missiles_stone_rune(int mi, int sx, int sy, int dx, int dy, int midir, char mienemy, int id, int dam);
|
||||
void missiles_reflection(int mi, int sx, int sy, int dx, int dy, int midir, char mienemy, int id, int dam);
|
||||
void missiles_berserk(int mi, int sx, int sy, int dx, int dy, int midir, char mienemy, int id, int dam);
|
||||
void missiles_430624(int mi, int sx, int sy, int dx, int dy, int midir, char mienemy, int id, int dam);
|
||||
void missiles_hork_spawn(int mi, int sx, int sy, int dx, int dy, int midir, char mienemy, int id, int dam);
|
||||
void missiles_jester(int mi, int sx, int sy, int dx, int dy, int midir, char mienemy, int id, int dam);
|
||||
void missiles_steal_pots(int mi, int sx, int sy, int dx, int dy, int midir, char mienemy, int id, int dam);
|
||||
void missiles_mana_trap(int mi, int sx, int sy, int dx, int dy, int midir, char mienemy, int id, int dam);
|
||||
@@ -131,7 +131,7 @@ void MI_Acidpud(int i);
|
||||
void MI_Firewall(int i);
|
||||
void MI_Fireball(int i);
|
||||
#ifdef HELLFIRE
|
||||
void missiles_4359A0(int i);
|
||||
void mi_hork_spawn(int i);
|
||||
void MI_Rune(int i);
|
||||
void mi_light_wall(int i);
|
||||
void mi_hive_explode(int i);
|
||||
|
@@ -657,7 +657,7 @@ void monster_some_crypt()
|
||||
if (currlevel == 24 && UberDiabloMonsterIndex >= 0 && UberDiabloMonsterIndex < nummonsters) {
|
||||
mon = &monster[UberDiabloMonsterIndex];
|
||||
PlayEffect(UberDiabloMonsterIndex, 2);
|
||||
quests[Q_NAKRUL]._qlog = 0;
|
||||
quests[Q_NAKRUL]._qlog = FALSE;
|
||||
mon->mArmorClass -= 50;
|
||||
hp = mon->_mmaxhp / 2;
|
||||
mon->mMagicRes = 0;
|
||||
@@ -1283,7 +1283,7 @@ int AddMonster(int x, int y, int dir, int mtype, BOOL InMap)
|
||||
}
|
||||
|
||||
#ifdef HELLFIRE
|
||||
void monster_43C785(int i)
|
||||
void AddDoppelganger(int i)
|
||||
{
|
||||
int x, y, d, j, oi, dir, mx, my;
|
||||
|
||||
@@ -1887,7 +1887,7 @@ void SpawnLoot(int i, BOOL sendmsg)
|
||||
} else if (Monst->mName == UniqMonst[UMT_DEFILER].mName) {
|
||||
if (effect_is_playing(USFX_DEFILER8))
|
||||
stream_stop();
|
||||
quests[Q_DEFILER]._qlog = 0;
|
||||
quests[Q_DEFILER]._qlog = FALSE;
|
||||
SpawnMapOfDoom(Monst->_mx, Monst->_my);
|
||||
} else if (Monst->mName == UniqMonst[UMT_HORKDMN].mName) {
|
||||
if (UseTheoQuest) {
|
||||
@@ -1902,7 +1902,7 @@ void SpawnLoot(int i, BOOL sendmsg)
|
||||
nSFX = USFX_NAKRUL6;
|
||||
if (effect_is_playing(nSFX))
|
||||
stream_stop();
|
||||
quests[Q_NAKRUL]._qlog = 0;
|
||||
quests[Q_NAKRUL]._qlog = FALSE;
|
||||
UberDiabloMonsterIndex = -2;
|
||||
CreateMagicWeapon(Monst->_mx, Monst->_my, ITYPE_SWORD, ICURS_GREAT_SWORD, FALSE, TRUE);
|
||||
CreateMagicWeapon(Monst->_mx, Monst->_my, ITYPE_STAFF, ICURS_WAR_STAFF, FALSE, TRUE);
|
||||
@@ -1932,8 +1932,8 @@ void M2MStartHit(int mid, int i, int dam)
|
||||
#endif
|
||||
}
|
||||
|
||||
if (i >= 0)
|
||||
monster[i].mWhoHit |= 1 << i;
|
||||
if (i >= 0) // BUGFIX: Missing check for golems `&& i <= MAX_PLRS`
|
||||
monster[i].mWhoHit |= 1 << i; // BUGFIX Should be monster[mid].mWhoHit
|
||||
|
||||
delta_monster_hp(mid, monster[mid]._mhitpoints, currlevel);
|
||||
#ifdef HELLFIRE
|
||||
@@ -2309,7 +2309,7 @@ void M_ChangeLightOffset(int monst)
|
||||
|
||||
_myoff *= (ly >> 3);
|
||||
#ifdef HELLFIRE
|
||||
if (monster[monst].mlid)
|
||||
if (monster[monst].mlid != 0)
|
||||
#endif
|
||||
ChangeLightOff(monster[monst].mlid, _mxoff, _myoff);
|
||||
}
|
||||
@@ -2588,9 +2588,9 @@ void M_TryH2HHit(int i, int pnum, int Hit, int MinDam, int MaxDam)
|
||||
#endif
|
||||
ac = plr[pnum]._pIBonusAC + plr[pnum]._pIAC;
|
||||
#ifdef HELLFIRE
|
||||
if (plr[pnum].pDamAcFlags & 0x20 && monster[i].MData->mMonstClass == MC_DEMON)
|
||||
if (plr[pnum].pDamAcFlags & ISPLHF_ACDEMON && monster[i].MData->mMonstClass == MC_DEMON)
|
||||
ac += 40;
|
||||
if (plr[pnum].pDamAcFlags & 0x40 && monster[i].MData->mMonstClass == MC_UNDEAD)
|
||||
if (plr[pnum].pDamAcFlags & ISPLHF_ACUNDEAD && monster[i].MData->mMonstClass == MC_UNDEAD)
|
||||
ac += 20;
|
||||
#endif
|
||||
hit = Hit
|
||||
|
@@ -27,7 +27,7 @@ void SetMapMonsters(BYTE *pMap, int startx, int starty);
|
||||
void DeleteMonster(int i);
|
||||
int AddMonster(int x, int y, int dir, int mtype, BOOL InMap);
|
||||
#ifdef HELLFIRE
|
||||
void monster_43C785(int i);
|
||||
void AddDoppelganger(int i);
|
||||
#endif
|
||||
BOOL M_Talker(int i);
|
||||
void M_StartStand(int i, int md);
|
||||
|
@@ -2583,9 +2583,9 @@ static DWORD On_REFLECT(TCmd *pCmd, int pnum)
|
||||
static DWORD On_NAKRUL(TCmd *pCmd, int pnum)
|
||||
{
|
||||
if (gbBufferMsgs != 1) {
|
||||
operate_lv24_lever();
|
||||
OperateNakrulLever();
|
||||
IsUberRoomOpened = 1;
|
||||
quests[Q_NAKRUL]._qactive = 3;
|
||||
quests[Q_NAKRUL]._qactive = QUEST_DONE;
|
||||
monster_some_crypt();
|
||||
}
|
||||
return sizeof(*pCmd);
|
||||
@@ -2596,7 +2596,7 @@ static DWORD On_OPENHIVE(TCmd *pCmd, int pnum)
|
||||
TCmdLocParam2 *p = (TCmdLocParam2 *)pCmd;
|
||||
if (gbBufferMsgs != 1) {
|
||||
AddMissile(p->x, p->y, p->wParam1, p->wParam2, 0, MIS_HIVEEXP2, TARGET_MONSTERS, pnum, 0, 0);
|
||||
town_4751C6();
|
||||
TownOpenHive();
|
||||
}
|
||||
return sizeof(*p);
|
||||
}
|
||||
@@ -2604,7 +2604,7 @@ static DWORD On_OPENHIVE(TCmd *pCmd, int pnum)
|
||||
static DWORD On_OPENCRYPT(TCmd *pCmd, int pnum)
|
||||
{
|
||||
if (gbBufferMsgs != 1) {
|
||||
town_475595();
|
||||
TownOpenGrave();
|
||||
InitTownTriggers();
|
||||
if (currlevel == 0)
|
||||
PlaySFX(IS_SARC);
|
||||
|
@@ -805,7 +805,7 @@ void AddDiabObjs()
|
||||
}
|
||||
|
||||
#ifdef HELLFIRE
|
||||
void objects_add_lv22(int s)
|
||||
void AddCryptStoryBook(int s)
|
||||
{
|
||||
DIABOOL exit;
|
||||
int xp, yp, cnt, m, n;
|
||||
@@ -828,7 +828,7 @@ void objects_add_lv22(int s)
|
||||
return;
|
||||
}
|
||||
}
|
||||
objects_44D8C5(OBJ_STORYBOOK, s, xp, yp);
|
||||
AddCryptBook(OBJ_STORYBOOK, s, xp, yp);
|
||||
AddObject(OBJ_STORYCANDLE, xp - 2, yp + 1);
|
||||
AddObject(OBJ_STORYCANDLE, xp - 2, yp);
|
||||
AddObject(OBJ_STORYCANDLE, xp - 1, yp - 1);
|
||||
@@ -837,46 +837,46 @@ void objects_add_lv22(int s)
|
||||
AddObject(OBJ_STORYCANDLE, xp + 2, yp + 1);
|
||||
}
|
||||
|
||||
void objects_add_lv24()
|
||||
void AddNakrulGate()
|
||||
{
|
||||
objects_rnd_454BEA();
|
||||
AddNakrulLeaver();
|
||||
switch (random_(0, 6)) {
|
||||
case 0:
|
||||
objects_454AF0(6, UberRow + 3, UberCol);
|
||||
objects_454AF0(7, UberRow + 2, UberCol - 3);
|
||||
objects_454AF0(8, UberRow + 2, UberCol + 2);
|
||||
AddNakrulBook(6, UberRow + 3, UberCol);
|
||||
AddNakrulBook(7, UberRow + 2, UberCol - 3);
|
||||
AddNakrulBook(8, UberRow + 2, UberCol + 2);
|
||||
break;
|
||||
case 1:
|
||||
objects_454AF0(6, UberRow + 3, UberCol);
|
||||
objects_454AF0(8, UberRow + 2, UberCol - 3);
|
||||
objects_454AF0(7, UberRow + 2, UberCol + 2);
|
||||
AddNakrulBook(6, UberRow + 3, UberCol);
|
||||
AddNakrulBook(8, UberRow + 2, UberCol - 3);
|
||||
AddNakrulBook(7, UberRow + 2, UberCol + 2);
|
||||
break;
|
||||
case 2:
|
||||
objects_454AF0(7, UberRow + 3, UberCol);
|
||||
objects_454AF0(6, UberRow + 2, UberCol - 3);
|
||||
objects_454AF0(8, UberRow + 2, UberCol + 2);
|
||||
AddNakrulBook(7, UberRow + 3, UberCol);
|
||||
AddNakrulBook(6, UberRow + 2, UberCol - 3);
|
||||
AddNakrulBook(8, UberRow + 2, UberCol + 2);
|
||||
break;
|
||||
case 3:
|
||||
objects_454AF0(7, UberRow + 3, UberCol);
|
||||
objects_454AF0(8, UberRow + 2, UberCol - 3);
|
||||
objects_454AF0(6, UberRow + 2, UberCol + 2);
|
||||
AddNakrulBook(7, UberRow + 3, UberCol);
|
||||
AddNakrulBook(8, UberRow + 2, UberCol - 3);
|
||||
AddNakrulBook(6, UberRow + 2, UberCol + 2);
|
||||
break;
|
||||
case 4:
|
||||
objects_454AF0(8, UberRow + 3, UberCol);
|
||||
objects_454AF0(7, UberRow + 2, UberCol - 3);
|
||||
objects_454AF0(6, UberRow + 2, UberCol + 2);
|
||||
AddNakrulBook(8, UberRow + 3, UberCol);
|
||||
AddNakrulBook(7, UberRow + 2, UberCol - 3);
|
||||
AddNakrulBook(6, UberRow + 2, UberCol + 2);
|
||||
break;
|
||||
case 5:
|
||||
objects_454AF0(8, UberRow + 3, UberCol);
|
||||
objects_454AF0(6, UberRow + 2, UberCol - 3);
|
||||
objects_454AF0(7, UberRow + 2, UberCol + 2);
|
||||
AddNakrulBook(8, UberRow + 3, UberCol);
|
||||
AddNakrulBook(6, UberRow + 2, UberCol - 3);
|
||||
AddNakrulBook(7, UberRow + 2, UberCol + 2);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void objects_454AF0(int a1, int a2, int a3)
|
||||
void AddNakrulBook(int a1, int a2, int a3)
|
||||
{
|
||||
objects_44D8C5(OBJ_STORYBOOK, a1, a2, a3);
|
||||
AddCryptBook(OBJ_STORYBOOK, a1, a2, a3);
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -1030,16 +1030,16 @@ void InitObjects()
|
||||
if (currlevel == 4 || currlevel == 8 || currlevel == 12)
|
||||
AddStoryBooks();
|
||||
if (currlevel == 21) {
|
||||
objects_add_lv22(1);
|
||||
AddCryptStoryBook(1);
|
||||
} else if (currlevel == 22) {
|
||||
objects_add_lv22(2);
|
||||
objects_add_lv22(3);
|
||||
AddCryptStoryBook(2);
|
||||
AddCryptStoryBook(3);
|
||||
} else if (currlevel == 23) {
|
||||
objects_add_lv22(4);
|
||||
objects_add_lv22(5);
|
||||
AddCryptStoryBook(4);
|
||||
AddCryptStoryBook(5);
|
||||
}
|
||||
if (currlevel == 24) {
|
||||
objects_add_lv24();
|
||||
AddNakrulGate();
|
||||
}
|
||||
#else
|
||||
if (currlevel == 4)
|
||||
@@ -1653,7 +1653,7 @@ void AddSlainHero()
|
||||
}
|
||||
|
||||
#ifdef HELLFIRE
|
||||
void objects_44D8C5(int ot, int v2, int ox, int oy)
|
||||
void AddCryptBook(int ot, int v2, int ox, int oy)
|
||||
{
|
||||
int oi;
|
||||
|
||||
@@ -1665,12 +1665,12 @@ void objects_44D8C5(int ot, int v2, int ox, int oy)
|
||||
objectactive[nobjects] = oi;
|
||||
dObject[ox][oy] = oi + 1;
|
||||
SetupObject(oi, ox, oy, ot);
|
||||
objects_44DA68(oi, v2);
|
||||
AddCryptObject(oi, v2);
|
||||
object[oi]._oAnimWidth2 = (object[oi]._oAnimWidth - 64) >> 1;
|
||||
nobjects++;
|
||||
}
|
||||
|
||||
void objects_44DA68(int i, int a2)
|
||||
void AddCryptObject(int i, int a2)
|
||||
{
|
||||
int v8, v9;
|
||||
if (a2 > 5) {
|
||||
@@ -1941,7 +1941,7 @@ void Obj_Circle(int i)
|
||||
if (ox == 35 && oy == 36 && object[i]._oVar5 == 3) {
|
||||
object[i]._oVar6 = 4;
|
||||
ObjChangeMapResync(object[i]._oVar1, object[i]._oVar2, object[i]._oVar3, object[i]._oVar4);
|
||||
if (quests[Q_BETRAYER]._qactive == QUEST_ACTIVE)
|
||||
if (quests[Q_BETRAYER]._qactive == QUEST_ACTIVE) // BUGFIX stepping on the circle again will break the quest state
|
||||
quests[Q_BETRAYER]._qvar1 = 4;
|
||||
AddMissile(plr[myplr]._px, plr[myplr]._py, 35, 46, plr[myplr]._pdir, MIS_RNDTELEPORT, TARGET_MONSTERS, myplr, 0, 0);
|
||||
track_repeat_walk(FALSE);
|
||||
@@ -3010,10 +3010,10 @@ void OperateLever(int pnum, int i)
|
||||
}
|
||||
#ifdef HELLFIRE
|
||||
if (currlevel == 24) {
|
||||
operate_lv24_lever();
|
||||
OperateNakrulLever();
|
||||
IsUberLeverActivated = 1;
|
||||
mapflag = FALSE;
|
||||
quests[Q_NAKRUL]._qactive = 3;
|
||||
quests[Q_NAKRUL]._qactive = QUEST_DONE;
|
||||
}
|
||||
#endif
|
||||
if (mapflag)
|
||||
@@ -4586,13 +4586,13 @@ void OperateStoryBook(int pnum, int i)
|
||||
PlaySfxLoc(IS_ISCROL, object[i]._ox, object[i]._oy);
|
||||
#ifdef HELLFIRE
|
||||
if (object[i]._oVar8 != 0 && currlevel == 24) {
|
||||
if (IsUberLeverActivated != 1 && quests[Q_NAKRUL]._qactive != 3 && objects_lv_24_454B04(object[i]._oVar8)) {
|
||||
if (IsUberLeverActivated != 1 && quests[Q_NAKRUL]._qactive != QUEST_DONE && OperateNakrulBook(object[i]._oVar8)) {
|
||||
NetSendCmd(FALSE, CMD_NAKRUL);
|
||||
return;
|
||||
}
|
||||
} else if (currlevel >= 21) {
|
||||
quests[Q_NAKRUL]._qactive = 2;
|
||||
quests[Q_NAKRUL]._qlog = 1;
|
||||
quests[Q_NAKRUL]._qactive = QUEST_ACTIVE;
|
||||
quests[Q_NAKRUL]._qlog = TRUE;
|
||||
quests[Q_NAKRUL]._qmsg = object[i]._oVar2;
|
||||
}
|
||||
#endif
|
||||
@@ -5386,11 +5386,11 @@ void GetObjectStr(int i)
|
||||
}
|
||||
|
||||
#ifdef HELLFIRE
|
||||
void operate_lv24_lever()
|
||||
void OperateNakrulLever()
|
||||
{
|
||||
if (currlevel == 24) {
|
||||
PlaySfxLoc(IS_CROPEN, UberRow, UberCol);
|
||||
//the part below is the same as objects_454BA8
|
||||
//the part below is the same as SyncNakrulRoom
|
||||
dPiece[UberRow][UberCol] = 298;
|
||||
dPiece[UberRow][UberCol - 1] = 301;
|
||||
dPiece[UberRow][UberCol - 2] = 300;
|
||||
@@ -5399,7 +5399,7 @@ void operate_lv24_lever()
|
||||
}
|
||||
}
|
||||
|
||||
void objects_454BA8()
|
||||
void SyncNakrulRoom()
|
||||
{
|
||||
dPiece[UberRow][UberCol] = 298;
|
||||
dPiece[UberRow][UberCol - 1] = 301;
|
||||
@@ -5409,7 +5409,7 @@ void objects_454BA8()
|
||||
SetDungeonMicros();
|
||||
}
|
||||
|
||||
void objects_rnd_454BEA()
|
||||
void AddNakrulLeaver()
|
||||
{
|
||||
int xp, yp;
|
||||
|
||||
@@ -5433,7 +5433,7 @@ void objects_rnd_454BEA()
|
||||
AddObject(OBJ_LEVER, UberRow + 3, UberCol - 1);
|
||||
}
|
||||
|
||||
DIABOOL objects_lv_24_454B04(int s)
|
||||
DIABOOL OperateNakrulBook(int s)
|
||||
{
|
||||
switch (s) {
|
||||
case 6:
|
||||
|
@@ -24,9 +24,9 @@ void GetRndObjLoc(int randarea, int &xx, int &yy);
|
||||
void AddMushPatch();
|
||||
void AddSlainHero();
|
||||
#ifdef HELLFIRE
|
||||
void objects_44D8C5(int ot, int v2, int ox, int oy);
|
||||
void objects_44DA68(int a1, int a2);
|
||||
void objects_454AF0(int a1, int a2, int a3);
|
||||
void AddCryptBook(int ot, int v2, int ox, int oy);
|
||||
void AddCryptObject(int a1, int a2);
|
||||
void AddNakrulBook(int a1, int a2, int a3);
|
||||
#endif
|
||||
void AddObject(int ot, int ox, int oy);
|
||||
void Obj_Trap(int i);
|
||||
@@ -45,10 +45,10 @@ void SyncBreakObj(int pnum, int oi);
|
||||
void SyncObjectAnim(int o);
|
||||
void GetObjectStr(int i);
|
||||
#ifdef HELLFIRE
|
||||
void operate_lv24_lever();
|
||||
void objects_454BA8();
|
||||
void objects_rnd_454BEA();
|
||||
DIABOOL objects_lv_24_454B04(int s);
|
||||
void OperateNakrulLever();
|
||||
void SyncNakrulRoom();
|
||||
void AddNakrulLeaver();
|
||||
DIABOOL OperateNakrulBook(int s);
|
||||
#endif
|
||||
|
||||
#endif /* __OBJECTS_H__ */
|
||||
|
@@ -2711,7 +2711,7 @@ BOOL WeaponDur(int pnum, int durrnd)
|
||||
}
|
||||
|
||||
#ifdef HELLFIRE
|
||||
if (plr[pnum].InvBody[INVLOC_HAND_LEFT]._itype != ITYPE_NONE && plr[pnum].InvBody[INVLOC_HAND_LEFT]._iClass == ICLASS_WEAPON && plr[pnum].InvBody[INVLOC_HAND_LEFT]._iDamAcFlags & 2) {
|
||||
if (plr[pnum].InvBody[INVLOC_HAND_LEFT]._itype != ITYPE_NONE && plr[pnum].InvBody[INVLOC_HAND_LEFT]._iClass == ICLASS_WEAPON && plr[pnum].InvBody[INVLOC_HAND_LEFT]._iDamAcFlags & ISPLHF_DECAY) {
|
||||
plr[pnum].InvBody[INVLOC_HAND_LEFT]._iPLDam -= 5;
|
||||
if (plr[pnum].InvBody[INVLOC_HAND_LEFT]._iPLDam <= -100) {
|
||||
NetSendCmdDelItem(TRUE, INVLOC_HAND_LEFT);
|
||||
@@ -2722,7 +2722,7 @@ BOOL WeaponDur(int pnum, int durrnd)
|
||||
CalcPlrInv(pnum, TRUE);
|
||||
}
|
||||
|
||||
if (plr[pnum].InvBody[INVLOC_HAND_RIGHT]._itype != ITYPE_NONE && plr[pnum].InvBody[INVLOC_HAND_RIGHT]._iClass == ICLASS_WEAPON && plr[pnum].InvBody[INVLOC_HAND_RIGHT]._iDamAcFlags & 2) {
|
||||
if (plr[pnum].InvBody[INVLOC_HAND_RIGHT]._itype != ITYPE_NONE && plr[pnum].InvBody[INVLOC_HAND_RIGHT]._iClass == ICLASS_WEAPON && plr[pnum].InvBody[INVLOC_HAND_RIGHT]._iDamAcFlags & ISPLHF_DECAY) {
|
||||
plr[pnum].InvBody[INVLOC_HAND_RIGHT]._iPLDam -= 5;
|
||||
if (plr[pnum].InvBody[INVLOC_HAND_RIGHT]._iPLDam <= -100) {
|
||||
NetSendCmdDelItem(TRUE, INVLOC_HAND_LEFT); // BUGFIX: INVLOC_HAND_RIGHT
|
||||
@@ -2957,18 +2957,18 @@ BOOL PlrHitMonst(int pnum, int m)
|
||||
}
|
||||
|
||||
#ifdef HELLFIRE
|
||||
if (plr[pnum].pDamAcFlags & 0x01 && random_(6, 100) < 5) {
|
||||
if (plr[pnum].pDamAcFlags & ISPLHF_DEVASTATION && random_(6, 100) < 5) {
|
||||
dam *= 3;
|
||||
}
|
||||
|
||||
if (plr[pnum].pDamAcFlags & 0x10 && monster[m].MType->mtype != MT_DIABLO && monster[m]._uniqtype == 0 && random_(6, 100) < 10) {
|
||||
monster_43C785(m);
|
||||
if (plr[pnum].pDamAcFlags & ISPLHF_DOPPELGANGER && monster[m].MType->mtype != MT_DIABLO && monster[m]._uniqtype == 0 && random_(6, 100) < 10) {
|
||||
AddDoppelganger(m);
|
||||
}
|
||||
#endif
|
||||
|
||||
dam <<= 6;
|
||||
#ifdef HELLFIRE
|
||||
if (plr[pnum].pDamAcFlags & 0x08) {
|
||||
if (plr[pnum].pDamAcFlags & ISPLHF_JESTERS) {
|
||||
int r = random_(6, 201);
|
||||
if (r >= 100)
|
||||
r = 100 + (r - 100) * 5;
|
||||
@@ -2981,7 +2981,7 @@ BOOL PlrHitMonst(int pnum, int m)
|
||||
|
||||
if (pnum == myplr) {
|
||||
#ifdef HELLFIRE
|
||||
if (plr[pnum].pDamAcFlags & 0x04) {
|
||||
if (plr[pnum].pDamAcFlags & ISPLHF_PERIL) {
|
||||
dam2 += plr[pnum]._pIGetHit << 6;
|
||||
if (dam2 >= 0) {
|
||||
if (plr[pnum]._pHitPoints > dam2) {
|
||||
@@ -3488,7 +3488,7 @@ BOOL PM_DoSpell(int pnum)
|
||||
plr[pnum]._py,
|
||||
plr[pnum]._pVar1,
|
||||
plr[pnum]._pVar2,
|
||||
0,
|
||||
TARGET_MONSTERS,
|
||||
plr[pnum]._pVar4);
|
||||
|
||||
if (plr[pnum]._pSplFrom == 0) {
|
||||
@@ -4946,8 +4946,8 @@ void PlayDungMsgs()
|
||||
} else if (currlevel == 17 && !plr[myplr]._pLvlVisited[17] && gbMaxPlayers == 1 && !(plr[myplr].pDungMsgs2 & 1)) {
|
||||
sfxdelay = 10;
|
||||
sfxdnum = USFX_DEFILER1;
|
||||
quests[Q_DEFILER]._qactive = 2;
|
||||
quests[Q_DEFILER]._qlog = 1;
|
||||
quests[Q_DEFILER]._qactive = QUEST_ACTIVE;
|
||||
quests[Q_DEFILER]._qlog = TRUE;
|
||||
quests[Q_DEFILER]._qmsg = 286;
|
||||
plr[myplr].pDungMsgs2 |= 1;
|
||||
} else if (currlevel == 19 && !plr[myplr]._pLvlVisited[19] && gbMaxPlayers == 1 && !(plr[myplr].pDungMsgs2 & 4)) {
|
||||
|
@@ -716,20 +716,20 @@ void ResyncMPQuests()
|
||||
if (QuestStatus(Q_BETRAYER))
|
||||
AddObject(OBJ_ALTBOY, 2 * setpc_x + 20, 2 * setpc_y + 22);
|
||||
#ifdef HELLFIRE
|
||||
if (quests[Q_GRAVE]._qactive == 1 && currlevel == quests[Q_GRAVE]._qlevel - 1) {
|
||||
quests[Q_GRAVE]._qactive = 2;
|
||||
if (quests[Q_GRAVE]._qactive == QUEST_INIT && currlevel == quests[Q_GRAVE]._qlevel - 1) {
|
||||
quests[Q_GRAVE]._qactive = QUEST_ACTIVE;
|
||||
NetSendCmdQuest(TRUE, Q_GRAVE);
|
||||
}
|
||||
if (quests[Q_DEFILER]._qactive == 1 && currlevel == quests[Q_DEFILER]._qlevel - 1) {
|
||||
quests[Q_DEFILER]._qactive = 2;
|
||||
if (quests[Q_DEFILER]._qactive == QUEST_INIT && currlevel == quests[Q_DEFILER]._qlevel - 1) {
|
||||
quests[Q_DEFILER]._qactive = QUEST_ACTIVE;
|
||||
NetSendCmdQuest(TRUE, Q_DEFILER);
|
||||
}
|
||||
if (quests[Q_NAKRUL]._qactive == 1 && currlevel == quests[Q_NAKRUL]._qlevel - 1) {
|
||||
quests[Q_NAKRUL]._qactive = 2;
|
||||
if (quests[Q_NAKRUL]._qactive == QUEST_INIT && currlevel == quests[Q_NAKRUL]._qlevel - 1) {
|
||||
quests[Q_NAKRUL]._qactive = QUEST_ACTIVE;
|
||||
NetSendCmdQuest(TRUE, Q_NAKRUL);
|
||||
}
|
||||
if (quests[Q_JERSEY]._qactive == 1 && currlevel == quests[Q_JERSEY]._qlevel - 1) {
|
||||
quests[Q_JERSEY]._qactive = 2;
|
||||
if (quests[Q_JERSEY]._qactive == QUEST_INIT && currlevel == quests[Q_JERSEY]._qlevel - 1) {
|
||||
quests[Q_JERSEY]._qactive = QUEST_ACTIVE;
|
||||
NetSendCmdQuest(TRUE, Q_JERSEY);
|
||||
}
|
||||
#endif
|
||||
|
@@ -1575,7 +1575,7 @@ void T_FillTile(BYTE *P3Tiles, int xx, int yy, int t)
|
||||
}
|
||||
|
||||
#ifdef HELLFIRE
|
||||
void town_4751C6()
|
||||
void TownOpenHive()
|
||||
{
|
||||
dPiece[78][60] = 0x48a;
|
||||
dPiece[79][60] = 0x48b;
|
||||
@@ -1626,7 +1626,7 @@ void town_4751C6()
|
||||
SetTownMicros();
|
||||
}
|
||||
|
||||
void town_475379()
|
||||
void TownCloseHive()
|
||||
{
|
||||
dPiece[78][60] = 0x48a;
|
||||
dPiece[79][60] = 0x4eb;
|
||||
@@ -1677,7 +1677,7 @@ void town_475379()
|
||||
SetTownMicros();
|
||||
}
|
||||
|
||||
void town_47552C()
|
||||
void TownCloseGrave()
|
||||
{
|
||||
dPiece[36][21] = 0x52b;
|
||||
dPiece[37][21] = 0x52c;
|
||||
@@ -1692,7 +1692,7 @@ void town_47552C()
|
||||
SetTownMicros();
|
||||
}
|
||||
|
||||
void town_475595()
|
||||
void TownOpenGrave()
|
||||
{
|
||||
dPiece[36][21] = 0x533;
|
||||
dPiece[37][21] = 0x534;
|
||||
@@ -1743,16 +1743,16 @@ void T_Pass3()
|
||||
if (gbMaxPlayers == 1) {
|
||||
#endif
|
||||
#ifdef HELLFIRE
|
||||
if (quests[Q_FARMER]._qactive == 3 || quests[Q_FARMER]._qactive == 10
|
||||
|| quests[Q_JERSEY]._qactive == 3 || quests[Q_JERSEY]._qactive == 10) {
|
||||
town_4751C6();
|
||||
if (quests[Q_FARMER]._qactive == QUEST_DONE || quests[Q_FARMER]._qactive == 10
|
||||
|| quests[Q_JERSEY]._qactive == QUEST_DONE || quests[Q_JERSEY]._qactive == 10) {
|
||||
TownOpenHive();
|
||||
} else {
|
||||
town_475379();
|
||||
TownCloseHive();
|
||||
}
|
||||
if (quests[Q_GRAVE]._qactive == 3 || plr[myplr]._pLvlVisited[21])
|
||||
town_475595();
|
||||
if (quests[Q_GRAVE]._qactive == QUEST_DONE || plr[myplr]._pLvlVisited[21])
|
||||
TownOpenGrave();
|
||||
else
|
||||
town_47552C();
|
||||
TownCloseGrave();
|
||||
#endif
|
||||
#ifndef SPAWN
|
||||
#ifdef HELLFIRE
|
||||
@@ -1790,16 +1790,16 @@ void T_Pass3()
|
||||
}
|
||||
#ifdef HELLFIRE
|
||||
else {
|
||||
if (quests[Q_FARMER]._qactive == 3 || quests[Q_FARMER]._qactive == 10
|
||||
|| quests[Q_JERSEY]._qactive == 3 || quests[Q_JERSEY]._qactive == 10) {
|
||||
town_4751C6();
|
||||
if (quests[Q_FARMER]._qactive == QUEST_DONE || quests[Q_FARMER]._qactive == 10
|
||||
|| quests[Q_JERSEY]._qactive == QUEST_DONE || quests[Q_JERSEY]._qactive == 10) {
|
||||
TownOpenHive();
|
||||
} else {
|
||||
town_475379();
|
||||
TownCloseHive();
|
||||
}
|
||||
if (quests[Q_GRAVE]._qactive == 3 || plr[myplr]._pLvlVisited[21])
|
||||
town_475595();
|
||||
if (quests[Q_GRAVE]._qactive == QUEST_DONE || plr[myplr]._pLvlVisited[21])
|
||||
TownOpenGrave();
|
||||
else
|
||||
town_47552C();
|
||||
TownCloseGrave();
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
@@ -11,8 +11,8 @@ void town_draw_clipped_town_2(BYTE *pBuff, int sx, int sy, int row, int CelSkip,
|
||||
void town_draw_town_all(BYTE *pBuff, int x, int y, int row, int CelCap, int sx, int sy, int eflag);
|
||||
void T_DrawView(int StartX, int StartY);
|
||||
#ifdef HELLFIRE
|
||||
void town_4751C6();
|
||||
void town_475595();
|
||||
void TownOpenHive();
|
||||
void TownOpenGrave();
|
||||
#endif
|
||||
void CreateTown(int entry);
|
||||
|
||||
|
@@ -476,7 +476,7 @@ void InitCowFarmer()
|
||||
|
||||
InitTownerInfo(numtowners, 96, 1, TOWN_COWFARM, 61, 22, -1, 10);
|
||||
InitQstSnds(numtowners);
|
||||
if (quests[Q_JERSEY]._qactive != 3) {
|
||||
if (quests[Q_JERSEY]._qactive != QUEST_DONE) {
|
||||
towner[numtowners]._tNData = LoadFileInMem("Towners\\Farmer\\cfrmrn2.CEL", NULL);
|
||||
} else {
|
||||
towner[numtowners]._tNData = LoadFileInMem("Towners\\Farmer\\mfrmrn2.CEL", NULL);
|
||||
@@ -496,7 +496,7 @@ void InitGirl()
|
||||
|
||||
InitTownerInfo(numtowners, 96, 1, TOWN_GIRL, 77, 43, -1, 10);
|
||||
InitQstSnds(numtowners);
|
||||
if (quests[Q_GIRL]._qactive != 3) {
|
||||
if (quests[Q_GIRL]._qactive != QUEST_DONE) {
|
||||
towner[numtowners]._tNData = LoadFileInMem("Towners\\Girl\\Girlw1.CEL", NULL);
|
||||
} else {
|
||||
towner[numtowners]._tNData = LoadFileInMem("Towners\\Girl\\Girls1.CEL", NULL);
|
||||
@@ -1075,8 +1075,8 @@ else if (t == GetActiveTowner(TOWN_BMAID))
|
||||
{
|
||||
#ifdef HELLFIRE
|
||||
if (plr[p]._pLvlVisited[21] == false && PlrHasItem(p, IDI_MAPOFDOOM, i)) {
|
||||
quests[Q_GRAVE]._qactive = 2;
|
||||
quests[Q_GRAVE]._qlog = 1;
|
||||
quests[Q_GRAVE]._qactive = QUEST_ACTIVE;
|
||||
quests[Q_GRAVE]._qlog = TRUE;
|
||||
quests[Q_GRAVE]._qmsg = TEXT_GRAVE8;
|
||||
InitQTextMsg(TEXT_GRAVE8);
|
||||
towner[t]._tMsgSaid = TRUE;
|
||||
@@ -1212,9 +1212,9 @@ else if (towner[t]._ttype == TOWN_FARMER)
|
||||
case 0:
|
||||
if (PlrHasItem(p, IDI_RUNEBOMB, i)) {
|
||||
qt = TEXT_FARMER2;
|
||||
quests[Q_FARMER]._qactive = 2;
|
||||
quests[Q_FARMER]._qactive = QUEST_ACTIVE;
|
||||
quests[Q_FARMER]._qvar1 = 1;
|
||||
quests[Q_FARMER]._qlog = 1;
|
||||
quests[Q_FARMER]._qlog = TRUE;
|
||||
quests[Q_FARMER]._qmsg = TEXT_FARMER1;
|
||||
break;
|
||||
} else if (!plr[myplr]._pLvlVisited[9] && plr[myplr]._pLevel < 15) {
|
||||
@@ -1227,9 +1227,9 @@ else if (towner[t]._ttype == TOWN_FARMER)
|
||||
qt = 310;
|
||||
} else {
|
||||
qt = TEXT_FARMER1;
|
||||
quests[Q_FARMER]._qactive = 2;
|
||||
quests[Q_FARMER]._qactive = QUEST_ACTIVE;
|
||||
quests[Q_FARMER]._qvar1 = 1;
|
||||
quests[Q_FARMER]._qlog = 1;
|
||||
quests[Q_FARMER]._qlog = TRUE;
|
||||
quests[Q_FARMER]._qmsg = TEXT_FARMER1;
|
||||
SpawnRuneBomb(towner[t]._tx + 1, towner[t]._ty);
|
||||
t2 = 1;
|
||||
@@ -1244,10 +1244,10 @@ else if (towner[t]._ttype == TOWN_FARMER)
|
||||
case 1:
|
||||
if (PlrHasItem(p, IDI_RUNEBOMB, i)) {
|
||||
qt = TEXT_FARMER2;
|
||||
quests[Q_FARMER]._qactive = 2;
|
||||
quests[Q_FARMER]._qactive = QUEST_ACTIVE;
|
||||
quests[Q_FARMER]._qvar1 = 1;
|
||||
quests[Q_FARMER]._qmsg = TEXT_FARMER1;
|
||||
quests[Q_FARMER]._qlog = 1;
|
||||
quests[Q_FARMER]._qlog = TRUE;
|
||||
} else if (!plr[myplr]._pLvlVisited[9] && plr[myplr]._pLevel < 15) {
|
||||
qt = TEXT_FARMER8;
|
||||
if (plr[myplr]._pLvlVisited[2]) {
|
||||
@@ -1261,9 +1261,9 @@ else if (towner[t]._ttype == TOWN_FARMER)
|
||||
}
|
||||
} else {
|
||||
qt = TEXT_FARMER1;
|
||||
quests[Q_FARMER]._qactive = 2;
|
||||
quests[Q_FARMER]._qactive = QUEST_ACTIVE;
|
||||
quests[Q_FARMER]._qvar1 = 1;
|
||||
quests[Q_FARMER]._qlog = 1;
|
||||
quests[Q_FARMER]._qlog = TRUE;
|
||||
quests[Q_FARMER]._qmsg = TEXT_FARMER1;
|
||||
SpawnRuneBomb(towner[t]._tx + 1, towner[t]._ty);
|
||||
t2 = 1;
|
||||
@@ -1272,15 +1272,15 @@ else if (towner[t]._ttype == TOWN_FARMER)
|
||||
case 3:
|
||||
qt = TEXT_FARMER4;
|
||||
SpawnRewardItem(IDI_AURIC, towner[t]._tx + 1, towner[t]._ty);
|
||||
quests[Q_FARMER]._qactive = 10;
|
||||
quests[Q_FARMER]._qlog = 0;
|
||||
quests[Q_FARMER]._qactive = QUEST_INIT;
|
||||
quests[Q_FARMER]._qlog = FALSE;
|
||||
t2 = 1;
|
||||
break;
|
||||
case 10:
|
||||
qt = -1;
|
||||
break;
|
||||
default:
|
||||
quests[Q_FARMER]._qactive = 0;
|
||||
quests[Q_FARMER]._qactive = QUEST_NOTAVAIL;
|
||||
qt = TEXT_FARMER4;
|
||||
break;
|
||||
}
|
||||
@@ -1307,13 +1307,13 @@ else if (towner[t]._ttype == TOWN_COWFARM)
|
||||
CreateItem(UITEM_BOVINE, towner[t]._tx + 1, towner[t]._ty);
|
||||
RemoveInvItem(p, i);
|
||||
qt = TEXT_JERSEY8;
|
||||
quests[Q_JERSEY]._qactive = 3;
|
||||
quests[Q_JERSEY]._qactive = QUEST_DONE;
|
||||
} else if (PlrHasItem(p, IDI_RUNEBOMB, i)) {
|
||||
qt = TEXT_JERSEY5;
|
||||
quests[Q_JERSEY]._qactive = 2;
|
||||
quests[Q_JERSEY]._qactive = QUEST_ACTIVE;
|
||||
quests[Q_JERSEY]._qvar1 = 1;
|
||||
quests[Q_JERSEY]._qmsg = TEXT_JERSEY4;
|
||||
quests[Q_JERSEY]._qlog = 1;
|
||||
quests[Q_JERSEY]._qlog = TRUE;
|
||||
} else {
|
||||
switch (quests[Q_JERSEY]._qactive) {
|
||||
case 0:
|
||||
@@ -1356,17 +1356,17 @@ else if (towner[t]._ttype == TOWN_COWFARM)
|
||||
break;
|
||||
} else {
|
||||
qt = TEXT_JERSEY4;
|
||||
quests[Q_JERSEY]._qactive = 2;
|
||||
quests[Q_JERSEY]._qactive = QUEST_ACTIVE;
|
||||
quests[Q_JERSEY]._qvar1 = 1;
|
||||
quests[Q_JERSEY]._qmsg = TEXT_JERSEY4;
|
||||
quests[Q_JERSEY]._qlog = 1;
|
||||
quests[Q_JERSEY]._qlog = TRUE;
|
||||
SpawnRuneBomb(towner[t]._tx + 1, towner[t]._ty);
|
||||
t2 = 1;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
qt = TEXT_JERSEY5;
|
||||
quests[Q_JERSEY]._qactive = 0;
|
||||
quests[Q_JERSEY]._qactive = QUEST_NOTAVAIL;
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -1386,22 +1386,22 @@ else if (towner[t]._ttype == TOWN_GIRL)
|
||||
if (!qtextflag) {
|
||||
qt = 282;
|
||||
t2 = 0;
|
||||
if (!PlrHasItem(p, IDI_THEODORE, i) || quests[Q_GIRL]._qactive == 3) {
|
||||
if (!PlrHasItem(p, IDI_THEODORE, i) || quests[Q_GIRL]._qactive == QUEST_DONE) {
|
||||
switch (quests[Q_GIRL]._qactive) {
|
||||
case 0:
|
||||
qt = TEXT_GIRL2;
|
||||
quests[Q_GIRL]._qactive = 2;
|
||||
quests[Q_GIRL]._qactive = QUEST_ACTIVE;
|
||||
quests[Q_GIRL]._qvar1 = 1;
|
||||
quests[Q_GIRL]._qlog = 1;
|
||||
quests[Q_GIRL]._qlog = TRUE;
|
||||
quests[Q_GIRL]._qmsg = TEXT_GIRL2;
|
||||
t2 = 1;
|
||||
break;
|
||||
case 1:
|
||||
qt = TEXT_GIRL2;
|
||||
quests[Q_GIRL]._qvar1 = 1;
|
||||
quests[Q_GIRL]._qlog = 1;
|
||||
quests[Q_GIRL]._qlog = TRUE;
|
||||
quests[Q_GIRL]._qmsg = TEXT_GIRL2;
|
||||
quests[Q_GIRL]._qactive = 2;
|
||||
quests[Q_GIRL]._qactive = QUEST_ACTIVE;
|
||||
t2 = 1;
|
||||
break;
|
||||
case 2:
|
||||
@@ -1412,7 +1412,7 @@ else if (towner[t]._ttype == TOWN_GIRL)
|
||||
qt = -1;
|
||||
break;
|
||||
default:
|
||||
quests[Q_GIRL]._qactive = 0;
|
||||
quests[Q_GIRL]._qactive = QUEST_NOTAVAIL;
|
||||
qt = TEXT_GIRL1;
|
||||
break;
|
||||
}
|
||||
@@ -1420,8 +1420,8 @@ else if (towner[t]._ttype == TOWN_GIRL)
|
||||
qt = TEXT_GIRL4;
|
||||
RemoveInvItem(p, i);
|
||||
CreateAmulet(towner[t]._tx, towner[t]._ty, 13, 0, 1);
|
||||
quests[Q_GIRL]._qlog = 0;
|
||||
quests[Q_GIRL]._qactive = 3;
|
||||
quests[Q_GIRL]._qlog = FALSE;
|
||||
quests[Q_GIRL]._qactive = QUEST_DONE;
|
||||
t2 = 1;
|
||||
}
|
||||
if (qt != -1) {
|
||||
|
@@ -146,7 +146,7 @@ void InitTownTriggers()
|
||||
numtrigs++;
|
||||
}
|
||||
#ifdef HELLFIRE
|
||||
if (quests[Q_GRAVE]._qactive == 3) {
|
||||
if (quests[Q_GRAVE]._qactive == QUEST_DONE) {
|
||||
trigs[numtrigs]._tx = 36;
|
||||
trigs[numtrigs]._ty = 24;
|
||||
trigs[numtrigs]._tmsg = WM_DIABTOWNWARP;
|
||||
|
@@ -2898,7 +2898,7 @@ addr = 0x4237E7
|
||||
size = 0x128
|
||||
|
||||
[[func]]
|
||||
name = "items_42390F"
|
||||
name = "SpawnNote"
|
||||
addr = 0x42390F
|
||||
size = 0x56
|
||||
|
||||
@@ -3138,12 +3138,12 @@ addr = 0x427939
|
||||
size = 0x139
|
||||
|
||||
[[func]]
|
||||
name = "items_427A72"
|
||||
name = "CornerstoneSave"
|
||||
addr = 0x427A72
|
||||
size = 0x48
|
||||
|
||||
[[func]]
|
||||
name = "items_427ABA"
|
||||
name = "CornerstoneLoad"
|
||||
addr = 0x427ABA
|
||||
size = 0x114
|
||||
|
||||
@@ -3953,7 +3953,7 @@ addr = 0x4303A8
|
||||
size = 0x27C
|
||||
|
||||
[[func]]
|
||||
name = "missiles_430624"
|
||||
name = "missiles_hork_spawn"
|
||||
addr = 0x430624
|
||||
size = 0x3D
|
||||
|
||||
@@ -4398,7 +4398,7 @@ addr = 0x4358C1
|
||||
size = 0xDF
|
||||
|
||||
[[func]]
|
||||
name = "missiles_4359A0"
|
||||
name = "mi_hork_spawn"
|
||||
addr = 0x4359A0
|
||||
size = 0x138
|
||||
|
||||
@@ -4808,7 +4808,7 @@ addr = 0x43C735
|
||||
size = 0x50
|
||||
|
||||
[[func]]
|
||||
name = "monster_43C785"
|
||||
name = "AddDoppelganger"
|
||||
addr = 0x43C785
|
||||
size = 0xEC
|
||||
|
||||
@@ -6653,7 +6653,7 @@ addr = 0x44D093
|
||||
size = 0xD8
|
||||
|
||||
[[func]]
|
||||
name = "objects_add_lv22"
|
||||
name = "AddCryptStoryBook"
|
||||
addr = 0x44D16B
|
||||
size = 0xDE
|
||||
|
||||
@@ -6728,7 +6728,7 @@ addr = 0x44D89A
|
||||
size = 0x2B
|
||||
|
||||
[[func]]
|
||||
name = "objects_44D8C5"
|
||||
name = "AddCryptBook"
|
||||
addr = 0x44D8C5
|
||||
size = 0x81
|
||||
|
||||
@@ -6738,7 +6738,7 @@ addr = 0x44D946
|
||||
size = 0x122
|
||||
|
||||
[[func]]
|
||||
name = "objects_44DA68"
|
||||
name = "AddCryptObject"
|
||||
addr = 0x44DA68
|
||||
size = 0x20D
|
||||
|
||||
@@ -7213,32 +7213,32 @@ addr = 0x45460B
|
||||
size = 0x293
|
||||
|
||||
[[func]]
|
||||
name = "objects_add_lv24"
|
||||
name = "AddNakrulGate"
|
||||
addr = 0x454963
|
||||
size = 0x18D
|
||||
|
||||
[[func]]
|
||||
name = "objects_454AF0"
|
||||
name = "AddNakrulBook"
|
||||
addr = 0x454AF0
|
||||
size = 0x14
|
||||
|
||||
[[func]]
|
||||
name = "objects_lv_24_454B04"
|
||||
name = "OperateNakrulBook"
|
||||
addr = 0x454B04
|
||||
size = 0x42
|
||||
|
||||
[[func]]
|
||||
name = "operate_lv24_lever"
|
||||
name = "OperateNakrulLever"
|
||||
addr = 0x454B46
|
||||
size = 0x62
|
||||
|
||||
[[func]]
|
||||
name = "objects_454BA8"
|
||||
name = "SyncNakrulRoom"
|
||||
addr = 0x454BA8
|
||||
size = 0x42
|
||||
|
||||
[[func]]
|
||||
name = "objects_rnd_454BEA"
|
||||
name = "AddNakrulLeaver"
|
||||
addr = 0x454BEA
|
||||
size = 0xD5
|
||||
|
||||
@@ -9438,22 +9438,22 @@ addr = 0x475155
|
||||
size = 0x71
|
||||
|
||||
[[func]]
|
||||
name = "town_4751C6"
|
||||
name = "TownOpenHive"
|
||||
addr = 0x4751C6
|
||||
size = 0x1B3
|
||||
|
||||
[[func]]
|
||||
name = "town_475379"
|
||||
name = "TownCloseHive"
|
||||
addr = 0x475379
|
||||
size = 0x1B3
|
||||
|
||||
[[func]]
|
||||
name = "town_47552C"
|
||||
name = "TownCloseGrave"
|
||||
addr = 0x47552C
|
||||
size = 0x69
|
||||
|
||||
[[func]]
|
||||
name = "town_475595"
|
||||
name = "TownOpenGrave"
|
||||
addr = 0x475595
|
||||
size = 0x69
|
||||
|
||||
|
10
enums.h
10
enums.h
@@ -3379,6 +3379,16 @@ typedef enum item_special_effect {
|
||||
ISPL_ALLRESZERO = 0x80000000,
|
||||
} item_special_effect;
|
||||
|
||||
typedef enum item_special_effect_hf {
|
||||
ISPLHF_DEVASTATION = 0x01,
|
||||
ISPLHF_DECAY = 0x02,
|
||||
ISPLHF_PERIL = 0x04,
|
||||
ISPLHF_JESTERS = 0x08,
|
||||
ISPLHF_DOPPELGANGER = 0x10,
|
||||
ISPLHF_ACDEMON = 0x20,
|
||||
ISPLHF_ACUNDEAD = 0x40,
|
||||
} item_special_effect_hf;
|
||||
|
||||
// Logical equipment locations
|
||||
typedef enum inv_body_loc {
|
||||
INVLOC_HEAD = 0,
|
||||
|
Reference in New Issue
Block a user