follow-up: evolve placeholder content to match variant

suggestion by paxed

Increments EDITLEVEL again.
This commit is contained in:
nhmall
2025-02-02 12:53:58 -05:00
parent d331029b03
commit d65d0062a9
7 changed files with 36 additions and 23 deletions

View File

@@ -182,9 +182,16 @@ struct edog {
Bitfield(killed_by_u, 1); /* you attempted to kill him */
};
/* for saving the hero's rank in bones monster */
struct mon_former_rank {
int lev;
short mnum;
boolean female;
};
struct former_incarnation {
unsigned parentmid; /* make clobber-detection possible */
char rank[25]; /* for bones' ghost rank in their former life */
unsigned parentmid; /* make clobber-detection possible */
struct mon_former_rank rank; /* for bones' ghost rank in former life */
};
/***

View File

@@ -260,14 +260,6 @@
|| objects[(obj)->otyp].oc_material == VEGGY \
|| ((obj)->otyp == CORPSE && (obj)->corpsenm == PM_LICHEN))))
/* is_bones_monster() is currently only used by hardfought livelog,
* but is included as part of savefile field compatibility adjustments.
*/
#define is_bones_monster(ptr) \
((ptr) == &mons[PM_GHOST] || (ptr) == &mons[PM_GHOUL] \
|| (ptr) == &mons[PM_VAMPIRE] || (ptr) == &mons[PM_WRAITH] \
|| (ptr) == &mons[PM_GREEN_SLIME] || (ptr)->mlet == S_MUMMY)
#ifdef PMNAME_MACROS
#define pmname(ptr,g) ((((g) == MALE || (g) == FEMALE) && (ptr)->pmnames[g]) \
? (ptr)->pmnames[g] : (ptr)->pmnames[NEUTRAL])

View File

@@ -17,7 +17,7 @@
* Incrementing EDITLEVEL can be used to force invalidation of old bones
* and save files.
*/
#define EDITLEVEL 117
#define EDITLEVEL 118
/*
* Development status possibilities.

View File

@@ -509,9 +509,9 @@ savebones(int how, time_t when, struct obj *corpse)
if (!has_former(mtmp))
newformer(mtmp);
if (has_former(mtmp)) {
Snprintf(FORMER(mtmp)->rank,
sizeof FORMER(mtmp)->rank,
"%s", rank());
FORMER(mtmp)->rank.lev = mtmp->m_lev;
FORMER(mtmp)->rank.mnum = Role_switch;
FORMER(mtmp)->rank.female = flags.female;
}
}
for (mtmp = fmon; mtmp; mtmp = mtmp->nmon) {

View File

@@ -954,6 +954,10 @@ x_monnam(
} else if (do_name && has_mgivenname(mtmp)) {
char *name = MGIVENNAME(mtmp);
#if 0
/* hardfought */
if (has_former(mtmp) && FORMER(mtmp)->rank.mnum != NON_PM) {
#endif
if (mdat == &mons[PM_GHOST]) {
Sprintf(eos(buf), "%s ghost", s_suffix(name));
name_at_start = TRUE;
@@ -976,6 +980,9 @@ x_monnam(
Strcat(buf, name);
name_at_start = TRUE;
}
#if 0 /* hardfought */
}
#endif
} else if (is_mplayer(mdat) && !In_endgame(&u.uz)) {
char pbuf[BUFSZ];

View File

@@ -204,7 +204,12 @@ done_in_by(struct monst *mtmp, int how)
svk.killer.format = KILLED_BY;
}
/* _the_ <invisible> <distorted> ghost of Dudley */
#if 0
/* hardfought */
if (has_former(mtmp) && FORMER(mtmp)->rank.mnum != NON_PM) {
#else
if (mptr == &mons[PM_GHOST] && has_mgivenname(mtmp)) {
#endif
Strcat(buf, "the ");
svk.killer.format = KILLED_BY;
}
@@ -247,6 +252,10 @@ done_in_by(struct monst *mtmp, int how)
: "%s imitating %s",
realnm, shape);
mptr = mtmp->data; /* reset for mimicker case */
#if 0 /* hardfought */
} else if (has_former(mtmp) && FORMER(mtmp)->rank.mnum != NON_PM)
Strcpy(buf, m_monnam(mtmp));
#endif
} else if (mptr == &mons[PM_GHOST]) {
Strcat(buf, "ghost");
if (has_mgivenname(mtmp))

View File

@@ -3644,15 +3644,13 @@ xkilled(
#if 0 /* HARDFOUGHT-only at present */
#ifdef LIVELOG
if (is_bones_monster(mtmp->data)
&& has_former(mtmp) && *FORMER(mtmp)->rank
&& strlen(FORMER(mtmp)->rank) > 0) {
if (mtmp->data == &mons[PM_GHOST])
livelog_printf(LL_UMONST, "destroyed %s, the former %s",
livelog_mon_nam(mtmp), FORMER(mtmp)->rank);
else
livelog_printf(LL_UMONST, "destroyed %s, and former %s",
livelog_mon_nam(mtmp), FORMER(mtmp)->rank);
if (has_former(mtmp) && FORMER(mtmp)->rank.mnum != NON_PM) {
livelog_printf(LL_UMONST, "destroyed %s, %s former %s",
livelog_mon_nam(mtmp),
(mtmp->data == &mons[PM_GHOST]) ? "the" : "and",
rank_of(FORMER(mtmp)->rank.lev,
FORMER(mtmp)->rank.mnum,
FORMER(mtmp)->rank.female));
}
#endif /* LIVELOG */
#endif