livelog tweaks

Log all level gains and loses.  For the existing logging of changes
in rank, mention the level number with the new title.  Classifying
level loss as "minor achievement" seems weird but I didn't see any
choice more appropriate.

Make '#chronicle' autocomplete.  That makes "#ch" ambiguous, but
better to have to type #cha to chat than to have to completely spell
out #chronicle.  (Changing it to #journal would make #j ambigious
but might still be an improvement.)
This commit is contained in:
PatR
2022-02-09 14:25:32 -08:00
parent c845a765a5
commit d761263e89
3 changed files with 15 additions and 7 deletions

View File

@@ -225,6 +225,7 @@ losexp(const char *drainer) /* cause of death, if drain should be fatal */
u.ulevel -= 1;
/* remove intrinsic abilities */
adjabil(u.ulevel + 1, u.ulevel);
livelog_printf(LL_MINORAC, "lost experience level %d", u.ulevel);
} else {
if (drainer) {
g.killer.format = KILLED_BY;
@@ -234,6 +235,7 @@ losexp(const char *drainer) /* cause of death, if drain should be fatal */
}
/* no drainer or lifesaved */
u.uexp = 0;
livelog_printf(LL_MINORAC, "lost all experience");
}
num = (int) u.uhpinc[u.ulevel];
u.uhpmax -= num;
@@ -333,6 +335,9 @@ pluslvl(boolean incr) /* true iff via incremental experience growth */
newrank = xlev_to_rank(u.ulevel);
if (newrank > oldrank)
record_achievement(achieve_rank(newrank));
else
livelog_printf(LL_MINORAC, "gained experience level %d",
u.ulevel);
}
g.context.botl = TRUE;
}