Tourists gain experience by using camera flash on monsters

This counts as seeing the monster up close, so the tourist
doesn't need to get next to the monster
This commit is contained in:
Pasi Kallinen
2024-12-07 11:18:13 +02:00
parent 12228cac49
commit 863d455e1d
4 changed files with 39 additions and 24 deletions

View File

@@ -14,7 +14,6 @@
staticfn void moveloop_preamble(boolean);
staticfn void u_calc_moveamt(int);
staticfn void see_nearby_monsters(void);
staticfn void maybe_do_tutorial(void);
#ifdef POSITIONBAR
staticfn void do_positionbar(void);
@@ -155,28 +154,6 @@ u_calc_moveamt(int wtcap)
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)
static int mvl_abort_lev;
#endif