Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[hellfire] ProcessMonsters bin exact #1681

Merged
merged 3 commits into from
Sep 18, 2019
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 30 additions & 5 deletions Source/monster.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4634,23 +4634,44 @@ void ProcessMonsters()
Monst->_mAISeed = GetRndSeed();
}
if (!(monster[mi]._mFlags & MFLAG_NOHEAL) && Monst->_mhitpoints < Monst->_mmaxhp && Monst->_mhitpoints >> 6 > 0) {
if (Monst->mLevel <= 1) {
Monst->_mhitpoints += Monst->mLevel;
} else {
if (Monst->mLevel > 1) {
Monst->_mhitpoints += Monst->mLevel >> 1;
} else {
Monst->_mhitpoints += Monst->mLevel;
}
}
mx = Monst->_mx;
my = Monst->_my;
#ifndef SPAWN
if (dFlags[mx][my] & BFLAG_VISIBLE && Monst->_msquelch == 0 && Monst->MType->mtype == MT_CLEAVER) {
PlaySFX(USFX_CLEAVER);
if (dFlags[mx][my] & BFLAG_VISIBLE && Monst->_msquelch == 0) {
if (Monst->MType->mtype == MT_CLEAVER) {
PlaySFX(USFX_CLEAVER);
}
#ifdef HELLFIRE
if (Monst->MType->mtype == 137) { //TODO: apply enums
qndel marked this conversation as resolved.
Show resolved Hide resolved
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if (Monst->MType->mtype == 137) { //TODO: apply enums
if (Monst->MType->mtype == MT_NAKRUL) {

enums.h line 1685
MT_NAKRUL = 0x89,

if (UseCowFarmer) {
PlaySFX(997);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
PlaySFX(997);
PlaySFX(USFX_NAKRUL6);

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Feel free to verify the values

} else {
int sound = 995;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
int sound = 995;
int sound = USFX_NAKRUL4;

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably this was two calls to PlaySFX

if (!IsUberRoomOpened)
sound = 996;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
sound = 996;
sound = USFX_NAKRUL5;

PlaySFX(sound);
}
}
if (Monst->MType->mtype == 124)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if (Monst->MType->mtype == 124)
if (Monst->MType->mtype == MT_DEFILER)

enums.h line 1685
MT_DEFILER = 0x7C,

PlaySFX(989);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
PlaySFX(989);
PlaySFX(USFX_DEFILER8);

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

off to sleep :)

M_Enemy(mi);
#endif
}
#endif
if (Monst->_mFlags & MFLAG_TARGETS_MONSTER) {
_menemy = Monst->_menemy;
if ((DWORD)_menemy >= MAXMONSTERS) {
#ifdef HELLFIRE
return;
#else
app_fatal("Illegal enemy monster %d for monster \"%s\"", _menemy, Monst->mName);
#endif
}
Monst->_lastx = monster[Monst->_menemy]._mfutx;
Monst->_menemyx = Monst->_lastx;
Expand All @@ -4659,7 +4680,11 @@ void ProcessMonsters()
} else {
_menemy = Monst->_menemy;
if ((DWORD)_menemy >= MAX_PLRS) {
#ifdef HELLFIRE
return;
#else
app_fatal("Illegal enemy player %d for monster \"%s\"", _menemy, Monst->mName);
#endif
}
Monst->_menemyx = plr[Monst->_menemy]._px;
Monst->_menemyy = plr[Monst->_menemy]._py;
Expand Down