livelog shopkeeper deaths
The livelog message includes the shopkeeper's shop type, since the livelog for stealing also mentions the shop type. Only the first kill per shopkeeper is logged.
This commit is contained in:
@@ -32,6 +32,8 @@ static struct permonst *accept_newcham_form(struct monst *, int);
|
|||||||
static void kill_eggs(struct obj *);
|
static void kill_eggs(struct obj *);
|
||||||
static void pacify_guard(struct monst *);
|
static void pacify_guard(struct monst *);
|
||||||
|
|
||||||
|
extern const struct shclass shtypes[]; /* defined in shknam.c */
|
||||||
|
|
||||||
#define LEVEL_SPECIFIC_NOCORPSE(mdat) \
|
#define LEVEL_SPECIFIC_NOCORPSE(mdat) \
|
||||||
(Is_rogue_level(&u.uz) \
|
(Is_rogue_level(&u.uz) \
|
||||||
|| !gl.level.flags.deathdrops \
|
|| !gl.level.flags.deathdrops \
|
||||||
@@ -2762,16 +2764,26 @@ mondead(struct monst *mtmp)
|
|||||||
|
|
||||||
if (mndx == PM_MEDUSA && gm.mvitals[mndx].died == 1) {
|
if (mndx == PM_MEDUSA && gm.mvitals[mndx].died == 1) {
|
||||||
record_achievement(ACH_MEDU); /* also generates a livelog event */
|
record_achievement(ACH_MEDU); /* also generates a livelog event */
|
||||||
} else if (unique_corpstat(mtmp->data)) {
|
} else if (unique_corpstat(mtmp->data)
|
||||||
|
|| (mtmp->isshk && !mtmp->mrevived)) {
|
||||||
/*
|
/*
|
||||||
* livelog event; unique_corpstat() includes the Wizard and
|
* livelog event; unique_corpstat() includes the Wizard and
|
||||||
* any High Priest even though they aren't actually unique.
|
* any High Priest even though they aren't actually unique.
|
||||||
*
|
*
|
||||||
* It would be nice to include shopkeepers. Their names are
|
* Shopkeeper kills are logged, but only the first time per
|
||||||
* unique within each game but unfortunately for this potential
|
* shopkeeper, since their shared kill counter wouldn't work
|
||||||
* usage their kill count is lumped together in a group total.
|
* for this purpose (and it wouldn't account for polymorphed
|
||||||
|
* shopkeepers either).
|
||||||
*/
|
*/
|
||||||
int howmany = gm.mvitals[mndx].died;
|
int howmany = gm.mvitals[mndx].died;
|
||||||
|
char shkdetail[100];
|
||||||
|
shkdetail[0]='\0';
|
||||||
|
if (mtmp->isshk) {
|
||||||
|
struct eshk *eshk = ESHK(mtmp);
|
||||||
|
howmany = 1;
|
||||||
|
Sprintf(shkdetail, ", the %s proprietor",
|
||||||
|
shtypes[eshk->shoptype - SHOPBASE].name);
|
||||||
|
}
|
||||||
|
|
||||||
/* killing a unique more than once doesn't get logged every time;
|
/* killing a unique more than once doesn't get logged every time;
|
||||||
the Wizard and the Riders can be killed more than once
|
the Wizard and the Riders can be killed more than once
|
||||||
@@ -2792,9 +2804,9 @@ mondead(struct monst *mtmp)
|
|||||||
if (howmany > 1) /* "(2nd time)" or "(50th time)" */
|
if (howmany > 1) /* "(2nd time)" or "(50th time)" */
|
||||||
Sprintf(xtra, " (%d%s time)", howmany, ordin(howmany));
|
Sprintf(xtra, " (%d%s time)", howmany, ordin(howmany));
|
||||||
|
|
||||||
livelog_printf(llevent_type, "%s %s%s",
|
livelog_printf(llevent_type, "%s %s%s%s",
|
||||||
nonliving(mtmp->data) ? "destroyed" : "killed",
|
nonliving(mtmp->data) ? "destroyed" : "killed",
|
||||||
livelog_mon_nam(mtmp), xtra);
|
livelog_mon_nam(mtmp), shkdetail, xtra);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user