Tourists gain experience by seeing new types of creatures up close
Experience equivalent to killing a monster is gained when starting a turn adjacent to and being able to see the monster. Breaks saves. Idea and parts of code via dNetHack
This commit is contained in:
@@ -2730,6 +2730,7 @@ enlightenment/attribute disclosure for saving-grace: include a line for have
|
|||||||
"X " for explore mode, or "D " for debug mode if any of the games
|
"X " for explore mode, or "D " for debug mode if any of the games
|
||||||
shown in its menu weren't saved during normal play; if they're all
|
shown in its menu weren't saved during normal play; if they're all
|
||||||
normal play, the prefix is suppressed
|
normal play, the prefix is suppressed
|
||||||
|
tourists gain experience by seeing new types of creatures up close
|
||||||
|
|
||||||
|
|
||||||
Platform- and/or Interface-Specific New Features
|
Platform- and/or Interface-Specific New Features
|
||||||
|
|||||||
@@ -673,6 +673,7 @@ struct mvitals {
|
|||||||
uchar born;
|
uchar born;
|
||||||
uchar died;
|
uchar died;
|
||||||
uchar mvflags;
|
uchar mvflags;
|
||||||
|
Bitfield(seen_close, 1);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -17,7 +17,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 110
|
#define EDITLEVEL 111
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Development status possibilities.
|
* Development status possibilities.
|
||||||
|
|||||||
@@ -14,6 +14,7 @@
|
|||||||
|
|
||||||
staticfn void moveloop_preamble(boolean);
|
staticfn void moveloop_preamble(boolean);
|
||||||
staticfn void u_calc_moveamt(int);
|
staticfn void u_calc_moveamt(int);
|
||||||
|
staticfn void see_nearby_monsters(void);
|
||||||
staticfn void maybe_do_tutorial(void);
|
staticfn void maybe_do_tutorial(void);
|
||||||
#ifdef POSITIONBAR
|
#ifdef POSITIONBAR
|
||||||
staticfn void do_positionbar(void);
|
staticfn void do_positionbar(void);
|
||||||
@@ -154,6 +155,28 @@ u_calc_moveamt(int wtcap)
|
|||||||
u.umovement = 0;
|
u.umovement = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* mark a monster type as seen when we see it next to us */
|
||||||
|
staticfn void
|
||||||
|
see_nearby_monsters(void)
|
||||||
|
{
|
||||||
|
coordxy x, y;
|
||||||
|
|
||||||
|
if (Blind || !Role_if(PM_TOURIST))
|
||||||
|
return;
|
||||||
|
|
||||||
|
for (x = u.ux - 1; x <= u.ux + 1; x++)
|
||||||
|
for (y = u.uy - 1; y <= u.uy + 1; y++)
|
||||||
|
if (isok(x, y) && MON_AT(x, y)) {
|
||||||
|
struct monst *mtmp = m_at(x, y);
|
||||||
|
|
||||||
|
if (canseemon(mtmp) && !svm.mvitals[monsndx(mtmp->data)].seen_close) {
|
||||||
|
svm.mvitals[monsndx(mtmp->data)].seen_close = TRUE;
|
||||||
|
more_experienced(experience(mtmp, 0), 0);
|
||||||
|
newexplevel();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#if defined(MICRO) || defined(WIN32)
|
#if defined(MICRO) || defined(WIN32)
|
||||||
static int mvl_abort_lev;
|
static int mvl_abort_lev;
|
||||||
#endif
|
#endif
|
||||||
@@ -410,6 +433,7 @@ moveloop_core(void)
|
|||||||
else if (u.uburied)
|
else if (u.uburied)
|
||||||
under_ground(0);
|
under_ground(0);
|
||||||
|
|
||||||
|
see_nearby_monsters();
|
||||||
} /* actual time passed */
|
} /* actual time passed */
|
||||||
|
|
||||||
/****************************************/
|
/****************************************/
|
||||||
|
|||||||
Reference in New Issue
Block a user