fix B18011 warning loss
> If you remove a ring of warning, see_monsters() is called to make > sure that the numbers get removed from the display. However, if > your only source of warning is experience level and you get > drained and feel "less sensitive", it isn't, and they're not.
This commit is contained in:
@@ -374,6 +374,8 @@ using travel mode to move next to a known trap and then trying to step onto
|
||||
that trap required an extra step; the first one ended up as a no-op
|
||||
punished with ball and chain on the same floor square as a trapped chest
|
||||
when it exploded resulted in panic "remove_object: obj not on floor"
|
||||
see_monsters() wasn't called when you lost the innate warning intrinsic due
|
||||
to level loss
|
||||
|
||||
|
||||
Platform- and/or Interface-Specific Fixes
|
||||
|
||||
15
src/attrib.c
15
src/attrib.c
@@ -98,6 +98,7 @@ const struct innate {
|
||||
|
||||
static long next_check = 600L; /* arbitrary first setting */
|
||||
STATIC_DCL void NDECL(exerper);
|
||||
STATIC_DCL void FDECL(postadjabil, (long *));
|
||||
|
||||
/* adjust an attribute; return TRUE if change is made, FALSE otherwise */
|
||||
boolean
|
||||
@@ -521,6 +522,15 @@ redist_attr()
|
||||
(void)encumber_msg();
|
||||
}
|
||||
|
||||
void
|
||||
postadjabil(ability)
|
||||
long *ability;
|
||||
{
|
||||
if (!ability) return;
|
||||
if (ability == &(HWarning) || ability == &(HSee_invisible))
|
||||
see_monsters();
|
||||
}
|
||||
|
||||
void
|
||||
adjabil(oldlevel,newlevel)
|
||||
int oldlevel, newlevel;
|
||||
@@ -558,6 +568,7 @@ int oldlevel, newlevel;
|
||||
}
|
||||
|
||||
while (abil || rabil) {
|
||||
long prevabil;
|
||||
/* Have we finished with the intrinsics list? */
|
||||
if (!abil || !abil->ability) {
|
||||
/* Try the race intrinsics */
|
||||
@@ -566,7 +577,7 @@ int oldlevel, newlevel;
|
||||
rabil = 0;
|
||||
mask = FROMRACE;
|
||||
}
|
||||
|
||||
prevabil = *(abil->ability);
|
||||
if(oldlevel < abil->ulevel && newlevel >= abil->ulevel) {
|
||||
/* Abilities gained at level 1 can never be lost
|
||||
* via level loss, only via means that remove _any_
|
||||
@@ -591,6 +602,8 @@ int oldlevel, newlevel;
|
||||
You_feel("less %s!", abil->gainstr);
|
||||
}
|
||||
}
|
||||
if (prevabil != *(abil->ability)) /* it changed */
|
||||
postadjabil(abil->ability);
|
||||
abil++;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user