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:
@@ -72,6 +72,7 @@ struct context_info {
|
|||||||
unsigned run; /* 0: h (etc), 1: H (etc), 2: fh (etc) */
|
unsigned run; /* 0: h (etc), 1: H (etc), 2: fh (etc) */
|
||||||
/* 3: FH, 4: ff+, 5: ff-, 6: FF+, 7: FF- */
|
/* 3: FH, 4: ff+, 5: ff-, 6: FF+, 7: FF- */
|
||||||
/* 8: travel */
|
/* 8: travel */
|
||||||
|
unsigned startingpet_mid;
|
||||||
int warnlevel;
|
int warnlevel;
|
||||||
int djinni_count, ghost_count; /* potion effect tuning */
|
int djinni_count, ghost_count; /* potion effect tuning */
|
||||||
long stethoscope_move;
|
long stethoscope_move;
|
||||||
|
|||||||
@@ -178,5 +178,6 @@ struct monst {
|
|||||||
#define MON_NOWEP(mon) ((mon)->mw = (struct obj *)0)
|
#define MON_NOWEP(mon) ((mon)->mw = (struct obj *)0)
|
||||||
|
|
||||||
#define DEADMONSTER(mon) ((mon)->mhp < 1)
|
#define DEADMONSTER(mon) ((mon)->mhp < 1)
|
||||||
|
#define is_starting_pet(mon) ((mon)->m_id == context.startingpet_mid)
|
||||||
|
|
||||||
#endif /* MONST_H */
|
#endif /* MONST_H */
|
||||||
|
|||||||
@@ -13,7 +13,7 @@
|
|||||||
* Incrementing EDITLEVEL can be used to force invalidation of old bones
|
* Incrementing EDITLEVEL can be used to force invalidation of old bones
|
||||||
* and save files.
|
* and save files.
|
||||||
*/
|
*/
|
||||||
#define EDITLEVEL 5
|
#define EDITLEVEL 6
|
||||||
|
|
||||||
#define COPYRIGHT_BANNER_A \
|
#define COPYRIGHT_BANNER_A \
|
||||||
"NetHack, Copyright 1985-2003"
|
"NetHack, Copyright 1985-2003"
|
||||||
|
|||||||
@@ -156,6 +156,7 @@ makedog()
|
|||||||
|
|
||||||
if(!mtmp) return((struct monst *) 0); /* pets were genocided */
|
if(!mtmp) return((struct monst *) 0); /* pets were genocided */
|
||||||
|
|
||||||
|
context.startingpet_mid = mtmp->m_id;
|
||||||
#ifdef STEED
|
#ifdef STEED
|
||||||
/* Horses already wear a saddle */
|
/* Horses already wear a saddle */
|
||||||
if (pettype == PM_PONY && !!(otmp = mksobj(SADDLE, TRUE, FALSE))) {
|
if (pettype == PM_PONY && !!(otmp = mksobj(SADDLE, TRUE, FALSE))) {
|
||||||
|
|||||||
Reference in New Issue
Block a user