starting pet identification

Make it possible to identify your starting pet throughout the game
via is_starting_pet(mon) macro.
This commit is contained in:
nethack.allison
2003-10-24 11:52:49 +00:00
parent da063bdc18
commit 04174eda2a
4 changed files with 4 additions and 1 deletions

View File

@@ -72,6 +72,7 @@ struct context_info {
unsigned run; /* 0: h (etc), 1: H (etc), 2: fh (etc) */
/* 3: FH, 4: ff+, 5: ff-, 6: FF+, 7: FF- */
/* 8: travel */
unsigned startingpet_mid;
int warnlevel;
int djinni_count, ghost_count; /* potion effect tuning */
long stethoscope_move;

View File

@@ -178,5 +178,6 @@ struct monst {
#define MON_NOWEP(mon) ((mon)->mw = (struct obj *)0)
#define DEADMONSTER(mon) ((mon)->mhp < 1)
#define is_starting_pet(mon) ((mon)->m_id == context.startingpet_mid)
#endif /* MONST_H */

View File

@@ -13,7 +13,7 @@
* Incrementing EDITLEVEL can be used to force invalidation of old bones
* and save files.
*/
#define EDITLEVEL 5
#define EDITLEVEL 6
#define COPYRIGHT_BANNER_A \
"NetHack, Copyright 1985-2003"

View File

@@ -156,6 +156,7 @@ makedog()
if(!mtmp) return((struct monst *) 0); /* pets were genocided */
context.startingpet_mid = mtmp->m_id;
#ifdef STEED
/* Horses already wear a saddle */
if (pettype == PM_PONY && !!(otmp = mksobj(SADDLE, TRUE, FALSE))) {