wishing for quest guardian corpse

wishing for quest guardian corpse now gives
a generic corpse of the species
This commit is contained in:
nethack.allison
2003-08-19 04:06:34 +00:00
parent d72700c070
commit 3372f5d694
4 changed files with 46 additions and 1 deletions

View File

@@ -132,6 +132,7 @@ if you couldn't see the rat created in a sink for some reason other than
digging a pit while stuck in the floor should always free the player
quest guardians can no longer be created via stone-to-flesh on their statue
stone-to-flesh no longer silently ignored by a statue of a unique monster
wishing for quest guardian corpse now gives a generic corpse of the species
Platform- and/or Interface-Specific Fixes

View File

@@ -1098,6 +1098,7 @@ E struct mkroom *FDECL(search_special, (SCHAR_P));
/* ### mon.c ### */
E int FDECL(undead_to_corpse, (int));
E int FDECL(genus, (int));
E int FDECL(pm_to_cham, (int));
E int FDECL(minliquid, (struct monst *));
E int NDECL(movemon);

View File

@@ -84,6 +84,46 @@ int mndx;
return mndx;
}
/* Convert the monster index of some monsters (such as quest guardians)
* to their generic species type.
*/
int
genus(mndx)
int mndx;
{
switch (mndx) {
/* Quest guardians */
case PM_STUDENT:
case PM_CHIEFTAIN:
case PM_NEANDERTHAL:
case PM_ATTENDANT:
case PM_PAGE:
case PM_ABBOT:
case PM_ACOLYTE:
case PM_HUNTER:
case PM_THUG:
case PM_ROSHI:
#ifdef TOURIST
case PM_GUIDE:
#endif
case PM_WARRIOR:
case PM_APPRENTICE:
mndx = PM_HUMAN;
break;
default:
if (mndx >= LOW_PM && mndx < NUMMONS) {
struct permonst *ptr = &mons[mndx];
if (is_human(ptr)) mndx = PM_HUMAN;
else if (is_elf(ptr)) mndx = PM_ELF;
else if (is_dwarf(ptr)) mndx = PM_DWARF;
else if (is_gnome(ptr)) mndx = PM_GNOME;
else if (is_orc(ptr)) mndx = PM_ORC;
}
break;
}
return mndx;
}
/* convert monster index to chameleon index */
int
pm_to_cham(mndx)

View File

@@ -2559,7 +2559,10 @@ typfnd:
/* beware of random troll or lizard corpse,
or of ordinary one being forced to such */
if (otmp->timed) obj_stop_timers(otmp);
otmp->corpsenm = mntmp;
if (mons[mntmp].msound == MS_GUARDIAN)
otmp->corpsenm = genus(mntmp);
else
otmp->corpsenm = mntmp;
start_corpse_timeout(otmp);
}
break;