From: PatR Date: Wed, 2 Mar 2022 01:23:41 +0000 (-0800) Subject: livelog: killing unique monsters revisited X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=23d09e66789ad9dc5a1896d61e3c77eb4c424336;p=nethack livelog: killing unique monsters revisited Treat all kills of the Wizard and of any of the Riders as major events for inclusion in dumplog. For other unique monsters, that only happens when they're killed for the first time. --- diff --git a/src/mon.c b/src/mon.c index 948e80ffb..12d2a9b8e 100644 --- a/src/mon.c +++ b/src/mon.c @@ -1,4 +1,4 @@ -/* NetHack 3.7 mon.c $NHDT-Date: 1646182267 2022/03/02 00:51:07 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.411 $ */ +/* NetHack 3.7 mon.c $NHDT-Date: 1646184187 2022/03/02 01:23:07 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.412 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /*-Copyright (c) Derek S. Ray, 2015. */ /* NetHack may be freely redistributed. See license for details. */ @@ -2605,15 +2605,20 @@ mondead(register struct monst* mtmp) use of undead turning to revive a corpse or petrification plus stone-to-flesh to create and revive a statue */ if (howmany <= 3 || howmany == 5 || howmany == 10 || howmany == 25 - || (howmany % 50) == 0) { + || (howmany % 50) == 0) { /* 50, 100, 150, 200, 250 */ char xtra[40]; + long llevent_type = LL_UMONST; + /* first kill of any unique is a major event; all kills of the + Wizard and the Riders are major if they're logged but they + still don't get logged every time */ + if (howmany == 1 || mtmp->iswiz || is_rider(mtmp->data)) + llevent_type |= LL_ACHIEVE; xtra[0] = '\0'; if (howmany > 1) /* "(2nd time)" or "(50th time)" */ Sprintf(xtra, " (%d%s time)", howmany, ordin(howmany)); - livelog_printf(LL_UMONST | ((howmany == 1) ? LL_ACHIEVE : 0), - "%s %s%s", + livelog_printf(llevent_type, "%s %s%s", nonliving(mtmp->data) ? "destroyed" : "killed", livelog_mon_nam(mtmp), xtra); }